• Resolved InformaTiger

    (@informatiger)


    I’m new to wordpress and pods and currently I’m trying to add a kursangebot(course)-pod and a template Kursinformationen for it to display information about the course. One import information of a course is the date when it’s taking place. Because I thought that I will probably need to display date information more often, I created a pod called termin and the template Termininformationen for it. Displaying a sample termin works fine.
    Then I tried to embed it into my Kursinformationen (course-info) template and the following PHP error was displayed to me:

    
    ( ! ) Fatal error: Uncaught Error: Maximum function nesting level of '512' reached, aborting! in C:\wamp64\www\wordpress\wp-includes\class-wp-object-cache.php on line 281
    ( ! ) Error: Maximum function nesting level of '512' reached, aborting! in C:\wamp64\www\wordpress\wp-includes\class-wp-object-cache.php on line 281
    

    I’ve already set up the max nesting level to 512, so I think pods runs in an endless recursion. Any ideas how to fix that?

    My pod templates:
    Termininformationen

    
    <style>
    .tableicon{
    	font-size: 150%;
    }
    </style>
    
    <h2>{@post_title}</h2>
    <table style="margin-left:2em">
    	<tr> <td rowspan="2"><span class="tableicon dashicons dashicons-clock"></span></td> <td><b> Startzeit </b></td> <td>{@startzeit}</td></tr>
    	<tr> <td><b> Endzeit </b></td> <td>{@endzeit}</td></tr>
    	<tr> <td><span class="tableicon dashicons dashicons-location"></span></td> <td><b> Ort </b></td> <td>{@ort}</td></tr> 
    	<tr> <td><span class="tableicon dashicons dashicons-admin-site-alt3"></span></td> <td><b> Meeting </b></td> <td>{@meeting}</td></tr>
    	<tr> <td><span class="tableicon dashicons dashicons-admin-network"></span></td> <td><b> Meeting-Passwort </b></td> <td>{@meeting-passwort}</td></tr>
    	<tr> <td><span class="tableicon dashicons dashicons-phone"></span></td> <td><b> Telefoneinwahl </b></td> <td>{@telefoneinwahl}</td></tr>
    	<tr> <td><span class="tableicon dashicons dashicons-editor-justify"></span></td> <td><b> Mehr Informationen </b></td> <td>{@post_content} </td></tr>
    </table>
    

    Kursinformationen

    
    <b> Lehrer: </b> {@lehrer}
    
    [pods template="Termininformationen" name="termin" id="{@termin.ID}"]
    
    <p>{@post_content} </p>
    

    I tried to debug a bit and changed template="Termininformationen" to field="post_content" which resulted in the same error.
    The funny thing was however, that when I replaced the shortcode with {@termin.post_content} it worked fine, but that isn’t what I want, because I need to embed the termin (date) using the template to display all the custom fields (like start-time, end-time, location, etc.).

    If you need any extra information to help me, please let me know!But I’m afraid I can’t send you a link to my page, since I only host it on my localhost.
    Thank you very much in advance for you answers!

    • This topic was modified 3 years, 11 months ago by InformaTiger.
    • This topic was modified 3 years, 11 months ago by InformaTiger.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @informatiger

    It looks like you are calling the template from within the template. At that point your are infinitely recursing into that template which renders the PHP error.
    Could it be that you’ve enabled auto templates for the kursinformationen?

    In any case, the best way to check is to removing items one by one to see what causes the error.

    Cheers, Jory

    Thread Starter InformaTiger

    (@informatiger)

    Thank you for you fast reply, @keraweb!
    Yes, I’m indeed using the auto template for kursinformationen.
    I tried out to call my template using a shortcode:
    Testpage

    
    [pods shortcodes=1 template="kursinformationen" name="kursangebot" id="222"]
    

    That works fine. But what is actually the difference to when it’s called by auto-template?
    And how can use my template if auto-template doesn’t work?

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @informatiger

    The point is that you cannot use both auto-templates AND add the template shortcode within the post content if you use that same content in the same template.
    You get a traversing loop that won’t end.

    Cheers, Jory

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Nested Templates – Getting ‘Maximum function nesting level reached’ error’ is closed to new replies.