I have reverted back to 5.12.3 as 6.0.2 breaks any get_field calls inside a post call.
‘the_field’ get’s the image ID but get_field presents a error on the page.
<?php if ( have_posts() ): while ( have_posts() ): the_post(); ?>
<?php $image = get_field(‘post_preview_image’); etc etc
<?php endwhile; else: endif; ?>
Hi John I think I’ve found the issue. It’s also happened on another website.
The Image field inside a repeater field no longer has the option for Preview Size in V6.0.2.
Therefore all of my images in repeater fields are breaking.
I’ve also tried exporting my custom fields from V6.0.2 to a lower version 5.11.4 I get the same error.
If I instead just manually input the exact same fields into 5.11.4 they work.
So it seems to possibly be that the option for Preview size not being available breaks it.
So I’ve now found that, that image preview is in the new ‘Presentation’ tab.
However it still breaks the image code that I have always used over 40+ websites.
The break seems to only be on export.
So it may be an export issue.
I’ve tried exporting in V6.0.2 to another site with V6.0.2 and the image fields break.
I’ve tried exporting in V6.0.2 to V5.11 and the image fields break.
If I manually enter the fields as the usually are in V5.11 they work.
If I manually enter the fields in V6.0.2 the image field works.
So it seems to be an export issue with V6.0.2.
I hope that helps.
Ok I think I’ve got it John, it was puzzling me too.
It seems to be an export issue for img fields inside repeaters.
Exporting from one WordPress to a local build.
Same WordPress versions.
The image fields break when:
Exporting in V6.0.2 to V5.11.
Exporting in V6.0.2 to V6.0.2.
I can Export from V6.0.2 into another V6.0.2 then delete the IMG fields only and manually re-add them. This solves the problem.
This issue happens on two different website for me.
Now that I have a solve it doesn’t bother me. I’m sure if you can’t re-create the issue it will be hard to fix.
I have just tried doing an export and import of a field group and the image fields in the repeater continue to work as expected.
You might have something else interfering with it, it could be that this was not a problem before and now it is.
I would start with the basics, deactivating plugins, trying a different theme.
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!