I’m experiencing the well-known problem with no images showing when clicking Add Media in a post/page/whatever, despite a media library full of images. I’ve been trying to solve the challenge for days now, trying out all sorts of things that worked for others (listed for reference in the end of this post), and have narrowed it down to ACF, as the bug disappears when deactivating ACF. After digging through with Figurebug for a chunk of time, I found this difference between ACF activated (no images showing) and deactivated (images showing):
So two things to notice:
* the content of the response tab is quite different, mainly because on the left hand side there is a number of errors, and
* no JSON tab! (likely due to the errors I think, but I dunno)
This is the error in the response tab:
“Notice: Uninitialized string offset: 0 in D:\Web Dev\forgedaxes.com\wp-content\plugins\advanced-custom-fields\core\fields\image.php on line 399”
It occurs 5 times in total, pointing to line 399, 400, 401 and 402 (the latter twice) in image.php
Here is a dump of the whole thing: https://dl.dropboxusercontent.com/u/1987391/acf_bug.html
It seems that I’m on the right path to solving this issue (which might be something in ACF that’;d be good to resolve, who knows), but I have no clue where to go from here and now I need help. Hope someone out there can! 🙂
For reference, things I tried as well:
* disable all plugins, themes etc. Again, narrowed down to ACF – disabling it makes the images show as intended.
* setting debugmode to true in wp-config. No errors showing.
* using devtools in chrome, and checking the console for errors. http://support.advancedcustomfields.com/forums/topic/add-image-button-not-working-jsinput-php-404-403-error/ (no dice, I do have some 403 errors on the theme of the site, but they also occur when ACF is disabled and images show correctly)
* The param type thing, http://wordpress.org/support/topic/plugin-advanced-custom-fields-empty-media-library (I have no taxonomy called type).
Thanks for all the info. Looks like ACF is expecting a value to be found in an array but for some reason, this is triggering an offset error.
I’ll add in some logic to test the value and fix this.
I’ll add it to the to-do and let you know what I find.
Awesome Elliot, that sounds good. Looking forward to resolving it!
Appreciate your quick reply.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Considering recording another "Building a Custom x Block in y minutes with ACF” screencast.— Advanced Custom Fields (@wp_acf) February 26, 2020
🗣 What type of block would be of interest to you?
© 2020 Advanced Custom Fields. Subscribe