Topic on Extension talk:WYSIWYG

Jump to navigation Jump to search

WYSIWYG window doesn't show up.

13
Manu3d (talkcontribs)

Hi @Riparap, I have installed Bundle #6 on

MediaWiki 1.26.2
PHP 5.5.38 (cgi-fcgi)
MySQL 5.5.52-cll-lve
Apache 2.4.10

I think I followed all the instructions, inclusive of editing of LocalSettings.php, but when I try to enable the rich editor no toolbars nor text area is visible: by using Chrome's developer tools they appear to be collapsed.

I also tried to enable the toggle but it eventually gets stuck on Show RichTextEditor and doesn't solve the problem above.

In some circumstances (depending on the preferences I set) the text area (but not toolbars) appears for a moment on screen, and I can see html text in it. But eventually it disappears/collapses.

Any lead on how to fix this?

Riparap (talkcontribs)

There are version 1.5.6_0 [B551+09.02.2017] in branch wysiwyg_mw128 and same version in branch wysiwyg_mw128_462 which contains updated CKeditor 4.6.2.

What version of wysiwyg are you trying to use?

You can also try to check php error log and/or browser console for possible errors. I suspect that problem may be with your LocaSettings.php file.

Manu3d (talkcontribs)

Hi @Riparap, and thank you for your prompt reply.

According to the versions page I have Wysiwyg 1.5.6_0 [B551+09.02.2017], CKEditor 4.5.9 (revision a35abfe)

Sounds like I should use 4.6.2? I didn't even notice it as an option. I guess I didn't read carefully enough, sorry.

Regarding LocalSettings.php, the lines relevant to WYSIWYG are:

wfLoadExtension( 'WYSIWYG' ); 
wfLoadExtension( 'WikiEditor' );

# Enables/disables use of WikiEditor by default but still allow users to disable it in preferences
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;

# Displays the Preview and Changes tabs
$wgDefaultUserOptions['wikieditor-preview'] = 0;

# Displays the Publish and Cancel buttons on the top right side
$wgDefaultUserOptions['wikieditor-publish'] = 0;

####</nowiki> WYSIWYG Editor ##### Loaded earlier, configured here.
$wgGroupPermissions['sysop']['wysiwyg'] = true;

$wgDefaultUserOptions['cke_show'] = 'richeditor';    //Enable CKEditor
$wgDefaultUserOptions['riched_use_toggle'] = false;  //Editor can toggle CKEditor/WikiText
$wgDefaultUserOptions['riched_start_disabled'] = false; //Important!!! else bug...
$wgDefaultUserOptions['riched_toggle_remember_state'] = true; //working/bug?
$wgDefaultUserOptions['riched_use_popup'] = false;   //Deprecated

##These are not compatible with WYSIWYG
$wgFCKEditorExcludedNamespaces[] = NS_MEDIAWIKI;
$wgFCKEditorExcludedNamespaces[] = NS_TEMPLATE;

# Setting value of following variables eq. to 1 will cause wikitext text blocks
# within specified tags to be displayed as image- element in wysiwyg mode.
# Value eq. to 0 makes texts inside these tags editable directly as text in wysiwyg mode
# using pre- parent tag + child tag.
$wgFCKEditorSpecialElementWithPreTag   = 0; // 1= <pre> tags with attributes only => img- element
$wgFCKEditorSpecialElementWithTextTags = 0; // 1= <nowiki>, <source> and <syntaxhighlight> tags => img- element

Anything suspicious here?

Manu3d (talkcontribs)

@Riparap?

Riparap (talkcontribs)

I have MW 1.26.2 test installation (centos 6.8, php 5.5.11, mysql 5.6.16) and wysiwyg works there without problems.

I tried your settings in my system, and they seem to be ok. Have you checked browser console log for any errors? Also your www services php_error_log might be worth while to check.

Can you try settings in this way:


require_once( "$IP/extensions/WYSIWYG/WYSIWYG.php" );

#Or only for registered users:
$wgGroupPermissions['registered_users']['wysiwyg']=true;
$wgGroupPermissions['*']['wysiwyg'] = true;          //Everyone can use (if can edit)...
$wgDefaultUserOptions['cke_show'] = 'richeditor';    //Enable CKEditor
$wgDefaultUserOptions['riched_use_toggle'] = false;  //Editor can toggle CKEditor/WikiText
$wgDefaultUserOptions['riched_start_disabled'] = false; //Important!!! else bug...
$wgDefaultUserOptions['riched_toggle_remember_state'] = true; //working/bug?
$wgDefaultUserOptions['riched_use_popup'] = false;   //Deprecated

##These are not compatible with WYSIWYG
$wgFCKEditorExcludedNamespaces[] = NS_MEDIAWIKI;
$wgFCKEditorExcludedNamespaces[] = NS_TEMPLATE;

#WikiEditor may not be compatible with WYSIWYG editor, use it with caution.
#require_once( "$IP/extensions/WikiEditor/WikiEditor.php" );
wfLoadExtension( 'WikiEditor' );

# Enables/disables use of WikiEditor by default but still allow users to disable it in preferences
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;

# Displays the Preview and Changes tabs
$wgDefaultUserOptions['wikieditor-preview'] = 0;

# Displays the Publish and Cancel buttons on the top right side
$wgDefaultUserOptions['wikieditor-publish'] = 0;

#Setting value of following variables eq. to 1 will cause wikitext text blocks
#within specified tags to be displayed as image- element in wysiwyg mode.
#Value eq. to 0 makes texts inside these tags editable directly as text in wysiwyg mode
#using pre- parent tag + child tag.
$wgFCKEditorSpecialElementWithPreTag   = 0; // 1= <pre> tags with attributes only => img- element

