Last modified: 2012-10-31 11:52:55 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 T40919, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38919 - "page_is_redirect" wrong on Indonesian (and probably other non-English) wiki dumps. Doesn't recognize localization of "#REDIRECT"
"page_is_redirect" wrong on Indonesian (and probably other non-English) wiki ...
Status: RESOLVED DUPLICATE of bug 7497
Product: Utilities
Classification: Unclassified
mwdumper (Other open bugs)
unspecified
All All
: Unprioritized normal with 1 vote (vote)
: ---
Assigned To: Ariel T. Glenn
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-01 16:02 UTC by bennylin
Modified: 2012-10-31 11:52 UTC (History)
2 users (show)

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


Attachments

Description bennylin 2012-08-01 16:02:28 UTC
Probably duplicate of Bug #12507 and possibly related to Bug #10931 and #30513

I'm downloading idwikibooks and idwiki dumps (i.e. idwiki-pages-articles.xml.bz2). And after I install it locally and go through random pages several times I've stumbled into many 'broken' redirects (as if with parameter "redirect=no"). They didn't redirect me to the proper pages.

From what I found out, the problem was because the site does not recognize the pages with "#ALIH [[title]]" tag (Indonesian for "#REDIRECT [[title]]") as a redirect, because they're marked as "page_is_redirect = 0" on the "page" table. Only redirects with #REDIRECT tag are recognized (and thus redirected properly). I've checked the special pages online and they seem to list all the redirects properly, so it seems this problem is only for the dumps. (Note: I've already set $wgLanguageCode = "id", so that wasn't the problem)

I could create new redirects using "#ALIH [[title]]" just fine, but I couldn't fix the existing redirects. I've tried to purge the page and run "refreshLinks.php --redirects-only" to no avail. Null edit gave me worse result, it displays "1. ALIH [[title]]", as if it's an ordered list. It was strange, because I can make a new redirects using "#ALIH"s, but get an error doing a null edit on existing "#ALIH"s. 

I've also downloaded idwiki-latest-redirect.sql.gz and put them in "redirect" table, but as soon as I run rebuildall.php, they were overwritten by the data from "page" table. 

Right now my only option left is run a bot locally, and change all "#ALIH"s to "#REDIRECT"s. Hope this gets fixed on the next version.
Comment 1 Brion Vibber 2012-08-01 20:07:25 UTC
Is this a problem with the data in the dump, or the dump import process?

How are you importing them, and into what?
Comment 2 Brion Vibber 2012-08-01 20:17:28 UTC
A quick spot check of idwiki-20120727-pages-articles.xml.bz2 shows that <page>s whose current <text> is #ALIH [[whatever]] are marked with <redirect> elements, so the dump looks ok:

  <page>
    <title>Main Page</title>
    <ns>0</ns>
    <id>92</id>
    <redirect title="Halaman Utama" />
    <revision>
      <id>2637971</id>
      <parentid>652005</parentid>
      <timestamp>2009-10-30T04:14:53Z</timestamp>
      <contributor>
        <username>Bennylin</username>
        <id>469</id>
      </contributor>
      <minor />
      <comment>+kat</comment>
      <sha1>a8p1abnpz1lzdoypdtv1fffrtfch444</sha1>
      <text xml:space="preserve">#ALIH [[Halaman Utama]]
[[Kategori:Pengalihan yang dilindungi]]</text>
    </revision>
  </page>

If you're using maintenance/importDump.php to import the XML into MediaWiki, then this is probably related to bug 12507.
Comment 3 bennylin 2012-08-02 05:29:22 UTC
(In reply to comment #1)
> Is this a problem with the data in the dump, or the dump import process?
> 
> How are you importing them, and into what?

I'm importing them with MWDumper, into a fresh installation of MW 1.18.
Comment 4 bennylin 2012-08-02 05:55:44 UTC
Benjamin Collier's build to be exact. I found out the problem was on MWDumper's code https://github.com/bcollier/mwdumper/blob/master/src/org/mediawiki/importer/Revision.java

Close this as Fixed. Thanks Brion.
Comment 5 JulesWinnfield-hu 2012-10-19 00:58:12 UTC

*** This bug has been marked as a duplicate of bug 7497 ***

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


Navigation
Links