[wp-trac] [WordPress Trac] #12315: "Link URL" on uploaded images does not update when saving a post

WordPress Trac wp-trac at lists.automattic.com
Sat Sep 18 08:56:51 UTC 2010


#12315: "Link URL" on uploaded images does not update when saving a post
--------------------------+-------------------------------------------------
 Reporter:  broofa        |        Owner:           
     Type:  defect (bug)  |       Status:  closed   
 Priority:  normal        |    Milestone:           
Component:  Media         |      Version:           
 Severity:  normal        |   Resolution:  duplicate
 Keywords:                |  
--------------------------+-------------------------------------------------
Changes (by joelhardi):

  * status:  reopened => closed
  * resolution:  => duplicate


Comment:

 >Steps to reproduce #12315 on WP 3.0.1: - Create a gallery. - Click "Show"
 on any item in that gallery. - Enter a URL into the "Link URL" field. -
 Click "Save all changes". - Click "Show" on that same item. The "Link URL"
 field will be blank (i.e., the URL was not properly saved).

 > Similarly: - Select "Show" from any item in the Media library. - Enter a
 URL into the "Link URL" field. - Click "Save all changes". - Click "Show"
 on that same item. The "Link URL" field will be blank (i.e., the URL was
 not properly saved).

 I don't think this is a bug, just confusing UI in the "Add Media" control.
 "Link URL" isn't actually a property of the image (or whatever item in the
 media library) -- that link just gets auto-created whenever you click
 "Show". Then, if you want you can edit the URL and click "Insert into
 Post" and a linked image is inserted into the post with your URL in the <a
 href>.

 Clicking "Save all changes" saves the other fields into the wp_posts
 record. It might look like it's supposed to save the Link URL somewhere,
 but as you know, it doesn't.

 Again, Link URL isn't a property of the media item. You can insert the
 media item many times into many posts, and each time choose a different
 link. The Link URL field is there so you can put in the URL you want and
 then click "Insert into Post" to make a link. It's just a tool to make and
 insert a link.

 You may think this is the wrong behavior. I would agree that this
 confusing/annoying, and it confused me the first time I used it. Thinking
 out loud, either:
  * clicking "Save all Changes" '''should''' save the link URL as some kind
 of "default URL" for that item, i.e. into wp_postmeta
 _wp_attachment_metadata (but not insert it into the post), or
  * the UI should be reorganized so that it is obvious that "Save all
 changes" refers to fields in the item record, while Link URL is associated
 with the "Insert into Post" button

 Anyway, either way I suggest you open a new bug/feature request for the
 behavior you want, because this bug is a dupe of #7040 (rel="attachment"
 screws up link URLs '''on saving of the post''' ... nothing to do with the
 Add Media control at all), which has been resolved. So, I'm closing it.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12315#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list