We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17412
    • 270 Posts
    Hi.

    I have placed the default "Comments" chunk:

    [!Jot? &customfields=`name,email` &subscribe=`1` &pagination=`4` &badwords=`dotNet`!]


    into a category "CommentsOnorNot" and have installed the handy "Create TV-based Chunks" ( http://wiki.modxcms.com/index.php/Create_TV-Based_Chunks )

    So basically in the editor I get a checkbox where I can supposedly turn comments on or off.

    However it doesn’t work! The Jot call passes through unparsed and gets printed into the front end.

    I’m betting this has something to do with the snippet "Chunk List Parser" - but I can’t figure out why Modx wouldn’t parse that Jot call and just let it print into the page in it’s naked glory??

    Can anyone shed any light?

    Thanks
      • 21279
      • 13 Posts
      If have this same problem happening but with [!eForm!].
        • 22303 MODX Staff
        • 10,725 Posts
        It’s likely conflicts between PHx and the core parsing algorithm. Try making the pages uncached and then call the snippets with the standard (cacheable) snippet tags. That may help, but I don’t use PHx, so I do not know the full extent of issues it can cause.
          • 21279
          • 13 Posts
          Hey,

          Thanks for your reply. I don’t have PHx installed either and tried disabling cache on both the snippet and the page but to no avail.. is there and extra function that needs to be called in addition to $modx->getChunk() to render a snippet?

          Cheers,
          Ryan
            • 22303 MODX Staff
            • 10,725 Posts
            No. The parser parses content in a very particular order and attempting to circumvent that process by calling one of it’s methods is likely the reason your content is not getting processed properly already. Is anyone aware of logic in eForm that might be responsible? I’m not familiar with that snippet.

            As for Jot; it does use PHx, and that is still the likely candidate in that case as explored in other threads.
              • 21279
              • 13 Posts
              Ok I’ve done a few more tests and can’t seem to get any snippets contained within one of the category chunks to render. I made a [!myTest!] snippet that is :

              <?php echo "Doink!<br />";?> 


              The output is :
              [!myTest!]

              i.e. not executed just printed.

              I’ve gone over the HOWTO a couple of times and just can’t get it to execute an embedded chunk.

              Any other ideas?

              Ryan
                • 21279
                • 13 Posts
                I just tried a cached call as in [[eForm]]/[[myTest]] , not [!eForm!]/[!myTest!] and finally got it to display.

                Looks like non-chached calls don’t work in this context.??
                  • 22303 MODX Staff
                  • 10,725 Posts
                  Quote from: neubreed at Aug 08, 2007, 07:13 PM

                  I just tried a cached call as in [[eForm]]/[[myTest]] , not [!eForm!]/[!myTest!] and finally got it to display.

                  Looks like non-chached calls don’t work in this context.??
                  Quote from: OpenGeek at Aug 06, 2007, 08:32 AM

                  Try making the pages uncached and then call the snippets with the standard (cacheable) snippet tags.
                  As I hinted to before, in this case, since non-cacheable snippets are executed last, you are simply running out of parser iterations, or so it seems. I’ll try and find some time to dig into this case to uncover the issue.