Extension talk:WYSIWYG

About this board


Adding unwanted div class "mw-parser-output" in MediaWiki v1.30

4
Acezz67 (talkcontribs)

Hi, since I installed WYISWYG extension on my mediawiki, each time I try to edit an article it creates a new div class: <div class="mw-parser-output">. If I want to edit again, it just keep adding new <div class="mw-parser-output"> in a row.

How to prevent WYSIWYG from doing this?

192.107.155.4 (talkcontribs)

This is due to the Parser::parse() function being called. In MediaWiki v. 1.30 the default is to append a <div class="mw-parser-output"> ... </div> whenever it's done.

A workaround (that appears to work, but I have no idea if there are side effects, so there's no guarantees) is to edit the file at includes/parser/ParserOptions.php to always set 'wrapclass' to false. There are two places to do so. At approximately line 790 and line 1060. I would suggest copying the line and commenting it out (by preceding the line with //) just in case it needs to be reverted.

192.107.155.4 (talkcontribs)

Specifically the issue appears to be with the second new feature noted here: MediaWiki 1.30/zh

Riparap (talkcontribs)

This has been fixed in Version 1.5.6_0 [B551+19.05.2018].

Reply to "Adding unwanted div class "mw-parser-output" in MediaWiki v1.30"

[fixed] duplicating link [edit] and table of content after save page

4
WeekThor (talkcontribs)

When editing a page in the form, a TOC and links [edit] after the headers appear. After saving the TOC and links [edit] are duplicated.


MediaWiki: 1.34.0

WikiEditor: 0.5.0

WYSIWYG: 1.5.6_0 [B551+18.09.2018]

CKEditor: 4.6.2 (revision 20af917)


WeekThor (talkcontribs)

https://imgur com/a/ tEvNBk9 (i can add link...)

WeekThor (talkcontribs)

I fix it by replacing in the file extensions/WYSIWYG/CKeditorParser.body.php:

from

$parserOutput->getText(array()

to

$parserOutput->getText(array('allowTOC'=>false,'enableSectionEditLinks'=>false))

on lines: 1201,1202,1224,1236,1240,1246,1255,1262,1271,1275,1276,1277,1280,1282,1286 (all matches)

Drumst (talkcontribs)

typo correction: replace (all 15 matches)

from

$parserOutput->getText()

But thank you very much for this solution!

Reply to "[fixed] duplicating link [edit] and table of content after save page"
Schwartzray (talkcontribs)

Will this work with windows? Our IT department does not support Linux.


Reply to "Windows functionality"

Editing the Templates in WYSIWYG

1
Snkennedy3327 (talkcontribs)

Is it possible to edit/add to the Templates -- Image and Title, Strange Template, Text and Table. I can't seem to find any info on this.

Reply to "Editing the Templates in WYSIWYG"

Editor not working with MediaWiki 1.33?

2
91.249.165.178 (talkcontribs)

When i install the Editor, it shows a error message when i try to open the wiki (directly at the mainpage, the wiki is completely out of order).


180.149.192.135 (talkcontribs)

got it working by following below thread, hope it helps I am on mediawiki 1.33.1

github.com/Mediawiki-wysiwyg/WYSIWYG-CKeditor/issues/122

Reply to "Editor not working with MediaWiki 1.33?"

Doesn't seem to work with MW1.32.0

3
BitSprocket (talkcontribs)

Hi all,

Probably made a mistake here but I went ahead and upgraded MW to the latest version. I just tried to install WYSIWYG and it's not displaying the toolbar at all. Is this known to be a problem and can I provide any logs -etc to help troubleshoot?


Looking forward!


Riparap (talkcontribs)

I have not tested wysiwyg with MW1.32. Most like MediaWiki has been changed so that some deprecated things which wysiwyg is still using are not available anymore. If this is the case it can not be fixed by setup definitions, it will require modifications in code.

Kghbln (talkcontribs)

Ok, updated the info box that it does not work.

Reply to "Doesn't seem to work with MW1.32.0"

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

Buggy with Extension:DynamicPageList3

1
82.143.89.74 (talkcontribs)

I can actually see the list its results in the readonly page, but when editting it shows nothing at all, not even the code that was entered to create the list in the first place.

Anyone have an idea?

Reply to "Buggy with Extension:DynamicPageList3"

Thumbnails get mangled after showing preview and/or saving page.

6
69.55.70.36 (talkcontribs)

Hi,

When editing existing pages that have images that are bracketed for thumbnails, the editor will add brackets on each save that makes them unusable. An example is: [File:NameOfFile|Picture.png|800px] ... then it adds more brackets and [1]. How can we prevent this from happening? I looked around to see if there's any fixes for it but I didn't see anything.

Thanks!

Riparap (talkcontribs)

Your example [File:NameOfFile|Picture.png|800px] is little confusing to me because in my fresh installation of MW 1.31, that format is not recognized at all by MW. Could you point what situation of this page are you referring to with that syntax?

If I use this syntax [[File:NameOfFile|Picture.png|800px]], I can not reproduce your issue in my MW 1.31 with Wysiwyg 1.5.6_0 [B551-01.07.2018]. It hadles the syntax corretly.

Does it work similarly with different browsers (IE, FF, Chrome) ?

69.55.70.36 (talkcontribs)

Interesting, it might have been an older format from pre 1.29 or something. Thanks for looking into this. It does happen on a variety of browsers. I will see if an older page with two brackets will work fine.

69.55.70.36 (talkcontribs)

Just tried it again, it looks correct in the WYSIWIG editor but once I save it it breaks all the images.

69.55.70.36 (talkcontribs)

It converts Image: to File:

69.55.70.36 (talkcontribs)

For posterity sake, we figured out the issue that was specific to our wiki. It turns out that we had a URI setting to convert File: syntax to file:// which of course broke things. Removing this fixed everything and we're now happy with the extension!

Reply to "Thumbnails get mangled after showing preview and/or saving page."

Bug with division text format and line breaks

2
Vifsorbier (talkcontribs)

I'm using WYSIWYG #6 along with MW 1.31 (see exact specifications at the end of this post)

it works well except one little annoying bug :

When I want to edit a page the blocs containing text in the Division text format are switched to Normal text format and it looses line breaks

See those two pictures to illustrate the problem

Picture for step 1

Picture for step 2


This bug is even more annoying since when creating a new page it's the Division text format which is used by default.

I tried to tweak CKeditor config.js file to remove Division text format but without success.

I didn't find any instructions about how to make Normal text format the default text format used instead of Division text format, please tell me if you know how to do this.


Also this bug messes up pages I created with MW 1.30 and an older version of WISIWYG extension (I installed it around february 2018)

I exported those pages and imported them to the new wiki.

Those pages contain lots of layered div blocks and when I try to edit those pages all div blocks are merged into one, losing line breaks.

I found a workaround by using the Remove Format button, it seems like by doing that the div blocks are stuck and will not be merged into one even when saving changes. By looking closer I understood that this trick converts all the <div class="mw-parser-output"> elements into simple <div> elements.

It's not a very elegant solution but it's handy enough for me.


I copy-paste here more detailed infos about what is installed on my mediawiki
MediaWiki     1.31.1

PHP     7.3.0 (fpm-fcgi)

MySQL     5.7.23-23-log

ICU     57.1

WikiEditor    0.5.1

WYSIWYG editor    Wysiwyg 1.5.6_0 [B551+18.09.2018], CKEditor 4.6.2 (revision 20af917)
Vifsorbier (talkcontribs)

I almost forgot to search logs for errors

Here is what I got when I turn on displaying PHP errors and trying to edit a page

Notice: Undefined property: CKeditorEditPage::$isCssJsSubpage in /srv/data/web/vhosts/wiki.lapoitavelo.fr/htdocs/extensions/WYSIWYG/CKeditorEditPage.body.php on line 35

Warning: Parameter 1 to CKeditor_MediaWiki::onEditPageBeforePreviewText() expected to be a reference, value given in /srv/data/web/vhosts/wiki.lapoitavelo.fr/htdocs/includes/Hooks.php on line 177

Warning: Parameter 1 to CKeditor_MediaWiki::onEditPagePreviewTextEnd() expected to be a reference, value given in /srv/data/web/vhosts/wiki.lapoitavelo.fr/htdocs/includes/Hooks.php on line 177

and here are extracts from the corresponding files (designated lines are in bold)

CKeditorEditPage.body.php function getPreviewText() {

       if( !$this->isCssJsSubpage ) {

           wfRunHooks( 'EditPageBeforePreviewText', array( &$this, $this->previewOnOpen() ) );

           $result = parent::getPreviewText();

           wfRunHooks( 'EditPagePreviewTextEnd', array( &$this, $this->previewOnOpen() ) );

       } else {

           $result = parent::getPreviewText();

       }

       return $result;

   }

Hooks.php

// Call the hook.

       $hook_args = array_merge( $hook, $args );

       return call_user_func_array( $callback, $hook_args );

I also activated SQL errors log but it did not show anything

Reply to "Bug with division text format and line breaks"
Return to "WYSIWYG" page.