We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33175
    • 711 Posts
    Hi all !

    I have a real problem.
    In the manager, I want to create a directory to store document in this.
    I created it in another directory :
    Root
    Actualité
    2006
    05
    09
    10
    12
    The directory "12" has "12" as "title" and "12" as "alias".
    The published checkbox is checked and the date is "12-05-2006 13:26:59".
    Since 13:12 I try to published it but if I specify the current date I can’t : the checkbox is not checked and the date is ok. If I specify an other date I can published it. If I don’t specify date I can publish it also.

    I created other directorys before without problem.

    Do you have an idea or is it a bug ?

    Thanks for suggestions
      Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
      • 33175
      • 711 Posts
      I finally succeeded in publishing the file but I do not know why it goes and why that did not go.

      But now I have the same problem with a document. I saw that when I displayed my website.
      I obtain a sql error
      « MODx Parse Error »
      MODx encountered the following error while attempting to parse the requested resource:
      « Execution of a query to the database failed - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ’WHERE `buromati`.modx_site_content.pub_date < 1147442704 AND `b »
      SQL: UPDATE `buromati`.modx_site_content SET published=1, publishedon=1147442704, publishedby= WHERE `buromati`.modx_site_content.pub_date < 1147442704 AND `buromati`.modx_site_content.pub_date!=0

      An idea ?

      Thanks
        Sorry for my english. I&#39;m french... My dictionary is near me, but it&#39;s only a dictionary !
        • 33175
        • 711 Posts
        I have another time this "bug". Is what somebody would have an idea? it is very obstructing cause it is on my production website....
          Sorry for my english. I&#39;m french... My dictionary is near me, but it&#39;s only a dictionary !
          • 16886
          • 40 Posts
          Hi,
          having sometimes the problem publishing new document, entered published = true and selected a date then stored the document.
          But the document is not published, still in red color in the documenttree
          Sometimes having the same problem with Cache = False, if I store the document the cachestate is lost

          Workaround for this:
          In Main-Settings i set following setting:
          CacheStandard = False
          DocumentPublish = True

          The problem did not appear everytime, only sometimes... working with 0.9.2.1 Rev 1005
          Greetins
          LeftHanded
            I love ModX!
            • 33175
            • 711 Posts
            Thanks LeftHanded smiley
            I will try it to investigate.

            But now I think there is a bug. It will not usefull to set CacheStandard to false.

            The most important for me, it is my website display error on the frontend cause of this bug. The website is broken....

              Sorry for my english. I&#39;m french... My dictionary is near me, but it&#39;s only a dictionary !
              • 33175
              • 711 Posts
              I finally found from which the problem comes : the time on my webserver has 2 minutes minus than my computer.
              The calendar to set the date/time to publish is written with javascript. Then, it gets the time on my computer. When I published a new document, the time is based on the webserver. Document is published 2 minutes later.
              It is not very important if the publishing occured 2 minutes later but when the document is published (cause of the time) my website display an error (I don’t know why) :
              « MODx Parse Error »
              MODx encountered the following error while attempting to parse the requested resource:
              « Execution of a query to the database failed - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ’WHERE `buromati`.modx_site_content.pub_date < 1147862179 AND `b »
              SQL: UPDATE `buromati`.modx_site_content SET published=1, publishedon=1147862179, publishedby= WHERE `buromati`.modx_site_content.pub_date < 1147862179 AND `buromati`.modx_site_content.pub_date!=0
              .

              I need to check manually the checkbox "publish" to remove this error.

              Is it possible to fix it ?
              Is it possible to fix the difference of time between the server and the computer ?

              Thanks for your answers.
                Sorry for my english. I&#39;m french... My dictionary is near me, but it&#39;s only a dictionary !
                • 1186
                • 202 Posts
                Hello,

                Exactly the same problem, on a new production web site, but for documents to be unpublished :

                Error :

                « MODx Parse Error »
                MODx encountered the following error while attempting to parse the requested resource:
                « Execution of a query to the database failed - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ’WHERE `alliancel`.trets_site_content.pub_date < 1148057654 AND »
                SQL: UPDATE `alliancel`.trets_site_content SET published=1, publishedon=1148057654, publishedby= WHERE `alliancel`.trets_site_content.pub_date < 1148057654 AND `alliancel`.trets_site_content.pub_date!=0

                I have to unpublish the document manually through the manager to make the site go on again.
                Please, has anybody an idea to fix that ?

                Ps. Is it correct, the "publishedby=" in the produced SQL query, without any value ?

                Many thanks for your help !
                  R
                  • 1186
                  • 202 Posts
                  After testing :
                  The SQL error occurs with MODx 0.9.2.0 and MODx 0.9.2.1 but not with MODx 0.9.1
                  Tests have been made in the same environment (PHP, MySQL, identical site, etc.)

                  It seems that the checkPublishStatus() function in the document.parser.class.inc.php file is different between the different versions. In the new ones (0.9.2.x) :

                  publishedby=".$this->getLoginUserID()
                  


                  remains empty and gives the SQL error.

                  Some idea ?? huh
                    R
                    • 25663 MODX Staff
                    • 12,272 Posts
                    might need an official bug report on this one...
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 33453
                      • 141 Posts
                      I have located this error and tracked it in the bug tracker, here.