We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34084 ☆ A M B ☆
    • 756 Posts
    Quote from: pleth at May 02, 2011, 09:39 AM

    Just tried to upgrade to latest mxcalendar (0.1.3b) and am getting the MODx error below. After attempting to troubleshoot I installed on a fresh install (rather than upgrading) and am getting the same error. Has anyone else had any issues?

    « MODx Parse Error »

    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: Invalid argument supplied for foreach()
    Error type/ Nr.: Warning - 2
    File: /home/httpd/vhosts/mydomain/httpdocs/assets/modules/mxCalendar/includes/calendar.inc.php
    Line: 454
    Line 454 source: foreach($dyn_config_opts AS $cft){

    Greg, try the latest file version from the repo. If you get the message again let me know.
    http://code.google.com/p/mxcalendar/source/browse/trunk/includes/calendar.inc.php

    Cheers
      Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
      Visit CharlesMx.com for latest news and status updates.
      • 23571
      • 223 Posts
      Well, it fixed on the initial calendar page, but get the error below when navigating to an events page:

      « MODx Parse Error »

      MODx encountered the following error while attempting to parse the requested resource:
      « PHP Parse Error »

      PHP error debug
      Error: Invalid argument supplied for foreach()
      Error type/ Nr.: Warning - 2
      File: /var/www/vhosts/cleburnecountylibrary.com/httpdocs/assets/modules/mxCalendar/mxCalendar.class.php
      Line: 1432
      Line 1432 source: foreach($dyn_config_opts AS $cft){
        • 34084 ☆ A M B ☆
        • 756 Posts
        sorry, forgot that bug was in both place when it was corrected. I’m going to get the package update tomorrow with the latest bug fixes in place. In the meantime the latest repo version should fix you up: http://code.google.com/p/mxcalendar/source/browse/trunk/mxCalendar.class.php

        Sorry for all the confusion....

          Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
          Visit CharlesMx.com for latest news and status updates.
          • 23571
          • 223 Posts
          Yes, that took care of it. Thanks!
            • 34084 ☆ A M B ☆
            • 756 Posts
            no problem, again apologies
              Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
              Visit CharlesMx.com for latest news and status updates.
              • 26016
              • 561 Posts
              Hi,
              This calendar looks so promising. I had tested it some versions ago, and got it basically working. I’m trying 0.1.3-plb now, which I gather is the current version. I scratched my head at the install instructions on the Google site. There appeared to be a typo relating to "mxcalendar" vs. "mxCalendar" for the module name. Using the capital C got the module to run OK. Finally I got the bare calendar to display.

              Then a call with a template chunk didn’t error, but also didn’t display anything. Maybe there was another typo, or the instructions were for a much older version. I took that parm out, and thought I’d try sticking an event in there.

              After doing that, I got this:

              Error: 	Invalid argument supplied for foreach()	 
                Error type/ Nr.: 	Warning - 2	 
                File: 	/blahblahblah/assets/modules/mxCalendar/includes/calendar.inc.php	 
                Line: 	454	 
                Line 454 source: 	foreach($dyn_config_opts AS $cft){ 
              


              If you have any thoughts, that would be great.
              Thanks, Dave
                MODx and Wordpress development
                Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
                • 36624
                • 535 Posts
                hey charless!.. thank you for this module, this is a nice piece of work!

                @samba
                read the lasts messages and download the last version of files from http://code.google.com/p/mxcalendar/source/browse/trunk/ this should solve your problem (i had the same wink
                  CTRL+SHIFT+U - Clear Cache
                  CTRL+SHIFT+H - Hiding Heft Panel
                  CTRL+SHIFT+N - Fast Create Resource
                  CTRL+ALT+P - Preview Recource (in edit resorce window)
                  CTRL+ALT+S - Save
                  • 26016
                  • 561 Posts
                  Quote from: manu at May 25, 2011, 09:58 AM

                  hey charless!.. thank you for this module, this is a nice piece of work!

                  @samba
                  read the lasts messages and download the last version of files from http://code.google.com/p/mxcalendar/source/browse/trunk/ this should solve your problem (i had the same wink
                  Hi Manu,
                  Thanks for the idea. I looked at the link. I saw mxCalendar.tpl.php there as well as mxCalendar.class.php. I had tried the class one already. In any case, I grabbed both, and got the exact same result.

                  I never pick up code via trunk, so I could be doing something wrong, I guess.

                  I appreciate your helping.
                  Dave
                    MODx and Wordpress development
                    Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
                    • 34084 ☆ A M B ☆
                    • 756 Posts
                    Quote from: samba at May 24, 2011, 10:46 AM


                    Error: 	Invalid argument supplied for foreach()	 
                      Error type/ Nr.: 	Warning - 2	 
                      File: 	/blahblahblah/assets/modules/mxCalendar/includes/calendar.inc.php	 
                      Line: 	454	 
                      Line 454 source: 	foreach($dyn_config_opts AS $cft){ 
                    



                    Ok, can you provide me with a little more detail. Do you have any existing events in the system? What is your snippet call?

                    It should be a quick fix, but I just want to get to root cause first.

                    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
                      @Samba - If you download these two files and replace the current ones it should clear your problem, however if you did do that and/or still have issues please just post back.

                      http://code.google.com/p/mxcalendar/source/browse/trunk/mxCalendar.class.php
                      http://code.google.com/p/mxcalendar/source/browse/trunk/includes/calendar.inc.php

                      Cheers
                        Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
                        Visit CharlesMx.com for latest news and status updates.