• Hey, I’m not sure if this is intended behaviour or a bug or just annoying.

    If you upload an image to a post that hasn’t been saved with a title yet the image is not attached to the post.

    I did a test where I uploaded an image before anything else, uploaded image after entering a title, uploaded after entering title and clicking in the post textarea and uploaded after writing post text, but not entering a title…

    Only in the instance when the post title was entered and after clicking in the post textarea (which triggers an autosave) was the uploaded image attached to that post.

    I don’t think this happened in previous versions of WordPress because I’ve never had the problem before, but its possible that I’ve suddenly changed my habits and when posting to a photoblog uploading it is the first thing I think to do… whatever it is it’s a bit annoying.

    I can change my order of operation if I really need to, but it seems to me that entering any content, whether it be image, title or post content should trigger an autosave, thus making the post ID available for the image uploader to attach the image to that post.

    Any thoughts, opinions or insight into this?

Viewing 11 replies - 16 through 26 (of 26 total)
  • Thread Starter kristarella

    (@kristarella)

    @t310s_

    Again, i’m trying to not offend someone, simply pointing out how what is being described could be interpreted as normal operation. I appreciate my responses could come across as “blunt”, but please don’t be offended…

    Yes, as I’ve thought about it, it makes a bit of sense. Although I find it odd that certain activites trigger the draft to save, but clicking on the upload button is not one of those things.

    I originally created this thread because it struck me as odd that my photos were only getting attached to the post sometimes and in the last 3 years of using WordPress I’d never noticed such a problem. It turns out that this behaviour only presented itself in 2.8. So I could have been uploading images before adding title or content previously and they were attaching themselves to the post, thus my confusion when they stopped.

    If your recent tests result in the image being attached to the post, then perhaps this behaviour has been changed again in 2.8.1 or 2.8.2. Will look into it.

    @everyone annoyed by the behaviour
    There is a post that might help WordPress Gallery New Post Ghost Bug

    I don’t personally use a whole lot of images, nor tend to create posts that have an imagery focus, so i’ve not come across it before, though i can appreciate a change in behaviour can be frustrating…

    I hope you find something to resolve your problem in any case… ??

    @kristarella, have you tried the fix from 3dogmedia? did it worked?

    Thread Starter kristarella

    (@kristarella)

    Sorry, haven’t had a chance to try it yet.

    @kristarella, i did it, and it seems to have solved it…

    Thread Starter kristarella

    (@kristarella)

    I just tested the image upload with v2.8.3 and the image was not attached to the post when it was uploaded before anything else on the page was touched, so it seems the behaviour hasn’t changed since 2.8.0…

    I haven’t tried the fix, I think I’ll just remember to tap the post textarea before I upload anything for now, but I’m glad it seems to be working.

    I’m running 2.9.1 & this bug appeared out of no where. One minute the images appeared next to the post and then not!

    Has there been any patch for this from WordPress?

    Thanks,

    Luckie.

    BTW — this bug happens even if you have a POST with a title and an IMAGE with a title & attempt to attach them >> the post + image do not display together.

    Urghhh… so annoying!

    L.

    I am also experiencing this issue. I think it’s theme related, in the functions.php file, because when I switch to a default theme and upload an image and insert it into the post it goes in fine. When I switch to the development theme it won’t.

    How can it be theme related? The frontend has no influence on the back end.
    Just look in the media library and you’ll see that images don’t get attached to posts unless the post has been saved first.
    If you insert the image manually into the post then yes, the image will show up. But it’s not a “child” of the post as it should be when you use a theme that displays attachments automatically.

    Annoys the heck out of me too because I’m so used to finishing everything and THEN pressing the publish button. Now I need to save manually, then upload, then publish.

    Thread Starter kristarella

    (@kristarella)

    There could be themes that have functions that affect the image uploader, but if that’s the problem you’re having, it’s not the same problem this thread is talking about.

    @mores You shouldn’t need to manually save your draft to allow image attachment unless you have autosave turned off. You only need to have triggered an autosave. From what I can tell, adding a title does not trigger an autosave, but clicking in the post writing textarea, or adding categories do.

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Image not attached to post’ is closed to new replies.