Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Page MenuHomePhabricator

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

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

Details

Reference
bz24041

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:10 PM
bzimport set Reference to bz24041.
bzimport added a subscriber: Unknown Object (MLST).

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
[[user:YourUserName/common.js]].

Plese fix it!

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

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

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

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

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

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.

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.

(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.

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 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