Page MenuHomePhabricator

[Bug] Item links on normal wiki pages sometimes prepended by label (in a random language)
Closed, ResolvedPublic

Description

See https://www.wikidata.org/wiki/Wikidata:Project_chat#Why_are_links_to_wiki_items_displayed_in_a_foreign_script.3F

From time to time the links on https://www.wikidata.org/wiki/Wikidata:Database_reports/Constraint_violations/Mandatory_constraints/Violations get prepended by the label in Russian (perhaps because the bot maintaining the site is run by a Russian user). After purging the page, all links are converted to plain ids again. Do not confuse this with the headings that use lua code to get the label in the users language. The lists themselves however are plain [[Q123]] links that should not display any label.

Event Timeline

Bene created this task.Sep 3 2015, 1:27 PM
Bene raised the priority of this task from to Needs Triage.
Bene updated the task description. (Show Details)
Bene added a subscriber: Bene.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 3 2015, 1:27 PM
Bene set Security to None.Sep 3 2015, 1:28 PM
Bene added subscribers: daniel, aude.

If it happens again to me, I will provide a screenshot.

daniel added a comment.Sep 3 2015, 1:44 PM

Please also provide the relevant wikitext. I suspect this has something to do with some parser function or other.

Bene added a comment.Sep 3 2015, 1:45 PM

Something like

=== {{P|131}}: Conflicts with ===
* [[Q3317390]]: [[Property:P31]]
* [[Q3492538]]: [[Property:P31]]
* [[Q3801388]]: [[Property:P31]]
* [[Q4118344]]: [[Property:P31]]
* [[Q4808232]]: [[Property:P31]]
* [[Q4837847]]: [[Property:P31]]
* [[Q4926792]]: [[Property:P31]]
* [[Q4937962]]: [[Property:P31]]
* [[Q4985250]]: [[Property:P31]]
* [[Q4986758]]: [[Property:P31]]
* [[Q4987111]]: [[Property:P31]]
* [[Q5104434]]: [[Property:P31]]
* [[Q5114315]]: [[Property:P31]]
* [[Q5201533]]: [[Property:P31]]
* [[Q5243731]]: [[Property:P31]]
* [[Q5418944]]: [[Property:P31]]
* [[Q5582542]]: [[Property:P31]]
* [[Q5587958]]: [[Property:P31]]
* [[Q5598643]]: [[Property:P31]]
* [[Q5609201]]: [[Property:P31]]
* [[Q5627375]]: [[Property:P31]]
* [[Q5662474]]: [[Property:P31]]
* [[Q5666988]]: [[Property:P31]]
* [[Q5680538]]: [[Property:P31]]
* [[Q5700681]]: [[Property:P31]]
* [[Q5729812]]: [[Property:P31]]
* [[Q5916943]]: [[Property:P31]]
* [[Q5946921]]: [[Property:P31]]
* [[Q6358258]]: [[Property:P31]]
* [[Q6395024]]: [[Property:P31]]
* [[Q6432873]]: [[Property:P31]]
* [[Q6757286]]: [[Property:P31]]
* [[Q6963789]]: [[Property:P31]]
* [[Q7237146]]: [[Property:P31]]
* [[Q7279871]]: [[Property:P31]]
* [[Q7409084]]: [[Property:P31]]
* [[Q7417586]]: [[Property:P31]]
* [[Q7555320]]: [[Property:P31]]
* [[Q7563874]]: [[Property:P31]]
* [[Q8080469]]: [[Property:P31]]
* [[Q10467703]]: [[Property:P31]]
* [[Q10542843]]: [[Property:P31]]
* [[Q11220996]]: [[Property:P31]]
* [[Q15890607]]: [[Property:P31]]
daniel triaged this task as High priority.Sep 3 2015, 2:02 PM

Causes broken & confusing page rendering

daniel added a comment.Sep 3 2015, 2:03 PM

@Bene huh, strange. I was under the impression that the Linker was not used for vanilla wiki links at all, so our hook code shouldn't ever be triggered for that. perhaps that changed?

daniel renamed this task from [Bug] Item links on normal wiki pages sometimes prepended by label to [Bug] Item links on normal wiki pages sometimes prepended by label (in a random language).Sep 15 2015, 10:13 AM

Change 238495 had a related patch set uploaded (by Bene):
Don't run LinkBegin hook when editing a wiki page

https://gerrit.wikimedia.org/r/238495

Bene claimed this task.Sep 15 2015, 5:17 PM

The hook got run because when editing a wiki page and focusing the
summary field before saving, the stashedit api gets called which
already parses the wikitext and puts it into the parser cache.
Because the api sets $wgTitle to Special:Badtitle/dummy_title_for_
API_calls_set_in_api.php we are technically on a special page and
thus the hook gets run.

The linked patch makes sure that the hook never changes the link when
called during an api request.

Change 238495 merged by jenkins-bot:
Don't run LinkBegin hook when editing a wiki page

https://gerrit.wikimedia.org/r/238495

daniel closed this task as Resolved.Sep 16 2015, 10:27 AM
daniel moved this task from Review to Done on the Wikidata-Sprint-2015-09-15 board.