Extension talk:WikiEditor

Jump to: navigation, search

About this board

pre LQT talk on this page (talkcontribs)

My wiki uses media queries to alter the skin for mobile phones. Is there any way to stop this extension from running when the screen resolution is lower than a certain amount? I guess I could use CSS to hide the editor but it's not a great solution.

Whatamidoing (WMF) (talkcontribs)

Have you looked into Extension:MobileFrontend, which I believe has an editing system designed for smaller screens?

Reply to "Disable on mobile skin?"

MW Rel 1.29.0 : bug report : Cancel button does not work properly

Spas.Z.Spasov (talkcontribs)

WikiEditor cancel button (upper right corner) redirects to uri /undefined. Here you are a screen shot.

Could it be fixed in the next release? (talkcontribs)

I see this on my site too. I have temporarily disabled the Publish/Cancel buttons on the upper right. The buttons at the bottom seem to be working just fine. (talkcontribs)

I am using MW 1.29.1, by the way. Still see the issue.

This comment was hidden by Abhidevananda (history)
Abhidevananda (talkcontribs)

Though it's just a temporary and convenient precaution (not a solution), I've disabled just the not-working Cancel button... leaving the still-working Publish button in place... by editing the jquery.wikiEditor.publish.js file in the modules directory to delete (or comment out) the following code:

