Support Forum
Support › Meta Box Builder › Image Fields Disappear After Update
I'm having an issue with image fields disappearing after selecting an image, then updating the custom post.
https://jam.dev/c/ac41356a-1e54-42f8-9b83-7f2abc4dc190
I've tried making a new field set and attributing it to a new CPT. The behavior persists. Please see the jam video. I've uploaded the jsons here:
https://drive.google.com/file/d/12vCGwjEBfHWvZhmKAyfXSwC8A4ComBxx/view?usp=drive_link
Additional Information:
Wordpress WordPress 6.5.3, MB 5.9.5 and MB AIO 1.25.0 (Bricks, ACSS, Fluent Forms, WPStaging +)
I checked my php.ini and max_input_vars is set to 10000 and max_post_size is 256M, the php version is 8.2. I increased vars to 100000 and size to 512M. I left PHP the same. No changes in behavior.
I was not using sanitation on any of the image fields. Is that required?
Tried a different Field Set**
Image field: For an existing field, I set sanitation to "none". Still the thumbnail does not appear after update on an existing post with existing input.
Image Advanced: I added this field to a different field set and set santiation to "none". The select button does not appear at all!
Staging Site
I set up a staging site, activated twenty-twenty-four theme, and turned off all plugins except for Metabox 5.9.8 and Metabox AIO 1.26.3 (I updated here to see if it was the version I had).
Using the same field set as above**, images are not visible after update on a new post.
Inputs on existing image fields (existing posts) do not show and Add buttons do not appear.
Let me know if you need access to the staging site to look at this issue.
I just realized my first Jam video does not have sound. Here is a new one.
Hello,
Please share your site credentials by submitting this contact form https://metabox.io/contact/
I will take a look.
Peter,
You found the issue:
It arises from the field group "Member Artist Media Fields" that you are using the conditional logic and showing the field in the media modal.
I edit the field group > Settings tab > Disable option "Show in media modal" then the image fields when editing the post work properly.
Bravo! Thank you.
NOTE: When I did have the media modal display option turned on, the fields which were also set to be conditional on a switch (on=show these fields), were not hidden when the switch was off. Whereas, in the edit screen of the media attachment, that conditional switch does work, and it's a better place to clearly see the values anyway; they were jammed into a narrow column in the modal.
Is it a bug that "Show in media modal" causes the condition to fail in the modal?
KC
Yes, there is another issue with the conditional logic in the modal. I've escalated the issue to the development team to fix it also.
Thank you.