We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30176
    • 99 Posts
    Hi,
    I have looked for a couple hours on this. On my development machine I use an includeFile snippet for the template. Upon the upgrade to 1.03 from 1.02 I am finding that documents are not caching. If I put the template code into the database it goes back to caching properly. Is there anything that changed that might have affected this and how to correct it? Thank you.

    The snippet I have used is written as:
    <?php
    # Snippet to include files from filesystem
    # [[includeFile? &file=`assets/templates/mytemplate/file.html`]]
    
    if ( !isset($file) || $file== "" ) return "No file specified."; //check if there's a file given.
    
    //Start the buffer
    ob_start();
    
    //include
    include $file;
    
    //get contents from the buffer
    $ob_contents = ob_get_contents();
    
    //and kill/delete the buffer
    ob_end_clean();
    
    //return it to MODx
    return $ob_contents;
    ?>
      "Remember what Bilbo used to say: It's a dangerous business, Frodo, going out your door. You step onto the road, and if you don't keep your feet, there's no knowing where you might be swept off to."
      -J.R.R. Tolkien from The Lord of the Rings
      • 13226
      • 953 Posts
      Hi,

      Try this post
        • 30176
        • 99 Posts
        Thank you iusemodx,

        I thought maybe there was something there and replaced the cache_sync processor with versions 1.0.0. But no luck. It may be useful to know that this occurs on the local setup, but not on the remote one, both IIS, which I have created by copying files and the database from the local one.

        I am on an IIS environment which I know is not well supported here. I faced many challenges getting this up and running on IIS and working well, but did not expect new challenges like this on each upgrade. But code changes are to be expected and IIS is not the environment Modx is developing for.
          "Remember what Bilbo used to say: It's a dangerous business, Frodo, going out your door. You step onto the road, and if you don't keep your feet, there's no knowing where you might be swept off to."
          -J.R.R. Tolkien from The Lord of the Rings
          • 21257 MODX Staff
          • 730 Posts
          FWIW, that’s changing already. Work is being done, from both sides of the picture, to make IIS an even better platform for MODx (both Evo and Revo).
          Check this: http://us1.campaign-archive.com/?u=08b25a8de68a29fe03a483720&id=7ef4b093a9
          and also look for video of Josh’s recent presentation at MODxpo (I’m not exactly sure where.. find AMDbuilder on twitter, he’s been tweeting about video he’s been posting from the conference.)
            Mike Schell
            Lead Developer, MODX Cloud
            Email: [email protected]
            GitHub: https://github.com/netProphET/
            Twitter: @mkschell