Opened 12 years ago

Closed 12 years ago

#1293 closed Bug (fixed)

FCKeditor Breaks All Images in MW 1.11.0

Reported by: Stephen R Owned by:
Priority: Must have (possibly next milestone) Milestone:
Component: Project : MediaWiki+FCKeditor Version: SVN (FCKeditor) - Retired
Keywords: Images MediaWiki FCKeditor Cc:

Description

Editing a page will take all images like this: Example.png?

And convert them to this: [[Image:|Image:Stickman_Evolu.png]]

In the process, breaking all the images and replacing them with that string of text above.

This is a critical error! It makes it unusable. We've had to disable FCKeditor on our enterprise wiki. Please help us fix it! It seems like a simple syntactical hack might do the trick.

Attachments (1)

image.html (9.4 KB) - added by barns 12 years ago.
Image dialog with preview patch

Download all attachments as: .zip

Change History (12)

comment:1 Changed 12 years ago by Stephen R

where Example.png = Stickman_Evolu.png...

Forgot to replace everything with Example!

Would love a fix to this! We don't want to downgrade to 1.10.0, the newest version of MediaWiki incorporated hundreds of bug fixes.

comment:2 Changed 12 years ago by barns

Cannot reproduce on MW 1.11 . Could you try and reproduce your issue on the test wiki at: http://mediawiki.fckeditor.net/index.php?title=Sandbox ?

Isn't normal wiki syntax for images [[Image:Example.png]], rather than Example.png? ?

comment:3 Changed 12 years ago by Stephen R

My mistake again, I accidently removed the Image: header. Let me try again.

Given input of: [[Image:DoesNotExist.png]]

[[Image:DoesExist.png]]

If you save it once, it renders accurately. If you edit it a second time with FCKeditor, then save again, it shows this:

Image:DoesNotExist.png [[Image:|Image:DoesExist.png]]

In this case, the first image "placeholder" is still formatted correctly, but the second one is now broken. It renders as raw text. It looks like FCKeditor is adding an additional [[Image:|]] that doesn't need to exist.

comment:4 Changed 12 years ago by Stephen R

The same root cause is causing this error:

http://dev.fckeditor.net/ticket/1045

comment:5 Changed 12 years ago by barns

Could you try my patch ? See ticket 1294, you should only need the makeImage function.

comment:6 Changed 12 years ago by barns

Note: replace the makeImage function in the file by my version.

comment:7 Changed 12 years ago by Stephen R

Wow! That patch worked perfectly, ycombarnous. It even passes the "|modifiers" correctly. Thanks!

This ticket can be closed if his code is incorporated into the SVN.

Changed 12 years ago by barns

Attachment: image.html added

Image dialog with preview patch

comment:8 Changed 12 years ago by barns

Glad this works for you.

If you want to add image preview to your image dialog, copy the file in attachment to this request to the wiki_directory\extensions\FCKeditor\plugins\mediawiki\dialogs folder and overwrite the existing one.

comment:9 Changed 12 years ago by Wiktor Walc

Thanks guys for your feedback.

Could you try the latest SVN version?

comment:10 Changed 12 years ago by Stephen R

Just tried the latest SVN. Works excellently! This ticket can now be closed.

comment:11 Changed 12 years ago by Wiktor Walc

Resolution: fixed
Status: newclosed

I'm glad it works, thanks again for both of you!

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy