Skip to content

Error: [ANTLR_027]: Encountered recursive node without a parent node during processing #28

@chopperoon

Description

@chopperoon

When wrapping the toc tag within any if statement, I'm seeing an error [ANTLR_027]: Encountered recursive node without a parent node during processing, in reference to the {{ *recursive children* }} line. (I need to allow editors to decide if they wish to include the TOC, hence the need for an if statement).)

Here's my test code:

{{ if 2 > 1 }}
    <ol>
    {{ toc field="content" }}
        <li>
            <a href="#{{ toc_id }}">{{ toc_title }}</a>
            {{ if children }}
            <ol>
                {{ *recursive children* }}
            </ol>
            {{ /if }}
        </li>
    {{ /toc }}
    </ol>
{{ /if }}

Aside from this, the add-on is exactly what I need ;)

Do you have any suggestions on how to resolve this? I'm using statamic-toc 1.7 on Statamic 5.69.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions