We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6228
    • 249 Posts
    I noticed that nested snippets in my recent installation of Evo 1.0.3 are not parsing properly.

    For example, the following call within a chunk:
    [[Wayfinder? &startId=`[!UltimateParent!]` &level=`1`]]


    is returning the following as browser output:
    ` &level=`1`]] 


    I checked my server config, magic quotes are off, although it should not matter in this case. UltimateParent was isolated and returns a valid integer. I cleared my cache, several times, to no avail.

    Am I overanalyzing and goofing on something fundamental?

    -Mike

    PHP 5.2.9 / FreeBSD 6.3 / Apache 2.2 / MySQL 5.0.75
      lo9on.com

      MODx Evolution/Revolution | Remote Desktop Training | Development
      • 6228
      • 249 Posts
      I created a very basic set of snippets, and coded a chunk with one snippet echoing the value of the other.

      These work:
      [[Foo? &value=`[[Bar]]`]]
      [[Foo? &value=`[!Bar!]`]]
      [!Foo? &value=`[[Bar]]`!]
      


      This doesn’t work:
      [!Foo? &value=`[!Bar!]`!]


      When I say doesn’t work, I mean that the chunk outputs nothing. I checked the server error logs, nothing. I checked MODx system logs, nothing.

      Is this typical behaviour?
        lo9on.com

        MODx Evolution/Revolution | Remote Desktop Training | Development
        • 6228
        • 249 Posts
        Well after some testing, I’m going to downgrade back to Evo 1.0.2. I have about a half-dozen sites that I was going to update, but I think I’ll wait until this new release settles in a bit more.

        Snippet calls are not working normally in my installation of Evo 1.0.3.

        I’ll wait to hear from others with similar issues (hopefully not!)

        - Mike
          lo9on.com

          MODx Evolution/Revolution | Remote Desktop Training | Development
          • 10487 MODX Staff
          • 1,535 Posts
          This doesn’t work:
          [!Foo? &value=`[!Bar!]`!]
          That won’t work on any Evo version, it’s a limitation of the document parser in all 09x/Evo versions of MODx - MODx Revolution, on the other hand, does not have these limitations.

          Nesting alternate cached/uncached snippet calls (as per your other examples) is the only way to achieve nested snippet calls for Evo.

          Nothing was changed regarding snippet processing for 1.0.3, so in that respect, 1.0.2 will behave exactly the same as 1.0.3. Just with 1.0.3, you get a bunch of additional bugfixes and security updates - just for the security updates, we recommend everybody update to 1.0.3.
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 6228
            • 249 Posts
            A-ha! I understood the docs as *suggesting* that nested snippet calls should be alternately cached/uncached, but did not realize that it was a requirement.

            Thank you for clarifying. Time to un-downgrade back to 0.3 and crawl under a rock. rolleyes
              lo9on.com

              MODx Evolution/Revolution | Remote Desktop Training | Development