Archived topic
Image Block not displaying cusom image field
17 replies · Started by Jason on October 4, 2022
Hello. I've run into a strange problem right after updating GP premium and GB pro. I have a content template element for a custom post type that was using an GB image block with dynamic content on. The setting for data source is "current post/post meta/my_custom_field". My custom image field comes from ACF. Everything was working great and then I updated... Any one else experiencing this issue?
For reference, I tried reverting back to an older version of my staging site (before update) and it worked fine, all things the exact same. I also noticed that the dynamic content for container backgrounds still works pulling in the same field. It's only the image block that hates me. Thanks for any help!
Hi Jason,
To test, can you try recreating the GB Image Block with the plugins updated?
Thank you for your quick response. The plugins are updated, and that's what I think caused the problem. Everything on my current site is up to date. I only reverted to the older site to test, and it works fine on the older GP premium and GB pro.
I did attempt to recreate the block after the update, thinking that it may just be a caching thing, but to no avail. Something happened with the update that changed the image block and dynamic data. Am I the only one?
Yes, I believe this is the first ticket we've encountered with such an issue. I also have an Image ACF post meta which is retrieved through a GB Image Block, and the update didn't cause a similar issue.
What if you try to create a new ACF image field, and test if that works?
Can you also provide the link where we should be seeing this Image Block?
I attempted a new ACF image field and display through a new GB image block, but no dice. I've created an access point for someone to take a look. I have 5 custom post types, Artists / Authors / Products / Team Members / Events (happenings). The events post type is brand new, and the other 4 post types are all using an image block on the single page, dynamically pulling from separate image fields. The archive pages display the image from the same field just fine - (they are containers with dynamic background/post meta/custom_field). Everything was working fine... And then. Thank you for any help.
Had the same issue. Changing the image field in ACF to 'Image URL' instead of 'Image array' did the trick for me!
Thank you Bright... At least I know I'm not losing my mind. I'd prefer to use image array from ACF so I can pull in other elements of the image like meta data. But if all fails, then that will be the route I take.
Hi there,
The image array shouldn't actually have been working before. However, we added support for more ACF fields in GBP 1.4, so you can use the image array field. You just need to set the sub-field in the settings so the plugin knows which field to use: https://www.screencast.com/t/pGMsEFCpNs
Let me know if that helps or not :)
Thank you Tom - Sorry, but I cannot find a setting for sub-field in the settings. I may have something configured wrong?
Are you using GB 1.6.0 and GBP 1.4.0?
Yes sir.
If you have time to take a look, I added login creds in an earlier post via PM. It would be super appreciated. For reference - I'm using an ACF field displaying in a content template block element, through a GB pro image block.
For other workarounds, I've created portable hook shortcodes and custom hooks with custom PHP and displayed the custom field that way, but would definitely prefer to cut down on the snippets. I'm just so perplexed because the way I'm trying to do it was working just fine for so long. All of a sudden, nothing. It makes no sense to me. Thanks, again, for any time on this and for the help so far.
Never mind - I think I just figured out the issue with the image array field being displayed through the GB image block. It's defeating the purpose of being able to dynamically pull in data such as alt tags and captions. I'm going with the portable hook shortcode method. That way I can customize what data comes through. Thanks again for your time. Cheers
No problem! We'll take a closer look to see if there's something we can improve here.