WordPress.org

Ready to get started?Download WordPress

Forums

WP 3.5 removes link URL of images when moving from visual to text editor? (10 posts)

  1. Nadavr
    Member
    Posted 1 year ago #

    Even since I've updated to WP 3.5 I've encountered a problem. If I edit an image while in the visual editor and enter a link URL it works just fine. However, after doing this if I move to the text editor WP 3.5 deletes the link URL for the image and adds   above the image code. Strangely enough this does not seem to affect images I've uploaded before WP 3.5 came along - even if I use the new media uploader to add them to a post or page they don't display this problem. That is why I suspect this has something to do with the new media uploader. I'm using a custom theme I made with the Artisteer software, but I don't really think this is a CSS problem. It most likely has to do with a WP 3.5 PHP file. Has anyone else experienced this glitch?

  2. FCGrabo
    Member
    Posted 1 year ago #

    Yes, I have the same issue with HTML disappearing when going from Visual to text. This happens 100% of the time when the margin is set to 'center.'

    Also, in the Insert Media area, in a field of 25 images, setting the first image to thumbnail, causes all the other images to be set to the same thumbnail format regardless of new setting. Have to delete the code and reinsert.

    Scheduling a post for future publication causes all the video embed codes to go away. I think the WP gurus are aware of this issue and are working on it.

  3. Nadavr
    Member
    Posted 1 year ago #

    I do hope they fix all these problems. Thank you for telling me I'm not alone in this boat :)

  4. Nadavr
    Member
    Posted 1 year ago #

    I did a few checks and it seems that if you choose a picture from the media uploader WP remembers the value input in the Link to Field of the media uploader. In essence that means that if you chose "Link To: None" in the media uploader WP will not allow you to add a link later via the post. It will reset the link to none each time you move from text view to visual view. That pretty much sums up the problem in a more informative way. When I did chose a link via the media uploader it sticked to the image and was not removed. Of course, adding a picture exclusively through the media uploader isn't very convinient...

  5. isonychia
    Member
    Posted 1 year ago #

    Nadavr, can you test something on your end.

    On a new PAGE go to the TEXT editor and add a div. Inside the div add an image. Now go to the visual editor. Click on the image and add a link to another page using the LINK icon in the WYSIWYG toolbar.

    Now hit update. After you hit update click on the image(you should still be in the visual tab) and see if it is still linked. If it's not switch to the TEXT tab and see if it replaced your link with  .

    Thanks,
    iso

  6. Nadavr
    Member
    Posted 1 year ago #

    I tried doing what you asked. After I hit update the image lost its link and a nbsp; line was added before the div tag.

    Just to be clear this is how it looked after I updated and moved to the text editor:
     
    nbsp;
    <div><img alt="" src="http://img.goodsmile.info/cgm/ecommerce/goodsmile/images/large/9ce7c9034ecc7b18703285ee3707502e.jpg" /></div>

    Do note that the nbsp; had an "and" symbol before it in my text editor but for some reason this WP forum does not allow me to write it (it recognize it as html and does not include it in the allowed markup). Also, the image alt element is empty because I didn't bother specifying one in the first place.

  7. seancon1
    Member
    Posted 1 year ago #

    i have found it has something to do with the order in which the alignment and link URL is entered in the image editor. if the alignment is set then the link is entered the editor will wrap the paragraph tag with the href link

    <a href="http://www.domain.com/">
    <p style="text-align: center;"><img class="size-full wp-image-7399 aligncenter" src="/wp-content/uploads/IMAGE.jpg" width="218" height="52" /></p>
    </a>

    and when you switch wordpress cleans up the code and replaces the link with  

    <p style="text-align: center;"><img class="size-full wp-image-7399 aligncenter" src="/wp-content/uploads/IMAGE.jpg" width="218" height="52" /></p>


    [code fixed - please use the code buttons]

    removing the link and replacing it with the  

    if you enter the link update then set alignment it works as expected.

  8. seancon1
    Member
    Posted 1 year ago #

    the fourm deleted some code, it deletes the link and closing tag and replaces it with the non-breaking space

  9. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    This is a known issue and will be fixed in 3.5.1:

    http://core.trac.wordpress.org/ticket/22888

    Also, please use the backticks or code buttons when posting code here per the forum guidelines:
    http://codex.wordpress.org/Forum_Welcome#Posting_Code

  10. seancon1
    Member
    Posted 1 year ago #

    sorry for the code faux pas
    but at least some folks have a solution while waiting for an update !

Topic Closed

This topic has been closed to new replies.

About this Topic