Page MenuHomePhabricator

CX2: <cite class="citation web cs1" data-ve-ignore="true">
Open, MediumPublic

Assigned To
None
Authored By
NicoV
Aug 3 2021, 6:00 AM
Referenced Files
Restricted File
Jun 5 2023, 9:31 PM
Restricted File
Jun 5 2023, 9:31 PM

Description

CX2 is regularly producing bad wikitext with <cite class="citation web cs1" data-ve-ignore="true"> crap.

See a list of such problems in this dump analysis.

It'usually in a ref tag, the cite tag is added after the actual template. This is not the only problem : the template is usually incorrectly filled (missing required parameters and useful information) ; if a reference is used several times it's duplicated sometimes with different content leading to errors reported by MW...

Various examples on Affaire GSK en Chine, where you can see the same reference resulting in several different results :

<ref name=":21">{{article|date=2016-11-01|langue=en-US|consulté le=2020-01-08}}<cite class="citation news cs1" data-ve-ignore="true" id="CITEREFBarboza2016">Barboza, David (2016-11-01). [https://www.nytimes.com/2016/11/02/business/international/china-rules-glaxo-bribes-sex-tape-whistleblower-cautionary-tale.html "Drug Giant Faced a Reckoning as China Took Aim at Bribery"]. ''The New York Times''. [[International Standard Serial Number|ISSN]]&nbsp;[//www.worldcat.org/issn/0362-4331 0362-4331]<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-01-08</span></span>.</cite></ref>{{,}}<ref name="Barboza">{{article|date=2016-11-01|consulté le=2020-01-08|langue=en-US}}</ref>
<ref name=":22">{{article|nom=Barboza|prénom=David|date=2016-11-01|titre=Drug Giant Faced a Reckoning as China Took Aim at Bribery|langue=en-US|périodique=The New York Times|url=https://www.nytimes.com/2016/11/02/business/international/china-rules-glaxo-bribes-sex-tape-whistleblower-cautionary-tale.html|consulté le=2020-01-08}}<cite class="citation news cs1" data-ve-ignore="true" id="CITEREFBarboza2016">Barboza, David (2016-11-01). [https://www.nytimes.com/2016/11/02/business/international/china-rules-glaxo-bribes-sex-tape-whistleblower-cautionary-tale.html "Drug Giant Faced a Reckoning as China Took Aim at Bribery"]. ''The New York Times''. [[International Standard Serial Number|ISSN]]&nbsp;[//www.worldcat.org/issn/0362-4331 0362-4331]<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-01-08</span></span>.</cite></ref>
<ref name=":141">{{Lien web |langue=en-US |titre=Curbing Corruption: GlaxoSmithKline in China |url=https://ethicsunwrapped.utexas.edu/video/curbing-corruption |série=Ethics Unwrapped |consulté le=2020-01-08}}<cite class="citation web cs1" data-ve-ignore="true">[https://ethicsunwrapped.utexas.edu/video/curbing-corruption "Curbing Corruption: GlaxoSmithKline in China"]. ''Ethics Unwrapped''<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-01-08</span></span>.</cite></ref>

Could you fix CX2 ? This is a nightmare for wikignomes...

Event Timeline

Similar bug still occurring. Example fix:
https://pl.wikipedia.org/w/index.php?title=Wikipedysta%3ANux%2FTracy_Barrell&diff=69907638&oldid=69907611&diffmode=source

Note that the problem occurs even if I replace the contents of original reference (change ref type → paste code with proper template → do the rest of translation → save).

This is still a regular thing. I think this might be happening for all named refs when the first ref doesn't have cite-body.

Step 1. Example:
https://en.wikipedia.org/w/index.php?title=Mike_Hagerty&action=edit&oldid=1153004047

Lorem ipsum ''[[The Wonder Years]]''.<ref name="TVG Filmography"/> Dolor sit ament.<ref>Something else</ref>

...

''[[Doctor Detroit]]''<ref name="TVG Filmography">{{cite web|title=Mike Hagerty List of Movies and TV Shows|url=https://www.tvguide.com/celebrities/mike-hagerty/credits/3030103020/|website=TV Guide|access-date=May 6, 2022}}</ref>

Step. 2. Start Content Translation.

Step. 3. In Content Translation change first ref to something like this (insert local template):
{{Cytuj |autor = |tytuł = Mike Hagerty List of Movies and TV Shows |data dostępu = 2022-05-06 |opublikowany = TV Guide |url = https://www.tvguide.com/celebrities/mike-hagerty/credits/3030103020/ |język = en}}

Step 4. Add next paragraphs to translation and publish as draft.

Result:
So now you get:

Lorem ipsum ''[[The Wonder Years]]''.<ref name="TVG Filmography">{{Cytuj |autor =  |tytuł = Mike Hagerty List of Movies and TV Shows |data dostępu = 2022-05-06 |opublikowany = TV Guide |url = https://www.tvguide.com/celebrities/mike-hagerty/credits/3030103020/ |język = en}}</ref>.

''Doctor Detroit''<ref name="TVG Filmography">{{Cytuj stronę|tytuł=Mike Hagerty List of Movies and TV Shows|url=https://www.tvguide.com/celebrities/mike-hagerty/credits/3030103020/|opublikowany=TV Guide|data dostępu=May 6, 2022}}<cite class="citation web cs1" data-ve-ignore="true">[https://www.tvguide.com/celebrities/mike-hagerty/credits/3030103020/ "Mike Hagerty List of Movies and TV Shows"]. ''TV Guide''<span class="reference-accessdate">. Retrieved <span class="nowrap">May 6,</span> 2022</span>.</cite></ref>

Notice how the first ref is with correct (fixed) "data dostępu = 2022-05-06" and the second one has an incorrect (US-only) date "data dostępu=May 6, 2022". So the contents of the 2nd ref remained unchanged (the template was auto translated and extra "<cite>" tag appeared, but edit of the 1st occurrence of the ref didn't change the 2nd occurrence).

I've confirmed the steps above break refs.

Here is a test page:
https://en.wikipedia.org/wiki/User:Nux/Mike_Hagerty_-_test

And translation:
https://pl.wikipedia.org/wiki/Wikipedysta:Nux/Mike_Hagerty_-_test

PS: This is what you get when you select and copy the first ref:

selectcopy
{F37094719}{F37094718}