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

    Are you sure you don’t put the end to the start date, ans the start date to the end date ?

    i test with your dates, and i don’t have this probleme :/

    look here
      [b]D
      • 28436
      • 242 Posts
      aaaaahhh..... the different was: I use the pubdate and you use TVs to control the eventdates. Test it without &useTV.
      [!CALx?getFolder=`10`&getTypeProcess=`createCal`!]


      have a nice day
      Stefan
        • 13320
        • 245 Posts
        Hi,

        Ok, my bad, i think your (MODx users) are more interested by the TV version, and i don’t test very much with the pubdate :p, thank’s for bug’s report smiley

        I upload a new version smiley
          [b]D
          • 13331
          • 67 Posts
          Hi Jabberwock,

          I finally got the problem solved and everything is working very nice with TVs and all but I’m getting the same SQL-error..

          I’ve tried posting an event going from 13th to 17th and it shows nicely in the calendar.. the pop-up and the link is also fine..

          But then I create an event on the 15th to test the mutiple events function..

          It does create the new document "Events listing"
          It does add the correct id to "multiEvents.txt"
          It does change the color of the cell in the calendar and change the pop-up text to "There are mutiple events on this date"

          but when i click on the "more details" it just shows:

          « 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 'and STR_TO_DATE(`database`.modx_site_tmplvar_contentvalues.value, '%d-%m-%Y'' at line 1 »
          


          I’ve tried do delete the Events listing and the multiEvents.txt as you suggested earlier but it has no effect.. it then creates a new file and add’s the new correct id the error still shows.
            • 13320
            • 245 Posts
            Hi,

            I’ld need the entire MODx error to get your problem, can you post it ?
            Also, can you indicate the dates in full - day, month and year - so that I can try and create them myself and see if it works ?
              [b]D
              • 13331
              • 67 Posts
              « 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 ’and STR_TO_DATE(`database`.modx_site_tmplvar_contentvalues.value, ’%d-%m-%Y’’ at line 1 »
              SQL: SELECT * FROM `database`.modx_site_tmplvar_contentvalues WHERE (`database`.modx_site_tmplvar_contentvalues.tmplvarid= and STR_TO_DATE(`database`.modx_site_tmplvar_contentvalues.value, ’%d-%m-%Y’)<=’2007-08-14’)
              [Copy SQL to ClipBoard]

              2007-08-13 - 2007-08-17
              and the 2nd event on 2007-08-14
                • 30128
                • 78 Posts
                @Jachobsen: it seems you have the same issue as me and rajfantastic. Hopefully we’ll find a solution soon smiley Since this is now a repository item, you can come join us in the "correct" thread here: http://modxcms.com/forums/index.php/topic,17105.15.html so we can all stick our heads together and solve this.
                  • 13320
                  • 245 Posts
                  OK, three person with the same problem, we can find the solution wink
                    [b]D
                    • 28436
                    • 242 Posts
                    Hello Jabberwock,

                    its a pleasure to bother you smiley

                    The february have 28 days in 2008 as well, thats wrong, it must have 29 days in 2008.
                    The reason is: In the funcion init() the value of $this->annee is empty.

                    to solve this, i change this.

                    	function Run(){
                    		global $modx;
                    
                    		//initialise els variables du snippet
                    		$this->init();
                    		$this->getDateParams();
                    
                    [...]
                    


                    into
                    	function Run(){
                    		global $modx;
                    
                    		//initialise els variables du snippet
                    		$this->getDateParams();
                    		$this->init();
                    
                    [...]
                    


                    get the Parameters first, so they are available in init()

                    It work, but iam not sure if its right or not.

                    ciao, Stefan

                      • 13320
                      • 245 Posts
                      Hi Stef,

                      It’s work, good job wink

                      I found a bug when change the month, and if it december, the next month is 13 :p

                      I fix the bug.
                        [b]D