Last modified: 2014-03-19 16:08:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43387, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41387 - api returns wrong langlinks
api returns wrong langlinks
Status: REOPENED
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 40000
  Show dependency treegraph
 
Reported: 2012-10-25 11:36 UTC by merl
Modified: 2014-03-19 16:08 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description merl 2012-10-25 11:36:22 UTC
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.
Comment 1 Sam Reed (reedy) 2012-10-25 16:31:08 UTC
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
Comment 2 merl 2012-10-25 16:44:26 UTC
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.
Comment 3 Andre Klapper 2012-10-25 17:07:07 UTC
(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?
Comment 4 Andre Klapper 2012-11-26 12:09:31 UTC
merl: Could you provide a minimal testcase and describe what happens and what should have had happened?
Comment 5 Andre Klapper 2012-12-21 18:52:01 UTC
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!
Comment 6 merl 2013-03-01 11:18:07 UTC
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
Comment 7 merl 2013-03-01 11:36:34 UTC
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>
Comment 8 Andre Klapper 2013-03-08 10:09:11 UTC
Reedy: Do comment 6 and comment 7 help?
Comment 9 Andre Klapper 2014-03-19 16:08:13 UTC
[ Adjusting priority & severity; see [[mw:Bugzilla/Fields]] ]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links