Page MenuHomePhabricator

[Regression] mediawiki.action.edit.preview is not loaded at Commons despite "Use live preview" (wpuselivepreview) is activated in [[Special:Preferences]]
Closed, ResolvedPublic

Description

Tested with IE 8 and latest RC of FF.

Current behaviour:
When clicking the "preview" or "show diff" button, the page reloads.

Evidence:
...after the DOM is ready...
...executed in JavaScript console...

mw.loader.getState('mediawiki.action.edit.preview');

'registered'

Expected behaviour:
When clicking the "preview" or "show diff" button, live preview just replaces some elements in the DOM. No page reload.

mw.loader.getState('mediawiki.action.edit.preview');

'ready'

How to reproduce:
Set your interface language to de or en, enable "Use live preview" in [[Special:Preferences]], go to a page, edit a section, click preview.

Note:
Using manually
mw.loader.load('mediawiki.action.edit.preview');
works perfectly: After it is loaded, LivePreview works as expected.


Version: 1.20.x
Severity: normal

Details

Reference
bz41267

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:06 AM
bzimport set Reference to bz41267.
Rillke created this task.Oct 22 2012, 9:28 AM

Commons runs 1.21wmf2

Also tested at dw.wp which runs 1.21wmf1 and there it works. So my guess is that the bug slipped-in between the two versions.

Used Vector skin to test

(Regression => keyword code-update-regression)

Reedy added a comment.Oct 22 2012, 4:50 PM

In the 1.20 release-notes:

  • Live preview functionality has been improved and moved into the 'mediawiki.action.edit.preview' module. The old 'mediawiki.legacy.preview' module has been removed.

Looking at core, the only usage of 'mediawiki.action.edit.preview' is in the resource definition

Original commit:
https://github.com/mediawiki/core/commit/4d4bfc27a1bedf6b0d1670707ac812fe36fe85ad

EditPage.php now:

		if ( $wgUser->getOption( 'uselivepreview', false ) ) {
			$wgOut->addModules( 'mediawiki.legacy.preview' );
		}

It got killed by https://github.com/mediawiki/core/commit/bb51a58e575b13eb8b6c496482f7066a7081f676

https://gerrit.wikimedia.org/r/29339

https://bugzilla.wikimedia.org/show_activity.cgi?id=41267

I am confused. Please tell me what is "right" now?

Using [Regression] in bug title or Keyword "code-update-regression" or both?

I guess different people have different habits, so I change my mind and say: Do what you want with the bug subject, but having the keywrod set would be really great." Sorry for any confusion.

(In reply to comment #5)

https://bugzilla.wikimedia.org/show_activity.cgi?id=41267

I am confused. Please tell me what is "right" now?

Using [Regression] in bug title or Keyword "code-update-regression" or both?

They keyword is what counts. The reason various people prefer to (sometimes) include (parts of) keywords or components (e.g. "[Regression]", "VisualEditor: .." etc.) is because most interfaces with bugzilla content lack proper indication of components and tags, so we put them in the subject so that they can be seen directly (e.g. in irc notifications for bug changes and in e-mail notifications[1]).

[1] Yes, for some of the fields there are mail headers sent, but that is only useful for querying e-mails, not when browsing them in any mail applications plain list view.