Home Forums Backend Issues (wp-admin) Add Media -> no images shown. Traced to something with image.php in ACF


Add Media -> no images shown. Traced to something with image.php in ACF

  • Hey there!

    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\\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:

    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. (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, (I have no taxonomy called type).

  • Hi @flyvendehest

    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.


Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Add Media -> no images shown. Traced to something with image.php in ACF’ is closed to new replies.