Support » Fixing WordPress » can't search in media library

  • i dont know why, but i cant do searches in the media library i always get

    “No media attachments found.”

    i tried using the title, the filename, wildcards, etc.
    even when i search for pictures that i uploaded 2 minutes ago, nothing.

    my db of images is growing really quick and it’s becoming unmanageable

    any ideas ?

Viewing 15 replies - 1 through 15 (of 16 total)
  • That’s strange. When you navigate to the media library, are the images there at all, and just not showing up in search? Or are they not there at all?

    If the latter, check in settings > Media, where your files are being uploaded, and navigate to this location through your FTP and see if they’re there?

    Yeah, the images are there when i navigate, they are just not showing up in search 🙁

    anyone ? please ? 🙂

    I have this same problem! Say I have the image “taz1.jpg”. Searching for “taz” or even “taz1” returns “No media attachments found.”

    Same problem, first noticed when I was using WP 3.0.3. Just upgraded to 3.0.4 and still not able to search the media library.

    C W (VYSO)

    (@cyril-washbrook)

    I have the same problem: all the images are there, but the search box is non-functional. I haven’t installed any new plugins or anything. It was working fine until very recently, and then the problem just randomly sprung up.

    I’ve also attempted to deactivate/reactivate plugins, just to be sure. But none of them seem to be responsible: even when all the plugins were deactivated, the same failure occurred.

    C W (VYSO)

    (@cyril-washbrook)

    Sorry to double-post but I can’t edit again. I’ve switched to TwentyTen and it turns out it’s specific to my theme. However, I haven’t the foggiest idea how to correct the problem now that I know it’s something to do with the theme…

    EDIT: Gee my face is red. Turns out it was a rogue entry in my functions.php file. 😛

    @cyril Washbrook – What rogue entry was in your functions.php file?
    I’ve just encountered this problem too, and when switched to twentyten it was ok, so I guess it is also something in my theme, but I cannot figure what…

    Any ideas what code can generate this issue?

    Thanks

    Ok, I found the problem in my theme, maybe it might help others, so I post my solution..

    I added a function to limit search results to posts only, by setting the
    $query if is_search..
    So, it has been applied in the admin panel also, and limited the media library search to posts only, and ofcourse there are no posts in the media library, only attachments…
    The solution was to wrap the search limit with an if statement –

    if (!is_admin())	{
    // some code
    }

    is_admin is true on admin panel and false on front end.

    I’ve never posted on here before usually use it more for reference, just wanted to say thankyou to maorb as i have been looking for this exact fix for a while, thought he should receive some credit for it!

    Thank you mcmarti 🙂

    where to put

    if (!is_admin())	{
    // some code
    }

    i got the same error and i dont know how to add it.

    The Hotfix plugin may resolve this issue. Worth a try.

    Portfola

    thank you very much

    !!!!

    😀

    Dean

    (@deanbolton)

    I too have signed up just so I can say… thank you maorb! This has been driving me nuts (for a while). Glad I found this thread and your solution.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘can't search in media library’ is closed to new replies.