We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2611
    • 394 Posts
    I’m perplexed...what causes this behaviour?
    Please test this out for yourself...I’m using MODx 2.0.7

    Create a snippet:
    $parsedChunk = $modx->getChunk('testChunk', array('test' => 'w00t'));
    echo $parsedChunk;
    exit();


    Create a chunk:
    [[!vcMoney?input=`3.00`]]<br />
    [[vcMoney?input=`3.00`]]<br />
    [[+test]]


    And call the snippet in some resource:
    [[!testChunk]]


    For me the output is:
    [[!vcMoney?input=`3.00`]]<br />
    [[vcMoney?input=`3.00`]]<br />
    w00t


    My placeholders get parsed...but my snippets do NOT. Also any additional
    chunks added [[$chunk]] do not get parsed unless there is a cached version
    that is also called uncached. (If there’s a cached [[vcMoney]] it will show
    that).

    I cannot remember it EVER working this way...am I going crazy? grin
      Follow me on twitter: @b03tz
      Follow SCHERP Ontwikkeling on twitter: @scherpontwikkel
      CodeMaster
      • 2611
      • 394 Posts
      I think this is server related...it DOES work on a different server...
      But it is still weird because on a 2.0.3 installation this same test
      scenario DOES work on the server where it fails in 2.0.7

      Did something change? What am I missing here...
        Follow me on twitter: @b03tz
        Follow SCHERP Ontwikkeling on twitter: @scherpontwikkel
        CodeMaster
        • 24865
        • 289 Posts
        I’ve tested your scenario:

        Resource (blank template)
        <h1>Snippet output</h1>
        <hr />
        [[!testSnip]]


        testSnip (snippet)
        return $modx->parseChunk('test', array('text' => 'b03tz test scenario.'));


        test (chunk)
        Uncached: [[!fish?fish=`5`]]<br />
        Cached: [[fish?fish=`1337`]]<br />
        Text: "[[+text]]"


        fish (snippet)
        return 'A creek with '.$scriptProperties['fish'].' fish.';


        Final
        Snippet output
        
        Uncached: A creek with 5 fish.
        Cached: A creek with 1337 fish.
        Text: "b03tz test scenario."


        Works like a charm.

        Not to be lost within the larger posts;
        Quote from: b03tz at Feb 17, 2011, 05:23 AM

        I think this is server related...it DOES work on a different server...
        But it is still weird because on a 2.0.3 installation this same test
        scenario DOES work on the server where it fails in 2.0.7

        Did something change? What am I missing here...
          @MarkGHErnst

          Developer at Adwise Internetmarketing, the Netherlands.
          • 2611
          • 394 Posts
          I’m really curious if anyone had this error before. I think it’s server related
          (some path not chmodded right or something).
            Follow me on twitter: @b03tz
            Follow SCHERP Ontwikkeling on twitter: @scherpontwikkel
            CodeMaster
            • 3749
            • 24,544 Posts
            Check the permissions and ownership of the core/cache directory.

            You might also look at the cache system settings.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting