Hey there,

I just installed panels 2 fom scratch on my site twice and both times I get these errors after the install. After talking to Wimleers on IRC he thinks this is a problem with my site, but I'm not sure where / what to look for to get more information about this issue.

I was wondering if you had any idea where I could look to find more details about how come I have this foreach() error on that site?

Any testing you could suggest?
Thanks
Patchak

Comments

patchak’s picture

Priority: Normal » Minor
Status: Active » Postponed (maintainer needs more info)

Those are the lines on panels.module btw.
I just realised that site is still 5.1, I will update to latest drupal version and see if the problem is still there.

patchak’s picture

ok I upgraded to 5.5 and the problem is still there.

here are some system infos :

Drupal 5.5
Base de données MySQL 5.1.21
PHP 5.2.5
Serveur web Apache/2.2.2 (FreeBSD) mod_ssl/2.2.2 OpenSSL/0.9.7e-p1 DAV/2 PHP/5.2.5 with Suhosin-Patch mod_fastcgi/2.4.2

thanks

merlinofchaos’s picture

I need more info about what you're doing at the time you receive these errors.

merlinofchaos’s picture

Status: Postponed (maintainer needs more info) » Active

I think these breadcrumbs are done by the view itself. When you tell the view it is a 'page' view it thinks it owns the page...and thus the breadcrumb, and it modifies the breadcrumb for arguments.

patchak’s picture

Hey there, I get this error as soon as the module is activated. Also, the error message shows on every page of the site I browse too...

Patchak

merlinofchaos’s picture

After an IRC conversation, I logged into the site and the error immediately disappeared.

[09:27] If you get this error to recur, do this:
[09:28] On line 723 of panels.module, where this error is happening, add a: drupal_set_message('

'. var_export(debug_backtrace(), 1) . '

');
[09:28] That'll provide a lot of information about what's going on.
[09:28] And then paste the output into the issue.

vanderlip’s picture

Just to let you know this is not specific to patchak's site, I get the following error:

warning: Invalid argument supplied for foreach() in /home/vanderli/www/www/drupal/modules/panels/panels_views/panels_views.module on line 699.

when I click on the "Content" tab to add content to a new panel that I have created in Beta 1.

I get the following error when I attempt to view a panel created with alpha 14:

* warning: Invalid argument supplied for foreach() in /home/vanderli/www/www/drupal/modules/panels/panels_views/panels_views.module on line 699.
* warning: Invalid argument supplied for foreach() in /home/vanderli/www/www/drupal/modules/panels/panels_views/panels_views.module on line 737.

Will try to troubleshoot as described above, but can't do it today. Any ideas in the mean time would be great.

-dennis

yched’s picture

@vanderlip : please read carefully the issues before chiming in. Your bug is a different one (invoves lines in panels_views.inc, not panels.module), which is adressed here : http://drupal.org/node/205527

vanderlip’s picture

Sorry, moving too fast, and thanks for the pointer.

RareImagery-1’s picture

I have been having this problem, and by unchecking mini panels the 723 and 748 error goes away. I'm by no means a programmer and wouldn't no where to start fix the problem, but at least that got rid of the message.

timmillwood’s picture

I am having an error on line 701 and 739.

I did have the line 699 error but fixed that with the patch in the other thread, I now have these!

catch’s picture

Status: Active » Postponed (maintainer needs more info)

Are you still getting this in beta 2?

timmillwood’s picture

yes, im using Panls 2 Beta

catch’s picture

But are you using Beta 1, or Beta 2? Beta 2 was released last night, and may or may not include a fix for this.

timmillwood’s picture

updated to panels 2 beta 2 and the problem is still there! but on line 702 and 740!

catch’s picture

Category: support » bug
Priority: Minor » Normal
Status: Postponed (maintainer needs more info) » Needs review
cwgordon7’s picture

Category: bug » support
Status: Needs review » Postponed (maintainer needs more info)

Um. Where's the patch?

elgreg’s picture

I'm still getting this error - is there a patch out there? (line 702 and 740 foreach() problems, that is) - Panels 2 Beta 2

sdboyer’s picture

Although the line numbers are slightly different (very odd - have you modified your panels.module file at all?), I'm 99% sure that we have now identified and fixed the source of this bug in another issue: #213793: warning: Invalid argument supplied for foreach() in ......panels.module on line 725. (and line 750.). I'm mostly confused, however, because panels2 beta2 doesn't HAVE foreach statements on those lines.

In any case, before I proceed any further with this, I'd like you to try downloading the -dev version of Panels and see if the error message goes away. Beta3 will be released presently, but if this is an issue that isn't already fixed in -dev, I'd like to get it in before I post the new release.

elgreg’s picture

Actually, I think this might be for a different issue having to do with panels_view module that took over this thread at #11. Another thread having to do with panels_views petered out here: http://drupal.org/node/205527 - but I'll revive it.

sdboyer’s picture

Status: Fixed » Postponed (maintainer needs more info)

Ahhh, I see. I've committed the fix, and there will be no more nasty foreach errors for views with no URL/context arguments as of Beta3.

sdboyer’s picture

Status: Postponed (maintainer needs more info) » Fixed
Anonymous’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

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