We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    I’m wondering about the mechanism for publishing resources on their publication date (and unpublication as well). It appears to be done in the cache manager when the cache is cleared, but does that execute often enough to be sure a site visitor will get to see the file on time or that a document will be gone when the unpub date is hit?

    It looks like OnDocPublished and OnDocUnpublished do not fire when a resource hits its publication date, but only whan a user manually checks or unchecks the published box and saves. Is that correct?

      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
      • 21257 MODX Staff
      • 730 Posts
      In Evolution, the file assets/cache/sitePublishing.idx.php keeps track of the next publishing "event". Any time a publish/unpublish date is changed, this file is updated. This file is consulted when $modx::executeParser calls $modx::checkPublishStatus.

      You are correct that there are no events fired when $modx::checkPublishStatus runs and updates the publishing status of a resource.
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 3749
        • 24,544 Posts
        Quote from: netProphET at Oct 13, 2009, 09:26 AM

        In Evolution, the file assets/cache/sitePublishing.idx.php keeps track of the next publishing "event". Any time a publish/unpublish date is changed, this file is updated. This file is consulted when $modx::executeParser calls $modx::checkPublishStatus.

        You are correct that there are no events fired when $modx::checkPublishStatus runs and updates the publishing status of a resource.

        Thanks. I wonder if any documents would ever be published on their scheduled dates if the global cache were turned off.
          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