We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4310
    • 2,310 Posts
    I’ve looked at a couple of site DB’s and they have the demo content with publishedon set to 0 and a few other pages created using non standard methods also set to 0.
      • 30765
      • 66 Posts
      Quote from: dev_cw at Nov 15, 2008, 03:55 PM

      I think that if you install the demo site there will be some documents with 0 set for publishedon. This may be causing some confusion.

      No, it happens with new pages too. You can reproduce it like this:

      • Publish a page, and publishedon will be set. pub_date will be 0.
      • Set a page to be published one minute in the future, and publishedon will be 0. pub_date will be now() + 60.

      This is on a vanilla 0.9.6.2 install.

      (The issue is that there is no single field that says when a document’s publication time is. It won’t matter if you always publish a document the same way, but for the rest of us it’s impossible to do things like, say, sort a Ditto collection by publication date.)

      This has been brought up several times and there are plugin workarounds for it. Still, it would be nice to see a consistent approach in Revolution. Say, publishedon set to be when a decision was made to publish, and pub_date to be the date when the document should actually be published. That seems to be closest to what the current intention is.

      (Er ... I haven’t checked the behaviour in Revolution though, perhaps it’s already improved.)

      Cheers
      Matt

        • 7231
        • 4,205 Posts
        Set a page to be published one minute in the future, and publishedon will be 0. pub_date will be now() + 60.
        But if you visit the front end after the minute and the document gets triggered to be published it will no longer be 0 and will be the time that the publish event was actually triggered (for pub_date and publishedon to be the same you would need to run a cron trigger every minute to cause modx to publish the event on the exact time). At least this is my impression during limited testing. wink
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 30765
          • 66 Posts
          Quote from: dev_cw at Nov 16, 2008, 06:04 AM
          But if you visit the front end after the minute and the document gets triggered to be published it will no longer be 0

          Interesting, I hadn’t realised that. Thanks!

          Quote from: dev_cw at Nov 16, 2008, 06:04 AM
          (for pub_date and publishedon to be the same you would need to run a cron trigger every minute to cause modx to publish the event on the exact time).

          Well, not really. When the publishing event happens, publishedon could be set to the value of pub_date, not the current time.

          It does have a real-world implication: if you set two documents to be published in the future at slightly different times, and both actually get published at the same time, then they might not be in the order you want (since they have the same publishedon time). We commonly do that to publish two documents at together but give the better article more prominence.

          It’s all a bit of a moot point for me, since I’m happy using a plugin to set both publishedon and pub_date, but I know from experience this is confusing for new arrivals.

          Cheers
          Matt
            • 7231
            • 4,205 Posts
            Quote from: tuatara at Nov 16, 2008, 12:44 PM

            Well, not really. When the publishing event happens, publishedon could be set to the value of pub_date, not the current time.

            It does have a real-world implication: if you set two documents to be published in the future at slightly different times, and both actually get published at the same time, then they might not be in the order you want (since they have the same publishedon time). We commonly do that to publish two documents at together but give the better article more prominence.

            It’s all a bit of a moot point for me, since I’m happy using a plugin to set both publishedon and pub_date, but I know from experience this is confusing for new arrivals.
            Good points. I will be happy with your plugin as well. Maybe a Jyra to get the bahavior changed so that if a document has a pub_date that the publishedon be set to the same as the pub_date rather than now. This would make publishedon more useful IMO.

            Interesting discussion grin
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]