WikiEditor: Don't load the editor for js/css pages (unless CodeEditor is enabled)
OpenPublic

Description

ie. no WikiEditor for all MediaWiki namespace pages for code (js/css).


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=29908
https://bugzilla.wikimedia.org/show_bug.cgi?id=24151

bzimport added a project: WikiEditor.Via ConduitNov 21 2014, 11:10 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz24041.
liangent created this task.Via LegacyJun 19 2010, 8:26 AM
bzimport added a comment.Via ConduitAug 19 2011, 7:12 PM

mhershberger wrote:

Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734

Shizhao added a comment.Via ConduitMay 8 2012, 1:57 PM

yes, WikiEditor can't load on any Gadget, only load on [[user:YourUserName/common.js]].

Plese fix it!

liangent added a comment.Via ConduitMay 8 2012, 3:19 PM

(In reply to comment #2)

yes, WikiEditor can't load on any Gadget, only load on
[[user:YourUserName/common.js]].

Plese fix it!

Restoring original values. Seems you misunderstood the original bug report.

TheDJ added a comment.Via ConduitSep 3 2013, 8:33 AM

We now show the CodeEditor on JS pages, which relies on the WikiEditor. This makes this bug less noticeable in WMF deploys, but it still exists.

gerritbot added a comment.Via ConduitJun 22 2014, 2:36 PM

Change 141296 had a related patch set uploaded by TheDJ:
Only add WikiEditor for content model WikiText

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

gerritbot added a comment.Via ConduitJul 31 2014, 3:51 AM

Change 141296 merged by jenkins-bot:
Only add WikiEditor for content model WikiText

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

GOIII added a comment.Via ConduitAug 3 2014, 7:07 AM

Does the above merge mean the patch is now applied on https://test2.wikipedia.org ?

If so, then I'm guessing the fact the Page: namespace having a content-model of 'proofread-page' screwed something up and the toolbar buttons related to the Page: namespace are no longer coming up.

Compare...

with...

...to see what I mean.

GOIII added a comment.Via ConduitAug 3 2014, 7:18 AM

Scratch Comment 7 - it seems the test2 testbed is not completely configured for the ProofReading extension as a default and the issue lies there. Sorry.

He7d3r added a comment.EditedVia ConduitAug 3 2014, 1:05 PM

(In reply to George Orwell III from comment #7)

Copying from https://gerrit.wikimedia.org/r/#/c/141296/ :
I was worried that WikiEditor customizations like [
https://en.wiktionary.org/wiki/MediaWiki:Gadget-DeveloperEditorTweaks.js and https://github.com/he7d3r/mw-gadget-CodingToolbar
] will stop working in every wiki were CodeEditor is not used (because in this case there will be no WikiEditor on JS pages). Fortunately, I just checked and it won't break as long as the code uses "mw.loader.using( 'ext.wikiEditor.toolbar', ... )" to add WikiEditor before interacting with it.

I think the same applies to the ProofreadPage extension. It seems the extension can force the toolbar to be loaded on any page it wants by just loading the appropriate RL module.

However I think it makes sense to allow extensions to configure the list of content models against which $editPage->contentModel is tested. That is, something like
if ( in_array( $editPage->contentModel, array( CONTENT_MODEL_WIKITEXT, ... ) ) ) {
instead of
if ( $editPage->contentModel !== CONTENT_MODEL_WIKITEXT ) {
where "..." could be set by other extensions which rely on WikiEditor.

Aklapper added a comment.Via ConduitSep 1 2014, 12:43 PM

All patches mentioned in this report were merged or abandoned - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?

Krinkle added a comment.Via ConduitSep 1 2014, 1:44 PM
  • Bug 24713 has been marked as a duplicate of this bug. ***

Add Comment