• I have a reproducible problem with the Media Uploader where it screws up the Post URL every time.

    When I upload an image and under the Link URL section I tell it to insert the Post URL, it shows it this way:

    http://www.regrettablemusic.com/?attachment_id=350

    Obviously, when I actually publish the post it’s supposed to insert the correct post URL. However, that’s where it goes wrong. The correct post URL after publishing should be like this:

    http://www.regrettablemusic.com/2008/09/15/cramps/

    But what it’s doing is repeating the post title twice in the URL, like this:

    http://www.regrettablemusic.com/2008/09/15/cramps/cramps/

    Following that incorrect Post URL that WordPress is inserting takes you to page with just a scaled down version of the media attachment.

    This is really annoying to have to publish, and then go back and correct the post URLs on all my inline image links.

    Does anyone have a solution? Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Err.. Actually, that is correct behavior. Attachments get their own post which is a sub-post of the main post.

    In this case, your picture is actually named “cramps.jpg”. That’s where the second “cramps” comes from. The first one comes from the parent post, which you also named “cramps”.

    Basically, your permalink structure is %year%/%month%/%day%/%postname%. The “postname” for the attachment post is “cramps/cramps” because its parent post is “cramps” and its own name is “cramps” as well.

    If your attachment was named “picture” then it would be http://www.regrettablemusic.com/2008/09/15/cramps/picture/.

    Also, that scaled down picture post is the actual attachment post. That is what you are supposed to see when you link to the “Post URL”. If you want to link to the actual image file itself, then use the “File URL”.

    Thread Starter ianesque

    (@ianesque)

    Is there a way to get the Image Uploader to automatically insert the permalink for the parent post itself? That seems a lot more useful to me anyway, frankly.

    Many thanks, Otto, for clarifying!

    -i-

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Media Uploader Inserts Wrong Post URL’ is closed to new replies.