Page MenuHomePhabricator

Preview shows wikitext instead of page title on test.wikipedia.org
Open, LowPublicBUG REPORT

Description

When editing any page on the test wiki it shows the page title at the top, but as soon as I preview it the following text appears:

{{#ifeq:{{NAMESPACE}}|User | {{#switch:{{SUBPAGENAME}} |monobook.js|monobook.css|modern.js|modern.css|common.js|common.css=Editing {{BASEPAGENAME}}'s personal interface page |#default=Editing {{#titleparts: {{PAGENAME}} | 1 }}'s <!-- it's hard to identify the current page title if all we see is the user name and not the subpage name -->{{#ifeq: {{SUBPAGENAME}} | {{PAGENAME}} | user page | sub page "{{SUBPAGENAME}}" }} }} | Editing "$1" }}

Now I haven't checked when it happens. It happened for me on my user page and on the main page (just preview suffices). But now it was strange. I tested first on the main page and it happened, then on my user page and it worked fine. After that I tested a third page and the main page again, both times the error did not appear. But then rerequesting the preview issued the error and then also on the user page. It doesn't seem to happen on the English Wikipedia.

I'm using the Firefox Nightly from 2015-07-06 on Fedora 20 if that depends on the browser.

Event Timeline

XZise raised the priority of this task from to Needs Triage.
XZise updated the task description. (Show Details)
XZise added a project: MediaWiki-Page-editing.
XZise added a subscriber: XZise.

Confirming for e.g. https://test.wikipedia.org/w/index.php?title=Page375&action=edit both when logged in and not. Cannot reproduce on mediawiki.org or test2 which are also running wmf13.

Aklapper renamed this task from Preview shows wikitext instead of page title to Preview shows wikitext instead of page title on test.wikipedia.org.Jul 9 2015, 2:22 PM
Aklapper triaged this task as Low priority.
Aklapper set Security to None.
Ciencia_Al_Poder added a subscriber: Ciencia_Al_Poder.

This happens when using LivePreview (check for that in Preferences, under Editig tab). Using normal preview works without this problem.

When hitting preview, I see this in the error console after a XMLHttpRequest to the server:

mediawiki.jqueryMsg: editing: Parse error at position 0 in input: {{#ifeq:{{NAMESPACE}}|User
| {{#switch:{{SUBPAGENAME}}
|monobook.js|monobook.css|modern.js|modern.css|common.js|common.css=Editing {{BASEPAGENAME}}'s personal interface page
|#default=Editing {{#titleparts: {{PAGENAME}} | 1 }}'s <!-- it's hard to identify the current page title if all we see is the user name and not the subpage name -->{{#ifeq: {{SUBPAGENAME}} | {{PAGENAME}} | user page | sub page "{{SUBPAGENAME}}" }}
 }}
| Editing "$1"
}}

What's being displayed is the raw message of https://test.wikipedia.org/w/index.php?title=MediaWiki:Editing&action=edit

Apparently, the message is being parsed on client-side but it's too complex.

on en.wp that message isn't so complex: https://en.wikipedia.org/w/index.php?title=MediaWiki:Editing&action=edit so this doesn't happen on wikipedia.

The problem happens executing this line: mw.message('editing').text() and you can see the plain message with mw.message('editing').plain()

I'd say this is not a bug, and mw.message isn't supposed to handle such complex parser functions.

On the other hand, someone should probably clean out https://test.wikipedia.org/w/index.php?title=MediaWiki:Editing&action=edit

TheDJ added a subscriber: TheDJ.

I'd say this is not a bug, and mw.message isn't supposed to handle such complex parser functions.

It isn't, but it could handle it more gracefully of course. I'll see if I can fix that.

Once again preparsed messages on server side would solve this problem.

Oh yes sorry that is with live preview forgot to add that (although I didn't test it without it).

https://test.wikipedia.org/wiki/MediaWiki:Editing got deleted so it is no longer reproducible on this project.

Fomafix changed the subtype of this task from "Task" to "Bug Report".Mar 2 2019, 2:15 PM