daniel added a comment.

I didn't look at the Lua code, but here is my guess based on what was written above:

The Lua code defines the citation name based on the citation hash. If it encounters the same citation again, it will try to define another citation with the same name. Cite does not like that.

The problem is in the Lua code: it should not assume that the citation hash will only occur once on the page. On a single item, the same source may be used to support multiple statements - so the citation for each statement will have the same hash. That will cause an error if the Lua code is used to show multiple statements with the same source on a page.

The Lua code could reduce the issue by combining the hash with the statement's UUID. But that would still cause an error if the same statement is shown in two places on the same page. Perhaps the easiest fix is to not use the name parameter at all. Is it needed?


TASK DETAIL
https://phabricator.wikimedia.org/T183804

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: daniel
Cc: daniel, Izno, Tacsipacsi, Bencemac, Aklapper, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to