Page MenuHomePhabricator

api returns wrong langlinks
Open, LowPublic

Description

My bot is changing langlinks based on api (prop=langlinks) results. But this response is sometimes wrong because it returns langlinks not contained in source.

Now nlwiki threaten me to remove my bot flag/block my bot because of repeated wrong edits. In this last case my bot trusted the response from enwiki api which was wrong.

I think api uses the langlink table. So please update this table globally for all sites. I think its enough to update only sites not updated after mw 1.19 which included the last major related change and all wrong pages i know had older last revisions. Maybe there was something wrong in the past and must be cleared. After new edits the response is correct.

Bots will also transfer these wrong langlinks to wikidata. The maintenance script should be finished before wikidata goes live.


Version: unspecified
Severity: major

Details

Reference
bz41387

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:15 AM
bzimport set Reference to bz41387.
bzimport added a subscriber: Unknown Object (MLST).

Examples are needed to show what you're saying. At the moment, this is essentially "something is broken, fix it", which isn't any help

I can only give you exmaples that are already solved because my bot already did an edit later. But my log shows that the api response is different to what it should be according to page history.

(In reply to comment #0)

My bot is changing langlinks based on api (prop=langlinks) results. But this
response is sometimes wrong because it returns langlinks not contained in
source.
I think api uses the langlink table.

Could you provide a minimal testcase and describe what happens and what should have had happened?

merl: Could you provide a minimal testcase and describe what happens and what should have had happened?

Unfortunately closing this report as no further information has been provided.

merl: Please feel free to reopen this report if you can provide the information asked for and if this still happens. Thanks!

On itwiki there was a page move. The redirect was created automatically without any additional code. But api still returns langlinks for this redirect:
http://it.wikipedia.org/w/api.php?action=query&titles=Ansan%20%28Elam%29&prop=info%7Clanglinks&lllimit=max

Adding api response of http://it.wikipedia.org/w/api.php?action=query&titles=Ansan%20%28Elam%29&prop=info%7Clanglinks&lllimit=max :

<?xml version="1.0"?>
<api>

<query>
  <pages>
    <page pageid="4417662" ns="0" title="Ansan (Elam)" touched="2013-02-25T22:53:22Z" lastrevid="56538685" counter="" length="25" redirect="" new="">
      <langlinks>
        <ll lang="am" xml:space="preserve">አንሻን</ll>
        <ll lang="ar" xml:space="preserve">إمارة أنشان</ll>
        <ll lang="bg" xml:space="preserve">Аншан (Персия)</ll>
        <ll lang="de" xml:space="preserve">Anschan (Persien)</ll>
        <ll lang="en" xml:space="preserve">Anshan (Persia)</ll>
        <ll lang="es" xml:space="preserve">Anshan (Persia)</ll>
        <ll lang="fa" xml:space="preserve">انزان (مشگین‌شهر)</ll>
        <ll lang="fr" xml:space="preserve">Anshan</ll>
        <ll lang="gl" xml:space="preserve">Anshan, Persia</ll>
        <ll lang="he" xml:space="preserve">אנשאן (פרס)</ll>
        <ll lang="hr" xml:space="preserve">Anšan</ll>
        <ll lang="hu" xml:space="preserve">Ansan</ll>
        <ll lang="ja" xml:space="preserve">アンシャン</ll>
        <ll lang="ko" xml:space="preserve">안샨</ll>
        <ll lang="ms" xml:space="preserve">Anshan (Parsi)</ll>
        <ll lang="mzn" xml:space="preserve">انزان (مشگین‌شهر)</ll>
        <ll lang="no" xml:space="preserve">Anshan (Persia)</ll>
        <ll lang="pl" xml:space="preserve">Anszan</ll>
        <ll lang="pt" xml:space="preserve">Anshan (Pérsia)</ll>
        <ll lang="ru" xml:space="preserve">Аншан</ll>
        <ll lang="sh" xml:space="preserve">Anšan (Perzija)</ll>
        <ll lang="simple" xml:space="preserve">Anshan</ll>
        <ll lang="sv" xml:space="preserve">Anshan, Persien</ll>
        <ll lang="zh" xml:space="preserve">安善</ll>
      </langlinks>
    </page>
  </pages>
</query>
<limits langlinks="500" />

</api>

Reedy: Do comment 6 and comment 7 help?

[ Adjusting priority & severity; see [[mw:Bugzilla/Fields]] ]