Home › Forums › Add-ons › Flexible Content Field › Latest version: critical endless loop crashes sites › Reply To: Latest version: critical endless loop crashes sites
Hi @Intervik
Thanks for the post, but I’m quite confused as to what the issue actually is.
You mention at the start that this statement is a raise for concern:
“note: you don’t need to specify the $post_id for any sub field functions”
Where is this statement found, I cant find it…
When looping through a nested has_sub_field function, the $post_id is never needed because it is loading data from the already setup previous loop.
Is this the issue?:
while(has_sub_field('FLEXIBLE_CONTENT_ROOT', $id)){ <-- FAILS SECOND CALL to my_output_html($id)
What is FLEXIBLE_CONTENT_ROOT? Why is ROOT in it’s name. Is this within a repeater or outside a repeater?
You mention that it fails to call my_output_html. But there is no code which runs this in the nested loop…
Also, why do you say:
“CORE: The repeater includes a flexible content setup, and now, somwhere in the chain the global $post ID is re-used.”
I guess there is a lot of information to tell, but please do in a clear and flowing way. The above is more of a mental dump which is very hard to understand what the exact issue is.
Thanks
E
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.