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
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
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!
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.
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?
Yep.
You nailed it.
Thank you, Elliot.
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
Thanks Elliot, I also had a taxonomy named ‘type’.
I have taxonomy’s as well and it is causing this issue. None called type tho