Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#318 closed Bug (fixed)

Multiple linked images are getting merged in a single link

Reported by: mprittie@… Owned by: alfonsoml
Priority: Normal Milestone: FCKeditor 2.4.3
Component: General Version: FCKeditor 2.4.1
Keywords: SF IE Confirmed Cc: mprittie@…, caixiaopig@…, ajstovold@…, fredck@…

Description (last modified by alfonsoml)

If two or more images are placed side by side, with nothing in between, and seperate links placed on each image, all images are placed within a single anchor tag.

Example:

HTML desired:

<a href="image1_url"><img src="image1_path" /></a>
<a href="image2_url"><img src="image2_path" /></a>

HTML generated:

<a href="image2_url"><img src="image1_path" /><img src="image2_path" /></a>

Moved from SF:
https://sourceforge.net/tracker/index.php?func=detail&aid=1351651&group_id=75348&atid=543653

Change History (13)

comment:1 Changed 10 years ago by alfonsoml

  • Owner set to alfonsoml
  • Status changed from new to assigned

Forgot to add that this only occurs in IE --- Moved from SF. Original poster: mprittie

comment:2 Changed 10 years ago by alfonsoml

  • Description modified (diff)
  • Reporter changed from alfonsoml to mprittie@…

yes.i also find this error when i upload two images with no seperate. the first images's link which i assgined was lost.

But when you add a word or only a "&nbsp" it has no errors.


Moved from SF. Original poster: caixiaopig

comment:3 Changed 10 years ago by alfonsoml

I just tried it in the demo. I've pasted your code in the source and it worked well.

Is it still an issue? If yes, please provide us the precise steps to reproduce it.

Thanks in advance.


Moved from SF. Original poster: fredck

comment:4 Changed 10 years ago by alfonsoml

Yes, pasting the code in should work fine, this problem occures when using the Link and Image dialogs. Place an image using the Image dialog and then place another image directly next to the first image, without anything seperating them. Next add a link to the first image (everything should look fine in source mode at this point), then add a link to the second image. Once the second link is added, the first anchor is destroyed(or maybe just changed) and both image tags are placed within a single anchor tag. I just tried this in the demo and it is still an issue. Sorry I did not explain the problem more clearly the first time. Thanks Fred.


Moved from SF: Original poster: mprittie

comment:5 Changed 10 years ago by alfonsoml

First,upload a image and assigned a link to that.Then,don't input anything and upload the second,also assigned a link to that.At this time,you could find the first image's link was lost. But,after you upload the first image and then input only one seperate, may be a word or a "&nbsp",the two link will fine.


Moved from SF: Original poster: caixiaopig

comment:6 Changed 10 years ago by alfonsoml

Just to confirm that I too am encountering this problem in IE (but not in Firefox). I'm running v2.2.

Kind regards


Moved from SF: Original poster: ajstovold

comment:7 Changed 10 years ago by alfonsoml

the problem lies in the call to

FCK.ExecuteNamedCommand( 'CreateLink', sTempUrl ) ;

if an image is selected, then IE messes up and joins the new link with the previous one.

start with this html and try to put a link to the second image:

<a href="image1_url"><img alt="" src="/fckeditor/editor/images/smiley/msn/regular_smile.gif" /></a><img alt="" src="/fckeditor/editor/images/smiley/msn/regular_smile.gif" />

the solution seems to be to manually create the link in this case.


Moved from SF: Original poster: alfonsoml

comment:8 Changed 10 years ago by alfonsoml

https://sourceforge.net/tracker/index.php?func=detail&aid=1515031&group_id=75348&atid=543653 has been marked as duplicate of this bug


Moved from SF: Original poster: alfonsoml

comment:9 Changed 10 years ago by alfonsoml

  • Cc mprittie@… caixiaopig@… ajstovold@… fredck@… added
  • Reporter changed from mprittie@… to mprittie@…

comment:10 Changed 10 years ago by alfonsoml

I've commited a fix for this in [233] in my branch as I don't know if this is the right time to add non-critical patches to the trunk.

comment:11 Changed 9 years ago by fredck

  • Milestone set to FCKeditor 2.5

Ok to move this one to trunk if you feel that the fix is good (and it seams to be).

We'll be now working on trunk to version 2.5. Any change for a possible 2.4.2 will be picked one by one from the trunk to the relative 2.3.x branch.

comment:12 Changed 9 years ago by alfonsoml

  • Resolution set to fixed
  • Status changed from assigned to closed

Ok, landed on trunk in [237].

Shouldn't the 2.4.2 version be released ASAP as the BOM problem is creating lots of confusion for the PHP people?

comment:13 Changed 9 years ago by fredck

  • Milestone changed from FCKeditor 2.5 to FCKeditor 2.4.3
Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy