• Resolved wordpressnetwork

    (@wordpressnetwork)


    Hey,

    I have a strange problem. I have a few thousand images in the media library that are unattached and also have this label in the “uploaded to” column in the list media library view. So WordPress knows they are not linked to anything.

    When I use the filter for unattached images, however, they do not get listed. There must me a problem between the label on the single image itself and some other data.

    The problem I have now is that I can not use a plugin that deletes unattached images – because these seem to work the same as the filter function and do not find the unattached images. I tried five different ones, all with the same problem.

    Any advice on how to fix this? Or where to look?

    Thanks a lot in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    Apparently your theme or a plugin is altering the unattached media query. The unattached filter works as expected on my site. Try deactivating all plugins and switching to a default theme. The filter should work now. Restore your theme and plugins, one at a time, testing after each. When the problem recurs, the last activated module is the cause. Take up the issue through its dedicated support channel.

    Thread Starter wordpressnetwork

    (@wordpressnetwork)

    Thanks for your tips!

    Unfortunately the error persists. So it is not theme nor plugins. I also realized that newer unattached images get filtered correctly. Something had gone wrong in the past with the other pictures I guess.

    Is there some plugin that could fix that or maybe more broadly fix the database? Anything you could recommend?

    Thanks a lot

    Moderator bcworkz

    (@bcworkz)

    If newer images filter correctly, then something is wrong with older image attachment data. In order to fix it, you’d need to know what’s wrong with it.

    The only thing that should matter for the unattached query to work is where wp_posts.post_parent = 0. But for images to show as unattached in the list table, the same should also be true. I’m afraid determining what’s wrong with older image attachments might not be that simple.

    Using the phpMyAdmin app, try comparing all attachment post data related to both a newer and older unattached image. Aside from obvious differences like file name and image size, determine what is different between the two. Check both the post records themselves and their related meta data.

    Thread Starter wordpressnetwork

    (@wordpressnetwork)

    That is a very good hint. I will read into that and try.

    Thank you very much for giving me the right direction in this strange topic. Much appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.