Bug #335


Link attribute on images is stripped when MW pages are edited

Added by Matt Gold about 12 years ago. Updated over 6 years ago.

Priority name:
Category name:
Target version:
Start date:
Due date:
% Done:


Estimated time:
Deployment actions:


Scott reports the following bug while editing pages on our wiki for the CUNYDHI initiative:

I put in the “Hello” image on each page of the DHI project but noticed something strange, I think caused by the FCKEditor.
My code is: [[Image:dhiMenu.jpg|right|link=The_CUNY_Digital_Humanities_Resource_Guide]] which works fine. User can click on the image and is taken to the main menu. However, when the page is edited, the link gets stripped out to this: [[Image:dhiMenu.jpg|right]] I might be wrong to blame the editor, but you can almost see it on the screen, although it happens really quickly.

I just tried editing a page and didn't run into this problem, but i have FCK editor turned off, which corroborates Scott's suspicion that this has something to do with the FCK Editor. What are your thoughts on this? I'd tell Scott to turn off FCK, but we can't really ask users to do that.

Actions #1

Updated by Boone Gorges about 12 years ago

I can't reproduce the problem. Can you give a link to the specific page where it happens?

Actions #2

Updated by scott voth about 12 years ago

Hi I was having the issue on all pages tagged cunydhi with the image dhiMenu.jpg. I wonder if Matts inclusion of clear=all within the br tag might fix it. I'm aT work now and can't test it until tonight.

Actions #3

Updated by Boone Gorges about 12 years ago

  • Subject changed from Editing problem on MediaWiki to Link attribute on images is stripped when MW pages are edited
Actions #4

Updated by Boone Gorges about 12 years ago

  • Target version set to 1.0.3

I was able to reproduce the following: when entering


and saving, then returning to the edit screen, tag has been reduced to
[ [Image:dhiMenu.jpg|right]]

(minus the space in the first two brackets, which is needed to keep redmine from rendering it)

Does that jibe with what you're seeing?

Actions #5

Updated by Boone Gorges about 12 years ago

  • Target version changed from 1.0.3 to Future release

I messed with this for a while (including #337, which upgrades FCKeditor) and it looks like FCKeditor just doesn't support the link attribute on Image tags. I combed through to see how hard it would be to add it, and it looks like it's going to be pretty complicated.

My thought is that any user savvy enough to make an image into a link (something unavailable in the visual editor) will be savvy enough to use WikiText markup for this kind of purpose. In other words, it's only a big problem in a relative edge case. For that reason I'd like to bump this to Future Release, hope either that future upgrades to MW/FCKeditor fix the problem or that I get time after the next big release to tear apart the extension and patch it myself.

Actions #6

Updated by Matt Gold about 12 years ago

I agree with your assessment, but I do want to note that I don't think there is an easy way for members to go back and forth on the wiki from the WYSIWYG to the plain-text editor. That setting used to be available by viewing one's profile settings for MediaWikil, but we removed it because it was potentially confusing for people to see separate account settings for the wiki, in addition to their WP/BP profiles.

If I remember correctly, there is a "Disable Rich Text Editor" link underneath the WYSIWYG editor, but once it is removed, there is no easy way to turn it back on. Cause, perhaps, for a separate ticket.

Actions #7

Updated by Boone Gorges over 6 years ago

  • Status changed from Assigned to Rejected
  • Target version deleted (Future release)

See #4140.


Also available in: Atom PDF