Support

Account

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