We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14281
    • 120 Posts
    I’ve been thinking quite a bit about the published date (the date that a document actually is published, not the date that it’s scheduled to be published), because it’s very important to me, and that particular feature doesn’t seem to be working quite as it should in the current version.

    Wouldn’t the simplest solution be this? Whenever the document is published, the current timestamp is placed the the pub_date field? I know that this field is for scheduled publishing, but if you are manually publishing the document, it’s pretty obvious that you don’t need this field for that purpose. So this field could be used for both purposes equally without any conflict. I think that’s the way that some other solutions treat these two needs.

    Currently, I’m not sure what indicates the published date, if anything. I used to think that the "publishedby" field did. I know that doesn’t make sense, and it didn’t to me either. That field should be used to indicate who published the document, not when. But I spotted a couple of timestamps in those fields one day as I was perusing the DB, so I started using its value in my templates. Later however, it didn’t seem to be working consistently. Now I’m not even sure it ever worked. These days, the only time it seems to work is when I change the publishedby date using my modification of the Edit Doc Dates module.

    Anyhow, I would just really like to see this working soon. I could fix it myself, but then whatever I did would probably be undone by the next version of MODx, and I really want to keep the technology in my CMS up to date, so I’ve decided to leave it alone.

    Thanks for the listen. smiley
      • 22303 MODX Staff
      • 10,725 Posts
      This is a known issue -- please see http://modxcms.com/bugs/task/406
        • 25663 MODX Staff
        • 12,272 Posts
        Committed in SVN commit # 1106.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 14281
          • 120 Posts
          Wonderful news. I don’t suppose anyone could send me a patch? It’s my understanding that there is not yet public access to the SVN. I would greatly appreciate it.
            • 34162
            • 1 Posts
            I could fix it myself
            If you can fix it: do it. I understand why you don’t want to fix it, i.e. due to backward-compatibility issues.
            But there will be only a backward if a forward has happenend. And nobody knows the date.
            I found your issue quite relevant and interesting, so please: fix it and let me share it.
            The 1.0 release is announced since almost a year, I wouldn’t rely on this, but make the best out of what we have already.
            And this is not my suggestion, but Jason’s (OpenGeek). If needed I figure out the message where he has stated it this way..
            Life goes on, waiting is useless.. grin

            regards, paul
              • 33453
              • 141 Posts
              Quote from: jlivingston at Jul 11, 2006, 05:35 PM

              Wonderful news.  I don’t suppose anyone could send me a patch?  It’s my understanding that there is not yet public access to the SVN.  I would greatly appreciate it.

              I’ve included the fix in my bug report at the above link (second comment down).
                • 4041
                • 788 Posts
                I have some thoughts on this subject and want to know how off base I may be...

                The publishedon and publishedby should be set to time() and author upon document creation and stay the same and never change, regardless if the document is edited or by whom it is edited. The original publish date and author should stay so a refernce to when and by whom the document was created is always available.

                Going along this line of thinking then, in the save.processor file there could be a few changes made:

                If the document is new, the publishedby and publishedon fields are set. The editedon and editedby should be set to zero, and since they are given a default value when the document is created anyway these 2 VALUE fields can be set to ( "", "" ).

                Then a bit further down the file in the edit document ALTER statement you could totally do away with all the code which pertains to publishedon and publishedby. The editedon and editedby are already set here so all bases should be covered.

                smiley

                edit:
                after testing my theory the file I attached works fine and is functional. The areas I changed are commented so you can compare the parts which are altered. Everything gets set correctly in the database and no issues so far...
                  xforum
                  http://frsbuilders.net (under construction) forum for evolution
                  • 14281
                  • 120 Posts
                  I applied zenmaster’s suggested bug fix. Seems to work great. I’ve attached the file for ppaul’s and anyone else’s convenience. This file should replace the file of the same name in:

                  manager/processors/

                  Change the extension to .php first, of course.

                  Regards, and thanks for the help, everyone.
                    • 34162
                    • 1 Posts
                    Thanks! I’ll try it asap.
                      • 7923
                      • 4,213 Posts
                      @breezer and MODx team
                      This should probably be added to the bug tracker? Any team member to comment this?


                        "He can have a lollipop any time he wants to. That's what it means to be a programmer."