We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34127
    • 135 Posts
    Hi guys! I'm running the 2.2.6-dev release and I wanted to update a package of mine which contains a few templates (among other elements). Basically I've created a package with all of my main templates and elements so that I can build/test locally and then just update the package on the live environment.

    So I've updated the template files in my dev environment, built the updated package and installed it inside MODx, but the templates aren't updated - they still contain the old content! Other elements (like chunks) are updated just fine.

    No errors during install, or in the error log. In the build script, I have the following keys defined for Templates:

    'Templates' => array(
      xPDOTransport::PRESERVE_KEYS => false,
      xPDOTransport::UPDATE_OBJECT => true,
      xPDOTransport::UNIQUE_KEY => 'templatename'
    )


    Any ideas?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Do they actually still contain the original content in the database, or is it just the cache being stubborn?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 34127
        • 135 Posts
        I checked the database and the old content is still in there. Weird, it's just not updating the database content.

        I also double-checked the contents of the package before installing it. The templates are all there with the updated content (and matching names), so they're definitely being packed correctly. The database records just aren't being updated during package installation.
          • 34127
          • 135 Posts
          Any suggestions? Am I missing something in my build script or could this be a issue with Revo?

          I'm pretty sure that this worked in 2.1, I just haven't tested it in 2.2 up until now because I didn't have a reason to bulk-update my templates.

          Should I post this in the bug tracker for the devs to look into?