We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17802
    • 190 Posts
    I’m having the same problem... when it’s time for a document to be unpublished, the whole site comes down with a parse error instead :’(
    I tried to solve this by following Zenmaster’s advice in the bugtracker, but I guess I did something wrong, because it didn’t work. I changed this line in save_content.processor.php
    VALUES('".$introtext."','".$content."', '".$pagetitle."', '".$longtitle."', '".$type."', '".$description."', '".$alias."', '".$isfolder."', '".$richtext."', '".$published."', '".$parent."', '".$template."', '".$menuindex."', '".$searchable."', '".$cacheable."', '".$modx->getLoginUserID()."', ".time().", ".$publishedon.", ".$publishedby.", '".$modx->getLoginUserID()."', ".time().", '$pub_date', '$unpub_date', '$contentType', '$contentdispo', '$donthit', '$menutitle', '$hidemenu')";
    into this:
    VALUES('".$introtext."','".$content."', '".$pagetitle."', '".$longtitle."', '".$type."', '".$description."', '".$alias."', '".$isfolder."', '".$richtext."', '".$published."', '".$parent."', '".$template."', '".$menuindex."', '".$searchable."', '".$cacheable."', '".$modx->getLoginUserID()."', ".time().", '".$modx->getLoginUserID()."', ".time().", ".$publishedon.", ".$publishedby.", '$pub_date', '$unpub_date', '$contentType', '$contentdispo', '$donthit', '$menutitle', '$hidemenu')";
    

    Is that right? Or should I change something else as well? Any help would be appreciated...
      Thanks for MODx - I love it!
      • 1186
      • 202 Posts
      Hello,

      You have to change also the document.parser.class.inc.php file, around line 475 in 0.9.2.1 version, in the checkPublishStatus() fonction, like this :

      Before :

            $sql = "UPDATE ".$this->getFullTableName("site_content")." SET published=1, publishedon=".time().", publishedby=".$this->getLoginUserID()." WHERE ".$this->getFullTableName("site_content").".pub_date < $timeNow AND ".$this->getFullTableName("site_content").".pub_date!=0";
      


      After :

            $sql = "UPDATE ".$this->getFullTableName("site_content")." SET published=1, publishedon=".time().", publishedby=0 WHERE ".$this->getFullTableName("site_content").".pub_date < $timeNow AND ".$this->getFullTableName("site_content").".pub_date!=0";
      


      ... and it should work !
        R
        • 17802
        • 190 Posts
        Yay! That worked, thanks grin
        Oh by the way: in this same file I had to make another change to make it work; there’s a line in there with the word "publihsedby" in it, this should be changed into "publishedby". Somebody else mentioned this as well, but there’s no harm in saying it twice, right? wink
          Thanks for MODx - I love it!
          • 1186
          • 202 Posts
          Great ! wink

          Yes, you’re right for the spelling error "publihsedby", it must be corrected !
          In fact, if all the corrections mentioned in the 406 bug page by zenmaster and john davies are done (http://modxcms.com/bugs/task/406), everything works fine then.
            R