WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
[resolved] Empty Media Library? (11 posts)

  1. rbrtwhite
    Member
    Posted 1 year ago #

    When I attempt to add an image to an image field, the 'upload from your computer' interface works fine, but the Media Library tab is empty. The total number of images is shown next to All Types | Images ##, but none of the actual images are displayed. Searching, filtering results, or sorting by date makes no difference.

    Does anyone else experience this issue? Any known fixes?

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  2. scottconnerly
    Member
    Posted 1 year ago #

    I am also having this issue.

    I believe it is coming from the link to the media library tab having the type=image in it. It generates a tax_query in the WP_Query which ends up putting a 0 = 1 into the SQL query.

    I'm on WP 3.4.1 and ACF 3.3.9

  3. elliotcondon
    Member
    Plugin Author

    Posted 1 year ago #

    Hey guys,

    Very strange. Out of curiosity, can you click on the default WYSIWYG editor upload media icon? Have a look in the url for the iframe. Does this iframe have the type=image?

    Cheers
    Elliot

  4. scottconnerly
    Member
    Posted 1 year ago #

    Yes, it does.

  5. elliotcondon
    Member
    Plugin Author

    Posted 1 year ago #

    That then suggests that it is not the "type=image" param that is causing the issue.

    This is unexpected behavior for ACF and I would first guess that there is a plugin / theme conflict that is causing the error.

    Have you tried deactivating all plugins / switching themes to see if that works?

    Then you can go through and activate them 1 by 1 until you find the culprit.

    Good luck!

  6. scottconnerly
    Member
    Posted 1 year ago #

    I just deactivated all plugins on the site and then activated ACF. The URL is:

    /wp-admin/media-upload.php?post_id=1698&type=image&acf_type=image&acf_preview_size=thumbnail&tab=library

    type=image is still in there.

  7. elliotcondon
    Member
    Plugin Author

    Posted 1 year ago #

    Hi scottconnerly,

    I don't know why you believe that having "type=image" is an issue. Even without ACF activated, all the media popup urls have "type=image" in it.

    You said it created a tax query. Do you have a taxonomy called type?

  8. scottconnerly
    Member
    Posted 1 year ago #

    Yep.
    You nailed it.
    Thank you, Elliot.

  9. elliotcondon
    Member
    Plugin Author

    Posted 1 year ago #

    Happy to help.

    For anyone else reading this. WP will have query issues if you have a taxonomy called "type". Please rename it to something more unique.

    Cheers
    Elliot

  10. rbrtwhite
    Member
    Posted 1 year ago #

    Thanks Elliot, I also had a taxonomy named 'type'.

  11. sevencolors
    Member
    Posted 1 year ago #

    I have taxonomy's as well and it is causing this issue. None called type tho

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic