0
Welcome Guest! Login
0 items Join Now

Another Warning: Invalid argument supplied for foreach()w

  • Another Warning: Invalid argument supplied for foreach()w

    Posted 12 years 7 months ago
    • Hi everyone, I'm new to Gantry and the Panacea theme. But a few things are happening.
      1.) The site loads very slowly initially
      2.) I get the error: Warning: Invalid argument supplied for foreach() in D:...\wp-content\plugins\gantry\core\gantry.class.php on line 1367

      Here is what is in the gantry.class.php file in that area:

      line 1358 /**
      line 1359 * internal util function to get key from schema array
      line 1360 * @param $schemaArray
      line 1361 * @return #Fimplode|?
      line 1362 */
      line 1363 function _getKey($schemaArray) {
      line 1364
      line 1365 $concatArray = array();
      line 1366
      line 1367 foreach ($schemaArray as $key=>$value) {
      line 1368 $concatArray[] = $key . $value;
      line 1369 }
      line 1370
      line 1361 return (implode("-",$concatArray));
      line 1362 }


      Here is what I have installed
      Gantry Template Framework Version 1.25
      Panacea Theme for Wordpress
      jQuery Mega Menu Version 1.3.9
      BigContact Contact Page Version 1.3.7
      RokTabs Version 1.20

      I'm not doing anything more than using the theme. I haven't done any custom coding but I'm getting this error. I even tried completely uninstalling WP, Gantry and Panacea completely and reinstalling...same problem

      I've seen several threads for this kind of error, but none of them discuss the gantry.class.php file and none seem to be the talking about the same problem.

      my website (under construction) is www.mainstreetdevelop.com

      Thanks for your help!

      -Bob
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Another Warning: Invalid argument supplied for foreach()w

    Posted 12 years 7 months ago
    • Hi, warnings are not errors - big difference between the two. Usually warnings can be ignored, you just need to set your PHP settings to hide them. A lot more on this topic here: www.rockettheme.com/forum/index.php?f=29..._v=viewtopic#p847421

      Can you please try and disable all third party plugins you are using - anything not made by us - to rule that out as a source of the problem - could be a conflict with one or more plugins you are using.

      If that does not help, please PM me your Wordpress login and FTP information and I'll take a look.
    • The difficult we do immediately, the impossible takes a little longer.
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Another Warning: Invalid argument supplied for foreach()w

    Posted 12 years 7 months ago
    • Hi, other than the warning itself, are there any actual issues with the site? If you can't access the php.ini file, try some of the suggestions in this post: wordpress.org/support/topic/hide-php-error-message?replies=5

      The fact that Go Daddy isn't helping you should also be an indication that their hosting service is terrible. Your slow loading site is most likely due to their service. They just got massively hacked today and their service is down for a lot of people. Even when they are running as normal, their service is subpar, I would consider another host.
    • The difficult we do immediately, the impossible takes a little longer.
  • Re: Another Warning: Invalid argument supplied for foreach()w

    Posted 12 years 7 months ago
    • Cliff,

      GoDaddy wasn't my choice of host, so I can't worry about that now. I need to fix the issue at hand. Yes I know they were down, but they are back up now. I found out from them that I should create a php5.ini file which I did. And I used the code I found from your suggested link in my original post...

      ; - Show all errors, except for notices and coding standards warnings
      error_reporting = E_ALL & ~E_NOTICE


      Unfortunately, the problem is still happening. I will try the information from this new link you supplied. for my php5.ini file, can you give me the exact code I need to put in the file to get it to work? Thanks!
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Another Warning: Invalid argument supplied for foreach()w

    Posted 12 years 7 months ago
    • Hi, you'll need to verify that the php5.ini file is reflecting your changes. I know from experience that getting this to work on Go Daddy can be a huge pain, sometimes it can take several hours to see the changes. Bottom line is that this is a hosting setting, there isn't anything our products can do to prevent it. The error reporting should never be visible on your website as it's a huge security risk - hackers can see the absolute path to your hosting root. Why this is turned on in the first place is a question for your host.

      If you can get the answers from them, try the suggestion in the link I provided, or here's another:
      www.wordimpressed.com/wordpress/php-turn...off-error-reporting/
    • The difficult we do immediately, the impossible takes a little longer.
  • Re: Another Warning: Invalid argument supplied for foreach()w

    Posted 12 years 7 months ago
    • Cliff,

      Adding this code seemed to do the trick as far as removing the warning. However, two things are still happening. The site is loading EXTREMELY slow. This has to have something to do with either Wordpress or your theme because if I remove WP and your theme completely, the site loads faster. Also, on initial site load, you'll see that the theme does not load properly. But once refreshed, it does. Can you tell me what would cause that?

      Here is a link to the screenshot of what I'm seeing on initial load:
      docs.google.com/open?id=0B5hSK93poK1aT3RjaXlUV3JXTm8
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Another Warning: Invalid argument supplied for foreach()w

    Posted 12 years 7 months ago
    • Hi, I'm seeing a few Javascript errors, looks like some of the Gantry scripts are not loading. This could be due to third party plugins you are using - like the menu for example. I don't know if it's that specifically, but one javascript conflict can cause many scripts to fail and not all plugins from other developers are compatible with Gantry. Try disabling all plugins other than Gantry to see if anything gets better. If it does, one or more of your plugins is causing issues.

      As far as the slow loading goes, I'm fairly certain it's your host. Go Daddy does fine with HTML sites, but anytime there is a database involved the performance decreases dramatically in my experience. The site loads very fast - once it connects to the server - which is what you're waiting on when you go to the site.
    • The difficult we do immediately, the impossible takes a little longer.
  • Re: Another Warning: Invalid argument supplied for foreach()w

    Posted 12 years 7 months ago
    • Hi Cliff,

      I think it may be the menu I have installed. It's called JQuery Mega Menu. I'd love to have the Roknavmenu installed, but apparently it's not available for Wordpress? Can you recommend another javascript menu plugin that is compatible with Gantry?

      -Bob
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Another Warning: Invalid argument supplied for foreach()w

    Posted 12 years 7 months ago
    • Hi, RokNavMenu is included in the theme, it's a widget. Look for the Gantry Menu Widget and use that.
    • The difficult we do immediately, the impossible takes a little longer.

Time to create page: 0.077 seconds