Page MenuHomePhabricator

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



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:27 PM
bzimport set Reference to bz17374.

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

ssanbeg wrote:

sample script to call export


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 | grep '<title>Main'

<title>Main Page</title>
<title>Main Page</title>

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

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().