Page MenuHomePhabricator

[AOI][Citation Bot] Fix Citation bot's handling of multiple author names
Closed, ResolvedPublic

Event Timeline

Fhocutt claimed this task.
Fhocutt raised the priority of this task from to High.
Fhocutt updated the task description. (Show Details)
Fhocutt added a project: Community-Tech.
Fhocutt added subscribers: Fhocutt, kaldari, Aklapper and 4 others.

It is not clear how the bot is handling the deprecated "coauthors" parameter (in most cases, it seems to convert "coauthor(s)" to "author2"), but that may be part of the issue.

Current thinking: identify when the author list is comma-separated and lacks "."s, and put that value (whether in author, authors, coauthor, coauthors) into a new "vauthors" param. The first author appears to be handled as a special case, so that may be leading to some of the instances of extended "author2" parameters.

Fhocutt renamed this task from [AOI][Citation Bot] Fix Citation bot's handling of multiple author names/Vancouver style to [AOI][Citation Bot] Fix Citation bot's handling of multiple author names.Sep 10 2015, 4:17 AM
Fhocutt updated the task description. (Show Details)
Fhocutt set Security to None.

Current thinking: identify when the author list is comma-separated and lacks "."s, and put that value (whether in author, authors, coauthor, coauthors) into a new "vauthors" param. The first author appears to be handled as a special case, so that may be leading to some of the instances of extended "author2" parameters.

This has three problems. First, vauthors is a list of all authors, whereas coauthor/coauthors is not, so you would have to make sure that you were combining the values from author/first/last/first1/last1 with coauthors (in a way that made sense) before putting them in vauthors. Second, comma separated author lists without periods aren't necessarily Vancouver-style author lists. For example, "Doe, Jane Seymore; Kennedy, John Fitzgerald" is not a Vancouver-style list (which would be "Doe JS, Kennedy JF"). The whole addition of Vancouver-style author lists is a recent addition to the citation templates and made the whole author system even more complicated. Finally, vauthors (Vancouver-style author lists) should only be used in articles where that is the predominant author listing style, not in all articles.

My suggestion is still to remove all author modification capabilities from Citation bot. Yes, this reduces it's functionality, but otherwise we have to support a million different contingencies.

Should've marked that as old. Actual current thinking:

  • save initial author parameters in an array on first parsing the cite template.
  • when expanding/adding parameters, check whether that array is empty. If it is, go ahead and fetch/expand authors as normal. If it isn't, skip all author parameters (the bot has a list of them) and handle the rest of the citation.

Commented asking for testing at the talk page. https://en.wikipedia.org/w/index.php?title=User_talk%3ACitation_bot&type=revision&diff=681567979&oldid=681378885

Known issues:

  • Will still modify editors, regardless of whether editor name parameters are present. Unclear whether this needs to be changed for bot unblocking.

Everything else should be as desired.

Will still modify editors, regardless of whether editor name parameters are present. Unclear whether this needs to be changed for bot unblocking.

@Fhocutt: Can you elaborate on this? Do you know what conditions it happens in?

@kaldari: looking at the code, this actually doesn't seem to happen--it'll already add editors only if the first editor is blank (in Template::add_if_new()), and it looks like it doesn't overwrite elsewhere.

Looking through the recent diffs, the only author handling bug I could find was https://en.wikipedia.org/wiki/User_talk:Citation_bot#Addition_of_author1_and_first1, which doesn't seem related to this task. It looks like multiple authors are now being handled fine as far as I can tell. I saw some diffs where they are being correctly added and lots of others where they are unmodified (which is fine).