context.fn.addButton( {

    captionMsg: 'wikieditor-publish-button-cancel',

    action: function () {

        window.location.href = $( '#mw-editform-cancel' ).attr( 'href' );

        return false;


} );

NOTE: This is not a good solution for MW1.29 and MW1.29.1. A better solution is provided below. However, if the WikiEditor extension is not fixed to resolve this problem before the general release of MW1.30, then those with MW1.30 and onward may want to resort to this inadequate fix.

Abhidevananda (talkcontribs)

Problem solved for MW1.29.0 and MW1.29.1

The issue and the workaround are detailed in the MW1.29 release notes. A solution to the problem is found there and also here.

In short, all that you need to do is add the following code in LocalSettings.php.

$wgOOUIEditPage = false;

NOTE: This workaround will only help with the MW1.29 releases. From MW1.30 onward, we are stuck with the red Cancel button (as seen below any edit box on this page) instead of the blue Cancel button from earlier releases (that this fix takes us back to). So the developers of WikiEditor will have to make some change in the extension code to accommodate that. (talkcontribs)

Thanks a bunch, Abhidevananda and others. This worked for me.

Reply to "MW Rel 1.29.0 : bug report : Cancel button does not work properly"

Is the "upload" in "image" tab only available for Wikipedia?

Zoglun (talkcontribs)

I saw same icon in image window, but when I click it in my MW 1.27.1 wiki, it only show you are not login.(Where I am login-ed for sure )

Any other extension or config need to be set to get this function work?

Here is the upload that I mentioned: http://i.imgur.com/0HcDtYB.png

Error example: http://i.imgur.com/D3w6am8.png (talkcontribs)

I was able to make this work for a single user. I have no idea why it's working only for this one..

Reply to "Is the "upload" in "image" tab only available for Wikipedia?"
Summary by Jdforrester (WMF)

Will be fixed in MediaWiki 1.29.1.

Marccreal (talkcontribs)

When clicking on "Embedded file", the "insert file" window pops up. But when I click on "upload" there, the window closes and nothing happens. This problem occurs in my 1.29.0 version, in a separate 1.28.2 installation (on the same server), the upload works fine.

In the browser console, I get the following error (in the 1.28.2 version, I don't get errors):

:Uncaught Error: Windows must have a `name` static property defined.


at OoUiWindowManager.OO.ui.WindowManager.addWindows (load.php?debug=false&lang=en&modules=jquery.accessKeyLabel%2Casync%2CbyteLength%2CbyteLimit%2Ccheck…:537)

    at HTMLDivElement.wikieditor-toolbar-tool-file-upload (load.php?debug=false&lang=en&modules=ext.wikiEditor|ext.wikiEditor.core%2Cdialogs%2Cpreview%2Cpubli…:60)

    at HTMLButtonElement.props.click (load.php?debug=false&lang=en&modules=jquery.ui.button%2Ccore%2Cdialog%2Cdraggable%2Cmouse%2Cpositio…:24)

    at HTMLButtonElement.dispatch (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0ax79ee:65)

    at HTMLButtonElement.elemData.handle (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0ax79ee:60)

Is this a bug in the new version?

Jdforrester (WMF) (talkcontribs)

Hi there, good spot.

This was bug T164999 which we fixed a few hours after the cut for MediaWiki 1.29 and didn't notice, sorry!

I've made https://gerrit.wikimedia.org/r/#/c/366262/ as a backport of the fix, and that should be released in MediaWiki 1.29.1. If it's urgent, you should be able to apply it locally.

Sorry for the issue.

Marccreal (talkcontribs)

Thank you for the quick response! I applied the changes in "mediawiki.Upload.Dialog.js" and now the upload works again.

Customizing the toolbar (loading ext.wikiEditor.toolbar?)

LivioRobaldo (talkcontribs)

I am trying to customize my WikiEditor toolbar (Extension:WikiEditor/Toolbar customization), but I don't manage to add/remove buttons :-(

I'm not sure that I have done the following:

"The module "ext.wikiEditor.toolbar" needs to be loaded."

How can I do? How can I check if ext.wikiEditor.toolbar is properly loaded?

Any help would be highly appreciated.



Reply to "Customizing the toolbar (loading ext.wikiEditor.toolbar?)"
DSwissK (talkcontribs)

When I press on the signature button, I get a "<sig-text>" tag. Any idea how to remove/set it up ?

Thanks !

Whatamidoing (WMF) (talkcontribs)

I think that creating MediaWiki:Sig-text (presumably with ~~~~ and/or whatever text you want to be pasted in when you click that button) would solve your problem.

DSwissK (talkcontribs)

Wow! Easy as 1 2 3. Thanks, you just saved my wiki ! ;)

Whatamidoing (WMF) (talkcontribs)

I'm glad that I could help.

It might not work for people who have set their user interface language to something other than the default. (It might; it might not. I don't know.)

DSwissK (talkcontribs)

The interface language of my wiki is French so I guess it does work.

And, if it can help someone else, I set "$1" on the page content.

Reply to "Signature button"

WikiEditor not appearing? Check mod_pagespeed

Lsilverman (talkcontribs)

Spent a half-day troubleshooting why WikiEditor would not load after upgrading to 1.27. Read through every page of this discussion trying to figure it out.

I finally hit on mod_pagespeed as a culprit. We have mod_pagespeed enabled under apache. We've learned that while a powerful tool, mod_pagespeed causes all kinds of problems. Changes to Mediawiki:Common.css don't take effect, for example. Our solution?

Flush the cache.

We now have a bash script (got this solutions from somewhere else, probably StackOverflow) that we run now whenever we touch something that might be cached (css, js).

1 #!/bin/bash
2 touch `grep "^ *ModPagespeedFileCachePath" /etc/httpd/conf.d/pagespeed.conf | awk ' { print $2; } ' | sed 's/"//g'`/cache.flush

It pulls the location of the mod_pagespeed cache out of the httpd configuration, then touches the cache.flush file, which causes the cache to flush on next page request.

Just flushing the cache caused WikiEditor to magically appear.

Good luck, all!

Reply to "WikiEditor not appearing? Check mod_pagespeed"

WikiEditor.php missing after upgrade

Summary by TheDJ

Use wfLoadExtension( 'WikiEditor' ); in your LocalSettings.php

RobFantini (talkcontribs)

after using this to upgrade 10 minutes ago:

git pull

git submodule update # not sure if needed but I've done for a year

wiki stopped working due to missing WikiEditor.php file in the extenstion folder.

commenting the WikiEditor.php line in LocalSettings.php got around the error. both visual and source editors work per fast testing.

TheDJ (talkcontribs)

You probably have to switch to the wfLoadExtension syntax in your LocalSettings.php. Almost all well maintained current versions of plugins have will now have finished their conversion from the require_once "$IP/extensions/WikiEditor/WikiEditor.php"; strategy to wfLoadExtension( 'WikiEditor' ); (talkcontribs)

hello TheDJ - that fixed the situation. I'll read up on and apply the new method. Thank You.

Toolbar bold/italic buttons have "wrong" appearance

Metalbunny (talkcontribs)

We have a fairly freshly installed LAN-based wiki (so I can't link to it from here) which runs on MW 1.27.1. The two first editor buttons (Bold and Italic) show as A A instead of the normal B I like on other EN-language wikis (no biggie, but confusing nonetheless). I assume this is caused by a configuration setting somewhere, but where and what?

Metalbunny (talkcontribs)

2 secs later someone figured out that the bar gets confused when there are multiple languages set in localsettings. Removing everything but "en" makes it appear correctly. This really needs to be in the documentation.

Whatamidoing (WMF) (talkcontribs)

"A" is the generic, since the "B for Bold" idea doesn't apply to most languages (it'd be "G for Gras" in French, "F for Fett" in German, etc.).

Reply to "Toolbar bold/italic buttons have "wrong" appearance"

preview and change not working on my wiki?

Tetrana (talkcontribs)

I have the latest stable mediawiki (1.24) and the latest stable wikieditor

When I press on "Preview" or "Changes", it does not work, I see the spinning wheel that says "Loading", but it just spins forever and nothing happens?

I disabled those tabs in localsettings for now, but how can I find out whats causing the problem?

GBT248 (talkcontribs)

Same here with fresh install of 1.26. Is there a fix or workaround to use the buttons on top?

(PS: old wiki with 1.23.6 and WikiEditor 0.40 works well) (talkcontribs)

I have this problem with Mediawiki 1.26 and Wiki Editor 0.5. Upgraded to mediawiki 1.28 ad the problem is still there. The preview tab wheel spins forever and looking what is happening in Chrome or Firefox debugging tools there is a 400 error from api.php that stems from the xhr request in load.php:

line 5807: "xhr.send((options.hasContent && options.data) || null);"

Note this only happens if there is some tag within the text such as \<pre\> or \<br\> (talkcontribs)

I have this issue as well, just upgraded to MediaWiki 1.28 and still this problem. How do I post a bug report? (talkcontribs)

I have the same problem with 1.27. I found out the api.php return a message in chrome debugger which said that preview functionality have to open the read permission.

Adding $wgGroupPermissions['*']['read'] = true; 

It's work well for me.

Reply to "preview and change not working on my wiki?"