Jump to content

Topic on Extension talk:WYSIWYG

Cancelling an edit causes a 404 page not found error due to the index dot php being removed from the URL

9
72.37.171.156 (talkcontribs)

When I cancel an edit, the URL drops the index dot php causing a 404 page not found error. This is caused by the extension, and disabling it by commenting out the require once statement resolves the issue. Please advise. Using version 1.20.2 mediawiki.

Ray1again (talkcontribs)

I'm having this problem as well. Does anyone have a suggestion for this, or have a link where we can fix this? MediaWiki version: 1.20.2 PHP version: 5.4.11 MySQL version: 5.5.29

193.54.131.2 (talkcontribs)

I also have exactly the same problem.

Mediawiki: 1.20.4 PHP 5.3.2 MySQL 5.1.67 WYSIWYG extension (version 1.5.6_0 [B551], CKEditor 3.6 (revision 6902))

Is this bug acknowledged and will a fix be released soon?

Regards.

J.

223.27.128.66 (talkcontribs)

Any solution to this cancel edit issue yet, it's annoying due to one small problem i cannot use WYSIWYG editor.

66.7.112.4 (talkcontribs)

Also having this problem. I'm sure somewhere within the WYSIWYG php files or js files the syntax for the link was programmed incorrectly. Searching for it myself, but it would be nice if the developer had a quick fix.

66.7.112.4 (talkcontribs)

Not only does this affect the cancel button, but it affects the EDIT links too. I've noticed that it has taken the index.php?title= and &action=edit out of the URL. I don't think we can get this to work without the developer's help.

109.152.173.135 (talkcontribs)

Yeah I can't get this to work with pretty URLs either. Instead of using index.php?title= or redirecting to /wiki when you click cancel it sticks with /w and gives a 404 page.

12.14.13.130 (talkcontribs)

There are two buggy lines in the CKeditorLinker::removeHook() function which prevent the extension's parse() function from removing its own hooks. This causes the hooks to continue to run and modify links when the rest of the page is rendered, in addition to what's in the WYSIWYG editor. A couple of simple edits in WYSIWYG/CKeditorLinker.php seem to fix the problem. For me, they're lines 48 and 49, but I'll include the whole function here (starting on line 44):

Change this:

     private static function removeHook($hookName, $function) {
             global $wgHooks;
             $hook = $wgHooks[$hookName];
             $i = array_search($function, $hook);
             if ($i) { 
                     $wgHooks[$hookName] = array_splice($hook, $i, 1);
             }
     }

To this:

     private static function removeHook($hookName, $function) {
             global $wgHooks;
             $hook = $wgHooks[$hookName];
             $i = array_search($function, $hook);
             if ($i !== FALSE) { 
                     array_splice($wgHooks[$hookName], $i, 1); 
             }
     }
12.226.154.98 (talkcontribs)

I can confirm the above fix works in 1.21.1, with WYSIWYG version (Version 1.5.6_0 [B551], CKEditor 3.6 (revision 6902)

Reply to "Cancelling an edit causes a 404 page not found error due to the index dot php being removed from the URL"