We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I'm getting these errors in the log (hosted on MODX Cloud):

    [2014-01-17 16:01:56] (ERROR @ /paas/cwhatever/www/core/components/mxcalendars/model/mxcalendars/mxcalendars.class.php : 133) PHP warning: include_once(google_geoloc.class.inc): failed to open stream: No such file or directory
    [2014-01-17 16:01:56] (ERROR @ /paas/cwhatever/www/core/components/mxcalendars/model/mxcalendars/mxcalendars.class.php : 133) PHP warning: include_once(): Failed opening 'google_geoloc.class.inc' for inclusion (include_path='.:/usr/local/php/5.4/php-5.4.24/share/pear')
    


    Any solutions?

    This question has been answered by andreasz. See the first response.

    • discuss.answer
      • 44567
      • 23 Posts
      Yupp. It's in his code, he screwed it up. Funnny. I just googled this and your post is just a day old smiley

      Check core/components/mxcalendars/model/mxcalendars/mxcalendars.class.php

      He includes an inc file where he is supposed to include a php file smiley


      This is what it should look like:

      -- snip --

      private function _getMap($address=null,$gmapRegion='',$width='500px',$height='500px', $gmapLib='http://maps.google.com/maps/api/js?sensor=false'){
      $googleMap = '';
      $gmapLocations = '';
      //-- Add google Map API
      if($address){
      include_once('google_geoloc.class.inc.php');
      //-- Output the Address results
      if(class_exists("geoLocator") && $address){
      //-- Split addresses for multiple points on the map
      $addressList = explode('|', $address);

      -- //snip --

      I simply changed this line: include_once('google_geoloc.class.inc.php');

      Works fine now. But it still seems buggy as hell smiley

      Andreas
      • Great, thanks. I submitted this to gitHub.
          • 44567
          • 23 Posts
          There are several more bugs, so beware smiley I fixed a few of them.

          If you change the locale for the calendar to anything but english, it will screw up, too smiley
          - he hardcoded the names of the days into it and messed that up
          - he gets geo-locations from the map and doesn't pay attention to syntax (google needs decimal instead of a comma for lat/long, so you need to str_replace it)
          - ajax/blank template thingy needs more documentation. There needs to be a blank mxcalendars snippet call in it
          - attaching images doesn't work for some reason, no idea, why...

          etc.

          I got it working now, with a bit of work. Still think it's the best thing around, but it is very 'home-made' smiley
            • 38417
            • 92 Posts
            Maybe this wil help you. I also had troubles with google maps and setlocale. I solved this as stated in the closed issue #139.

            In my files there are two geoloc.class files one with .inc and one with .inc.php Also it is easy to edit the mxcalendars.class.php file.

            These things do function on my site, I do have other issues with allday and repeating events.
              • 36582
              • 463 Posts
              Is there something wrong with the package? Suddenly on a new site I'm having problems with mxcalendar - on a slightly older site it's fine. In the new site the mxcalendars.class.php states it is a beta:

              * Version: 1.1.10-beta1

              Whereas the older one is:

              * Version: 1.1.8-pl

              and is stable
                Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
                • 36582
                • 463 Posts
                Maybe something wrong with namespaces - I couldn't save system settings for mxcalendars - should it be:

                mxcalendar

                or

                mxcalendars

                ??
                  Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
                • It might be best to use a previous version for the time being and file bug reports at: https://github.com/CharlesMx/mxCalendar/issues
                  • It might be best to use a previous version for the time being and file bug reports at: https://github.com/CharlesMx/mxCalendar/issues
                      • 44567
                      • 23 Posts
                      Actually it's just very crappy code with little hope for improvement in the near future. The whole maps js is hardcoded, options and variables are also not externalized, you have a better chance of you fit it to your needs instead of waiting for him to fix it.

                      Don't get me wrong, I am grateful for the whole thing, it just needs a LOT of work in order to be used in production environments.

                      Andreas