warning: Invalid argument supplied for foreach() in /sites/all/modules/panels/includes/plugins.inc on line 582.

Just upgraded to 13 and I'm getting this error when viewing a panels page. Anyone else?

Comments

tinils’s picture

yup. getting that also. Panels-5.x-2.0-alpha13

dnewkerk’s picture

Getting it too (".... on line 582" when viewing a panel page). I got it a number of times while setting up the page as well (slightly different error ".... on line 529").

zach harkey’s picture

Subscribing - Getting the same error, except it says line 529

merlinofchaos’s picture

Status: Active » Fixed

I think I have this fixed now.

A.Parhomenko’s picture

Version: 5.x-2.x-dev » 5.x-2.0-alpha13
Assigned: Unassigned » A.Parhomenko
Category: support » bug
Priority: Normal » Critical
Status: Fixed » Active

No you not :)

warning: Invalid argument supplied for foreach() in /home/mysite/public_html/modules/panels/includes/plugins.inc on line 529.

something in this function:

function panels_argument_get_contexts($arguments) {
  $contexts = array();
  foreach ($arguments as $argument) { ----!!!! THIS LINE !!!! -----
    $context = panels_argument_get_context($argument, NULL, true);
    if ($context) {
      $contexts[panels_argument_context_id($argument)] = $context;
    }
  }
  return $contexts;
}

I'm using panels-5.x-2.0-alpha13. What I need to do with this?

merlinofchaos’s picture

Priority: Critical » Normal
Status: Active » Fixed

This bug was fixed in -dev. Please do not re-report the bug in the same version it was reported in and tell me I didn't fix it.

Also, this isn't critical, so you get -1 points just for trying to get extra attention. So you lose, by a lot.

Sophia’s picture

Please don't flame me, I downloaded version alpha13 from the link you provided (just today in fact) and upgraded version 1.x to this one.

The existing view does not give any errors, but the new one gives

warning: Invalid argument supplied for foreach() in .../sites/all/modules/panels/includes/plugins.inc on line 582.

Could you tell me please where I can downloaded the dev version where this is fixed?

Thanks very much, on a sidenote, panels2 looks awesome!!!!!!!!!!!!!!!!!!!!! Sooooooooo much better than the previous version!

A.Parhomenko’s picture

I'm not trying to get extra attention. Sory! I'm just make a little mistake... minor -> critical. Where I can download fixed dev. version of 5.x-2.0? Many thanks!

dnewkerk’s picture

Alpha14 was just released (thanks Merlin!) which you can download here: http://drupal.org/node/194291
For your reference... additional releases for modules can be found by clicking on the "View all releases" link, which is located below the table that displays the current and development releases on any module's main page. In the case of Panels, this link is: http://drupal.org/node/74958/release

In the case of modules where there is a new branch of development going on that is completely different from the "current" release, those can usually only be found on that "View all releases" page, or as a direct link in the module's description (as is the case with Panels) if the developer wants to draw extra attention to it. You can download the "dev" version of a module at any time, as this is where the bleeding edge changes and fixes are located - though there is never any guarantee that a dev release will work properly, or even at all, as it's just a copy of the code wherever the developer last left off. If you post a bug report or feature request and the module developer says he fixed or added it - he is referring to that dev version, up until he posts another "official" release (which may be soon after, or in some cases quite a long time after). The dev release for Panels 2.x is actually a bit harder to find than most, since it is separated from the other 2.x releases on the page and there are so many alpha releases (just search for "dev" in your browser to jump to it). So far as when 2.0 will be complete - the answer is probably the usual... "When it's ready" :) And everyone is very busy with Drupal 6 and Views 2 right now so I'd expect that is taking higher priority for the moment.

Anyhow, welcome to Drupal and glad to have you here :)

merlinofchaos’s picture

Thank you, Keyz, for that well written reply. If there were a Drupal FAQ, this would be in it. =)

zach harkey’s picture

If you have shell access, you can also use the following CVS to get the most recent dev version of the Panels 2 branch:


// Change into the directory where you want to put the module. 
cd /home/httpd/vhosts/example.com/httpdocs/sites/all/modules

// Checkout the most recent -dev version of the panels 2 branch.
cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -d panels -r DRUPAL-5--2-0 contributions/modules/panels

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.