We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    It’s a case mismatch; the installer sql is using mxcalendar while the function is looking for mxCalendar.
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      How can I disable the setting of the javascript for Google Maps? This code does not seem to work correctly, as with no events in the database it is loading the javascript:
      if($p_val['location'] && $p_val['displayGoogleMap']){
          include_once($modx->config['base_path'].'assets/modules/mxCalendar/includes/google_geoloc.class.inc');
      

      Perhaps if any of the configuration fields for the Google Map API are empty it shouldn’t even get that far? Or is it being loaded by default from some other section of code?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 23546
        • 29 Posts
        Quote from: sottwell at Apr 20, 2010, 12:38 AM

        Parse error: syntax error, unexpected ’:’ in /home/sottwell/public_html/assets/modules/mxCalendar/mxCalendar.class.php on line 935

        $modx->setPlaceholder('mxcEventDetailLabelDateTime',($this->config['mxcEventDetailLabelDateTime'] ?  : _mxCalendar_ed_dt));


        Have the similar problem. There are 2 lines that don’t work under my version of PHP (5.2).

        line 935:
         $modx->setPlaceholder('mxcEventDetailLabelDateTime',($this->config['mxcEventDetailLabelDateTime']? :_mxCalendar_ed_dt));


        and line 940:
        $modx->setPlaceholder('mxcEventDetailLabelLocation',($p_val['location']?($this->config['mxcEventDetailLabelLocation']? :_mxCalendar_ed_location):''));


        In order to install the module I had to comment these lines in the module file. But I guess it will prevent me using all the functionality.

        Could anybody advice how to fix this?


          • 30319
          • 406 Posts
          I looked in my crystal ball today.
          I foresee an 0.6 release soon. smiley
          Thank you to all the testers / bug finders.
          :) tom
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            To fix the parse errors in versions of PHP < 5.3 you have to repeat the conditional elements:
            $modx->setPlaceholder('mxcEventDetailLabelDateTime',($this->config['mxcEventDetailLabelDateTime'] ? $this->config['mxcEventDetailLabelDateTime'] : _mxCalendar_ed_dt));

            $modx->setPlaceholder('mxcEventDetailLabelLocation',($p_val['location']?($this->config['mxcEventDetailLabelLocation']? $this->config['mxcEventDetailLabelLocation']: _mxCalendar_ed_location):''));


              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 34084 ☆ A M B ☆
              • 756 Posts
              sorry, everyone - updating the code for < php 5.3

              thanks for the feedback and I’ll start cleaning those up




                Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
                Visit CharlesMx.com for latest news and status updates.
                • 30319
                • 406 Posts
                Quote from: charless at Apr 20, 2010, 09:08 AM

                sorry, everyone - updating the code for < php 5.3
                thanks for the feedback and I’ll start cleaning those up

                Quick excellent polite thoughtful considerate reply. smiley
                I hope you don’t get burned out on this. smiley
                Thank you, Tom
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  I noticed another interesting anomoly in my calendar display; the "next" link displays the same as the "previous" link (<< previous instead of next >>)

                  In the file includes/calendar.inc.php on line 173 it looks like a copy/paste gone awry:
                  $modx->setPlaceholder('mxcMonthHeadingNextLabel', (!empty($param['mxcMonthHeadingNextLabel']) ? $param['mxcMonthHeadingNextLabel'] : _mxCalendar_cl_labelPrevious));
                  

                  That should be
                  $modx->setPlaceholder('mxcMonthHeadingNextLabel', (!empty($param['mxcMonthHeadingNextLabel']) ? $param['mxcMonthHeadingNextLabel'] : _mxCalendar_cl_labelNext));
                  

                  according to the language file at line 154.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 34084 ☆ A M B ☆
                    • 756 Posts
                    Quote from: Plankton at Apr 20, 2010, 07:45 AM

                    Quote from: sottwell at Apr 20, 2010, 12:38 AM

                    Parse error: syntax error, unexpected ’:’ in /home/sottwell/public_html/assets/modules/mxCalendar/mxCalendar.class.php on line 935

                    $modx->setPlaceholder('mxcEventDetailLabelDateTime',($this->config['mxcEventDetailLabelDateTime'] ?  : _mxCalendar_ed_dt));


                    Have the similar problem. There are 2 lines that don’t work under my version of PHP (5.2).

                    line 935:
                     $modx->setPlaceholder('mxcEventDetailLabelDateTime',($this->config['mxcEventDetailLabelDateTime']? :_mxCalendar_ed_dt));


                    and line 940:
                    $modx->setPlaceholder('mxcEventDetailLabelLocation',($p_val['location']?($this->config['mxcEventDetailLabelLocation']? :_mxCalendar_ed_location):''));


                    In order to install the module I had to comment these lines in the module file. But I guess it will prevent me using all the functionality.

                    Could anybody advice how to fix this?

                    see susan’s note above http://modxcms.com/forums/index.php/topic,46609.msg283616.html#msg283616 about lines 935 and 940, which I’m getting ready to update the package with the fix.

                    cheers
                      Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
                      Visit CharlesMx.com for latest news and status updates.
                      • 34084 ☆ A M B ☆
                      • 756 Posts
                      Quote from: sottwell at Apr 20, 2010, 01:25 AM

                      It’s a case mismatch; the installer sql is using mxcalendar while the function is looking for mxCalendar.

                      got that fixed and will release shortly, thanks for the catch
                        Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
                        Visit CharlesMx.com for latest news and status updates.