Support

Account

Home Forums Front-end Issues have_rows() timing out

Solving

have_rows() timing out

  • If I add the following line in:

    echo have_rows( 'ical_feeds', "user_{$user_id}" ) ;

    then it appears to get stuck, possibly in an infinite loop, resulting in a fatal error:

    Fatal error: Maximum execution time of 180 seconds exceeded

    If I remove this line then the page loads fine. I have varified that $user_id is getting passed correctly.

    Also I have set it to echo just for testing purposes.

    Here’s a screenshot of the Field Group setup: http://bit.ly/39Jh6ec

    I can’t for life of me figure out why this isn’t working, I’ve used this code countless times before and have never seen this behaviour before.

    WP 5.3.2
    ACF 5.8.8

    Anyone have a clue as to what might be happening here and how I can resolve it?

  • Now here’s a strange thing. If I duplicate the repeater and then re-enter the exact values as in the original repeater and change the code so that it uses the duplicated repeater it works fine and doesn’t time out.

  • This line should not cause the issue

    
    echo have_rows( 'ical_feeds', "user_{$user_id}" ) ;
    

    The only reason I can think of that this would be the case is if you called have_rows() this way inside of another have_rows() loop for a different repeater. This might confuse ACF? But I can’t be sure.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.