special:export exports two copies of pages
Closed, ResolvedPublic


Author: ssanbeg

When using the special:export for to export pages, if the include templates option is checked, the output will include two copies of any page whose title contains an underscore. The workaround is just to replace each underscore with a space.

Bug is reproducable on the live sites (i.e. wikipedia) as well as a local wiki on the released version, so it looks like it's been around awhile.

Version: unspecified
Severity: normal

bzimport set Reference to bz17374.
bzimport created this task.Via LegacyFeb 5 2009, 9:54 PM
demon added a comment.Via ConduitFeb 17 2009, 7:08 PM

I can't confirm this on the live sites or my local install. Can you give an example page that does this?

bzimport added a comment.Via ConduitFeb 18 2009, 12:17 AM

ssanbeg wrote:

sample script to call export

Attached: bug.pl

bzimport added a comment.Via ConduitFeb 18 2009, 12:18 AM

ssanbeg wrote:

I just saw the behavior on english wikipedia with the page "Main_Page", although any other page should have the same behavior. It can be easily seen from a simple perl script (see attachment):

perl bug.pl | grep '<title>Main'

<title>Main Page</title>
<title>Main Page</title>
demon added a comment.Via ConduitFeb 18 2009, 1:34 AM

Ah I got it. Confirmed. Dunno why I didn't see it before.

demon added a comment.Via ConduitMar 27 2009, 10:01 PM

Fixed in r48938

tstarling added a comment.Via ConduitMay 4 2009, 11:00 AM

That revision does not fix the bug. There are still plenty of ways to export duplicate titles, using non-normalised input, e.g.:

main Page
:Main Page
__Main Page

It needs to be done properly with Title::newFromText().

brion added a comment.Via ConduitJul 20 2009, 2:48 AM

Done in r53521

Add Comment