Page MenuHomePhabricator

Editing page - InputBox create a page using WikiEditor side-by-side preview rewrites all links on page to Main page
Closed, DeclinedPublic

Description

Can reproduce this bug on MW versions 1.19 and 1.21, also note it effects 1.22, see https://www.mediawiki.org/wiki/Thread:Project:Support_desk/Inputbox_in_1.22.0

To reproduce this bug.

WikiEditor with side-by-side preview on using Chrome or IE

  1. Edit any page
  2. <inputbox>type=create</inputbox>
  3. Click side-by-side preview
  4. Type in a summary if inclined or needed and Click save
  5. Note, you have just edited and saved to the "Main page" not the page you were editing

Alternatively, you can click the Preview button at bottom of page after you use side-by-side preview and note the change of links being rewritten. Hover over, Page link or Talk link and see the link back to Main page. If you have the Main page protected, you will see the protection notice and then the preview of the inputbox.

I've also noted odd behavior with type=search similar in nature being rewritten to a Special page but have not investigated it.

I cannot reproduce this bug using Firefox so what is different? Should this be assigned to WikiEditor, but I cannot reproduce this behavior unless InputBox is installed and the tag <inputbox> appears on the page in the edit window.

Hutchy68


Version: unspecified
Severity: normal

Details

Reference
bz60133

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:59 AM
bzimport set Reference to bz60133.
bzimport added a subscriber: Unknown Object (MLST).
Ciencia_Al_Poder subscribed.

A comment from the LQT thread:

I think I've found something that might help (tested on our 1.24.1 instance).
It appears to be related to the WikiEditor extension, specifically, the preview/changes tabs that come with it. The solution that's worked for me is to disable these tabs in LocalSettings.php using

$wgDefaultUserOptions['wikieditor-preview'] = 0;

The problem here is that inputbox creates a form to submit the page, but it's nested inside the edit form on preview. Forms can not be nested in HTML. This is a problem of WikiEditor, since normal preview is displayed outside of the edit form

It uses hidden input fields to create the page, but those are interfering with the edit/preview form, so the "create" parameter of the inputbox is seen when you submit the edit form and it's in fact creating it.

I imagine that filling any arbitrary title on the inputbox will instead edit that page instead of the main page (see T64975)

The proper solution is to make WikiEditor preview feature to be injected outside of the edit form, and not inside it.

Long term this implementation will disappear most likely.

It's just not worth it to do it now however, since some non-WMF people like using it, and there isn't an alternative yet. Additionally, the whole 'editor' story of old toolbar vs. WikiEditor vs. CodeEditor vs. Mobile editor vs Visual Editor, is up in the air right now. Developers and the Editing team have this on their 'this needs serious rework, consolidation and modernization'-radar, but how and when is still very much undefined.

Jdforrester-WMF subscribed.

Declining this task, as we have just now dropped the never-finished "Labs" publish and preview features from WikiEditor (and they will be removed from REL1_31 onwards).