When folks read the Codex. It’s all there for those who want to know.
It’s a bug.
http://core.trac.wordpress.org/ticket/13429
It was reported 22 months ago.
It’s still not fixed.
There’s a workaround:
The bug appears when you insert an image and add an external link.
The link is ‘saved’ to the editor, but then reverts when ‘Update’ is clicked.
The workaround is to remove: rel=”attachment wp-att-999″ from the . Hence, the bug is probably being caused by rel=”attachment wp-att-999 being improperly inserted in the tag when trying to link to an externalI (non-image attachment) URL.
Just did so quite easily, WP3.3.1….
On first add image to Gallery, Click ‘None’ at ‘File URL’ and enter your URL, then insert into post…
(I also made sure to change the ‘Description’ field an filled in all others, in this case to the word ‘Test’)
External Link works…
Now edit post image:
I just made sure I clicked the button ‘Current Link’ at ‘Link URL’ in the image editor before clicking ‘update’
External Link Works…
If I can do this with ease, why is there a ‘bug’ (now)?
It’s a bug because it’s a bug.
Clicking on none, and replacing with ‘www.sample.com’ and then hitting update in the media editor, results in:
<a href="www.sample.com" rel="attachment wp-att-733">
When you then hit update on the post editor, it reverts to:
<a href="http://www.mysite.com/image.jpg/" rel="attachment wp-att-733">
It’s in the code trac as a bug that has been there for 22 months. The behavior is wrongg.
http://core.trac.wordpress.org/ticket/13429
What version of WP are you on? As I noted this does not occur for me…(following my own instructions)
3.3.1
Follow the ordering of what I did (not what you did).
Insert an image.
Then, go back and modify the link…
I did…changed it, then clicked update and updated post…must be your theme?
I agree, this is definitely a bug. I have exactly the problem described as well. If you ‘update’ the update doesn’t take effect.
If you press none, that works OK. But then try linking the image to something again… nope. No cigar.
Please fix this bug, it’s super annoying!
Thanks 🙂