Last modified: 2008-04-12 18:49:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 13651 - "Automatically resolve redirects"-feature causes error at fi.wikipedia.org.
"Automatically resolve redirects"-feature causes error at fi.wikipedia.org.
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
http://fi.wikipedia.org/w/api.php?act...
:
: 13661 13717 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-08 10:13 UTC by Asko Soukka
Modified: 2008-04-12 18:49 UTC (History)
5 users (show)

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


Attachments

Description Asko Soukka 2008-04-08 10:13:51 UTC
"Automatically resolve redirects"-feature on Wikipedia API causes error with at least one particular page at Finnish Wikipedia (fi.wikipedia.org). I'm not sure whether this is a bug with the API or with the database.

The last time the feature worked correctly for me was on April 4th 2008.

The first time the feature gave me an error was on April 8th 2008.

1) An example of a page that doesn't work:

http://fi.wikipedia.org/w/api.php?action=query&titles=Viittomakieli&prop=categories&redirects

<?xml version="1.0" encoding="utf-8"?>
<api>
  <error code="internal_api_error_MWException" info="Exception Caught: Internal error in ApiPageSet::getRedirectTargets: Invalid redirect IDs were found">

#0 /usr/local/apache/common-local/php-1.5/includes/api/ApiBase.php(659): wfDebugDieBacktrace('Internal error ...')
#1 /usr/local/apache/common-local/php-1.5/includes/api/ApiPageSet.php(540): ApiBase::dieDebug('ApiPageSet::get...', 'Invalid redirec...')
#2 /usr/local/apache/common-local/php-1.5/includes/api/ApiPageSet.php(494): ApiPageSet->getRedirectTargets()
#3 /usr/local/apache/common-local/php-1.5/includes/api/ApiPageSet.php(365): ApiPageSet->resolvePendingRedirects()
#4 /usr/local/apache/common-local/php-1.5/includes/api/ApiPageSet.php(250): ApiPageSet->initFromTitles(Array)
#5 /usr/local/apache/common-local/php-1.5/includes/api/ApiQuery.php(197): ApiPageSet->execute()
#6 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(354): ApiQuery->execute()
#7 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(222): ApiMain->executeAction()
#8 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(207): ApiMain->executeActionWithErrorHandling()
#9 /usr/local/apache/common-local/php-1.5/api.php(77): ApiMain->execute()
#10 /usr/local/apache/common-local/live-1.5/api.php(3): require('/usr/local/apac...')
#11 {main}

</error>
</api>

2) An example of a page that does work:

http://fi.wikipedia.org/w/api.php?action=query&titles=Retinitis_pigmentosa&prop=categories&redirects

You are looking at the HTML representation of the XML format.
HTML is good for debugging, but probably is not suitable for your application.
See complete documentation, or API help for more information. 
<?xml version="1.0" encoding="utf-8"?>
<api>
  <query>
    <normalized>
      <n from="Retinitis_pigmentosa" to="Retinitis pigmentosa" />
    </normalized>
    <redirects>
      <r from="Retinitis pigmentosa" to="Verkkokalvorappeuma" />
    </redirects>
    <pages>
      <page pageid="151254" ns="0" title="Verkkokalvorappeuma">
        <categories>
          <cl ns="14" title="Luokka:Lääketiedetyngät" />
          <cl ns="14" title="Luokka:Perinnölliset sairaudet" />
          <cl ns="14" title="Luokka:Silmätaudit" />
        </categories>
      </page>
    </pages>
  </query>
</api>
Comment 1 Roan Kattouw 2008-04-08 11:14:47 UTC
This is because some old redirects don't have entires in the redirect table. This can be fixed by editing the redirect (changing #redirect to #REDIRECT or the other way around). I agree this condition should be handled more gracefully, but I'm waiting for replies to bug 10931 comment #19 first.
Comment 2 Russell Blau 2008-04-08 12:32:04 UTC
I don't think this should depend on bug 10931; unless you can guarantee that the redirect table of ''every'' wiki will ''always'' be 100% up-to-date, the API still needs to be able to deal gracefully with missing entries.
Comment 3 Roan Kattouw 2008-04-08 12:40:26 UTC
(In reply to comment #2)
> I don't think this should depend on bug 10931; unless you can guarantee that
> the redirect table of ''every'' wiki will ''always'' be 100% up-to-date, the
> API still needs to be able to deal gracefully with missing entries.
> 

That's not what I said. In bug 10931 comment #19 I suggested a procedure for keeping the redirect table more up-to-date. If that procedure is approved, I can use it in the API too (i.e. if the API encounters redirects that aren't in the redirect table, it'll add them).
Comment 4 Alexandre Emsenhuber [IAlex] 2008-04-08 19:46:10 UTC
*** Bug 13661 has been marked as a duplicate of this bug. ***
Comment 5 aaron brick 2008-04-08 21:26:19 UTC
something has made this error much more common on en.wp in the last day or two. i never saw it before and now it is all over the place. love the #10931 proposed change but i will love a graceful failure even more.
Comment 6 Asko Soukka 2008-04-09 05:40:57 UTC
I agree with Aaron. I never saw this problem before yesterday (at fi.wikipedia.org). I'd need API-queries with more than one title at time and now only one problematic redirect fail the whole query (and it's up to me to find out which one). Anyway, thanks a lot for quick and informal answers and, of course, for the already wonderful work for the API :)
Comment 7 Roan Kattouw 2008-04-09 12:53:42 UTC
(In reply to comment #5)
> love the #10931
> proposed change but i will love a graceful failure even more.

Well once bug 10931 is fixed, we won't need graceful failures; we won't even *have* failures any more, because the following two requests:

index.php?title=Foo

api.php?action=query&titles=Foo&redirects

will both add an entry to the redirect table if it's missing.
Comment 8 Roan Kattouw 2008-04-11 15:21:19 UTC
Fixed in r33133
Comment 9 Alexandre Emsenhuber [IAlex] 2008-04-12 18:49:59 UTC
*** Bug 13717 has been marked as a duplicate of this bug. ***

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


Navigation
Links