$wgFCKEditorSpecialElementWithTextTags = 0; // 1= <nowiki>, <source> and <syntaxhighlight> tags => img- element

You could perhaps also try to create simple page with few text lines only so that you can verify that problem is not with contents of your page which you are trying to open.

Manu3d (talkcontribs)

Thank you @Riparap, I'll try what you suggest and I'll let you know the outcome.

Manu3d (talkcontribs)

Some quick findings: looking through Chrome's developer tool before I toggle the rich editor in the Edit page, I get a warning:

load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=yk8V6aOR:156 Use of "CKEDITOR_BASEPATH" is deprecated. Use mw.config instead.

After I toggle the rich editor I get some potentially interesting errors:

load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:37 GET https://ourdomain.tld/wiki/Test/extensions/WYSIWYG/ckeditor/config.js?t=G4CD append @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:37 appendTo @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:25 t @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:110 load @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:110 a @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:110 CKEDITOR.scriptLoader.queue @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:110 l @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:116 k @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:117 (anonymous) @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:115 (anonymous) @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:12 load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:37 GET https://ourdomain.tld/wiki/Test/extensions/WYSIWYG/ckeditor/lang/en.js?t=G4CD append @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:37 appendTo @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:25 t @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:110 load @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:110 load @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:109 w @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:117 (anonymous) @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:117 b @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:234 loadPart @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:234 q @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:117 (anonymous) @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:117 q @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:3 CKEDITOR.event.CKEDITOR.event.fire @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:4 CKEDITOR.editor.CKEDITOR.editor.fire @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:5 fireOnce @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:4 CKEDITOR.editor.CKEDITOR.editor.fireOnce @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:5 l @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:116 (anonymous) @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:116 callback @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:110 f @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:109 y @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:109 A @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:110 CKEDITOR.env.ie.CKEDITOR.env.version.f.$.onerror @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:110 load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:109

Uncaught TypeError: Cannot set property 'dir' of undefined

   at Object.d (load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:109)
   at f (load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:109)
   at Array.y (load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:109)
   at A (load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:110)
   at HTMLScriptElement.CKEDITOR.env.ie.CKEDITOR.env.version.f.$.onerror (load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:110)

d @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:109 f @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:109 y @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:109 A @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:110 CKEDITOR.env.ie.CKEDITOR.env.version.f.$.onerror @ load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:110 load.php?debug=false&lang=en&modules=ext.CKEDITOR|ext.WYSIWYG.func&skin=vector&version=c049238de9d8:37 GET https://ourdomain.tld/wiki/Test/extensions/WYSIWYG/ckeditor/skins/kama/editor.css?t=G4CD


@Riparap, does this help to narrow down the problem?

Manu3d (talkcontribs)

I also found the following line in the wiki log:

Title::getRestrictionTypes: applicable restrictions to [[Test/extensions/WYSIWYG/ckeditor/skins/kama/editor.css]] are {create}

Which seems perhaps related?

Manu3d (talkcontribs)

And in the access logs I get:

###.###.###.### - - [06/Apr/2017:11:16:14 -0400] "GET /wiki/Test/extensions/WYSIWYG/ckeditor/config.js?t=G4CD HTTP/1.1" 404 20362 "https://ourdomain.tld/wiki/Test/edit" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"

###.###.###.### - - [06/Apr/2017:11:16:15 -0400] "GET /wiki/Test/extensions/WYSIWYG/ckeditor/lang/en.js?t=G4CD HTTP/1.1" 404 20390 "https://ourdomain.tld/wiki/Test/edit" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"

###.###.###.### - - [06/Apr/2017:11:16:15 -0400] "GET /wiki/Test/extensions/WYSIWYG/ckeditor/skins/kama/editor.css?t=G4CD HTTP/1.1" 404 20678 "https://ourdomain.tld/wiki/Test/edit" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"

Notice they are all 404 errors. Presumably because the WYSIWYG extension is not in /wiki/Test/extensions: I don't know where it gets that path. It should be perhaps /w/extensions on our server.

Riparap (talkcontribs)

Does other plugins work in your wiki? ... wysiwyg should be placed in same extensions directory where all other plugins of MW are. Are you sure your LocalSettings.php file does not contain invalid data in some other places. What is value of $wgScriptPath? If you can't get rid of "wiki/Test/....", try to put WYSIWYG in that location of "/wiki/Test/extensions/". I assume this path issue is the main reason why you can not start wysiwyg.

You could also try these lines before starting wysiwyg...

## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
$wgDefaultSkin = "vector";

# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'CologneBlue' );
wfLoadSkin( 'Modern' );
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Vector' );


# Enabled Extensions. Most extensions are enabled by including the base extension file here
# but check specific extension documentation for more details
# The following extensions were automatically enabled:
wfLoadExtension( 'Cite' );
wfLoadExtension( 'Gadgets' );
wfLoadExtension( 'ImageMap' );
wfLoadExtension( 'InputBox' );
wfLoadExtension( 'Interwiki' );
wfLoadExtension( 'LocalisationUpdate' );
wfLoadExtension( 'Nuke' );
wfLoadExtension( 'ParserFunctions' );
wfLoadExtension( 'Poem' );
wfLoadExtension( 'Renameuser' );
wfLoadExtension( 'SpamBlacklist' );
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
wfLoadExtension( 'TitleBlacklist' );

138.246.2.138 (talkcontribs)

@Riparap, i found out, that this error occurs when someone has URL rewrite rule for action "Edit".

I disabled rewrite, and error is gone. Enable - it's back.

146.50.69.166 (talkcontribs)

@Manu3d, Can you please give more detail about the URL rewrite rule by which you solved the problem? I am having the same problem. Thank you very much.


Wertwijn (talkcontribs)

I also have the same problem!


Reply to "WYSIWYG window doesn't show up."