Hello,
Thanks for the feedback!
I tested the code, and it looks like the infinite loop is inside your PHP code (it’s not a HTTP inifinite loop).
Do you have any particular code on hooks like acf/save_post?
Can you please share a screenshot of your Dynamic Form configuration?
Thanks.
Regards.
I have no code yet inserted anywhere. I just started the project.
Do you want me to give you access?
I cannot share a screenshot, there is no image option in this editor.
The custom post type that I use is created with the CPT UI plugin, not with ACFE.
I am using Elementor and I am used with the CPT UI plugin.
Might this be the problem?
Found the problem.
It is a nasty bug caused by both Elementor & YOAST. Here are some explanations: On each new post creation, YOAST check the new post content for their “Link Checker” feature.
When YOAST do that check, it retrieve the post content, but each time the post content is retrieved, Elementor get in the action, and apply all shortcodes (including the Dynamic Form shortcode), which cause an infinite loop because the shortcode create new post on submission…
For people using the both plugins, here is the fix:
In the file: /acf-extended/includes/modules/form/actions/post.php line:300
Add the following code:
add_filter('wpseo_should_index_links', '__return_false');
Right before this part:
$_post_id = wp_insert_post(array( ...
This fix will be included in the next ACF Extended patch. I’m opening a bug report on both Elementor & YOAST repo.
Regards.
Edit:
Elementor bugreport: https://github.com/elementor/elementor/issues/10998
YOAST bugreport: https://github.com/Yoast/wordpress-seo/issues/14643