Page MenuHomePhabricator

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


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

Version: unspecified
Severity: enhancement
See Also:



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:10 PM
bzimport added a project: WikiEditor.
bzimport set Reference to bz24041.
bzimport added a subscriber: Unknown Object (MLST).
liangent created this task.Jun 19 2010, 8:26 AM

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

Plese fix it!

(In reply to comment #2)

yes, WikiEditor can't load on any Gadget, only load on

Plese fix it!

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

TheDJ added a comment.Sep 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.

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

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

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

Does the above merge mean the patch is now applied on ?

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.


with... see what I mean.

GOIII added a comment.Aug 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.EditedAug 3 2014, 1:05 PM

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

Copying from :
I was worried that WikiEditor customizations like [ and
] 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.

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?

  • Bug 24713 has been marked as a duplicate of this bug. ***
TheDJ closed this task as Resolved.Nov 27 2018, 9:56 PM
TheDJ claimed this task.

Judging from the comments, this ticket was solved.

WikiEditor is only added to pages that use wikitext content-model, or when explicitly added by other extensions/RL modules

happy5214 moved this task from Backlog to Closed on the WikiEditor board.Aug 4 2019, 11:40 AM