At least I think that's what caused it; I created a new page with a menu item in the navigation menu (with clean URLs off) then edited the panel page's URL path so that it pointed to it:

PHP Fatal error: Call to undefined function _panels_page_menu_item() in /Applications/MAMP/htdocs/MyDrupalSite/sites/all/modules/panels/panels_page/panels_page.menu.inc on line 307

Comments

jthomasbailey’s picture

Status: Active » Postponed (maintainer needs more info)

I tried to recreate the error but this time it gave me this Drupal error:

warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/MyDrupalSite/sites/all/modules/panels/includes/plugins.inc on line 1225.
warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/MyDrupalSite/sites/all/modules/panels/includes/plugins.inc on line 1123.

I'll change it to "needs more info", feel free to switch it back

jthomasbailey’s picture

Title: Changing panel page URL path causes fatal error » editing panel page title or URL path causes fatal error
Status: Postponed (maintainer needs more info) » Active

I did it again by changing the title of the panel page, this time with clean URLs on.

PHP Fatal error: Call to undefined function _panels_page_menu_item() in /Applications/MAMP/htdocs/MyDrupalSite/sites/all/modules/panels/panels_page/panels_page.menu.inc on line 307

Flying Drupalist’s picture

I got:

warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/MyDrupalSite/sites/all/modules/panels/includes/plugins.inc on line 1225.
warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/MyDrupalSite/sites/all/modules/panels/includes/plugins.inc on line 1123.

As well.

yurtboy’s picture

same here.
PHP 5.1.2

* warning: Invalid argument supplied for foreach() in /var/www/web1/web/sites/all/modules/panels/includes/plugins.inc on line 1225.
* warning: Invalid argument supplied for foreach() in /var/www/web1/web/sites/all/modules/panels/includes/plugins.inc on line 1123.

dan.crouthamel’s picture

Do we need a check for !empty($contexts) on lines 1225 and 1123 (panels_context_get_keywords & panels_context_get_form. Works for me, but makes me wonder if I'm not building the panel correctly - or maybe my check always returns false :)

nstahl’s picture

I'm also having this issue.

* warning: Invalid argument supplied for foreach() in /var/www/vhosts/xxxxx.net/httpdocs/modules/panels/includes/plugins.inc on line 1225.
* warning: Invalid argument supplied for foreach() in /var/www/vhosts/xxxxx.net/httpdocs/modules/panels/includes/plugins.inc on line 1123.

rosgar’s picture

Same here..

* warning: Invalid argument supplied for foreach() in /home/a123456/public_html/sites/all/modules/panels/includes/plugins.inc on line 1225.
* warning: Invalid argument supplied for foreach() in /home/a123456/public_html/sites/all/modules/panels/includes/plugins.inc on line 1123.

gerryk’s picture

I'm having a similar situation...
I create a new 2 pane panel, save through the various steps, and when I try the URL it fails, with 'page not found'
If I then go back to edit the panel and click save once more, the URL works, but I get the same '* warning: Invalid argument supplied for foreach()' errors as above.

Drupal 6.2 (I know...), PHP 4.4.7, Panels 6.x-2.0-alpha1, Clean URLs on

fatro’s picture

Version: 6.x-2.0-alpha1 » 6.x-2.x-dev

I also got these errors on panel page

* warning: Invalid argument supplied for foreach() in C:\AppServ\www\sites\all\modules\panels\includes\plugins.inc on line 1225.
* warning: Invalid argument supplied for foreach() in C:\AppServ\www\sites\all\modules\panels\includes\plugins.inc on line 1123.

fatro’s picture

Version: 6.x-2.x-dev » 6.x-2.0-alpha1

sorry ;P

UPDATE: found solution on this node http://drupal.org/node/304199

merlinofchaos’s picture

I'm not seeing these errors. I believe that they may be fixed in -dev already. CAn anyone confirm?

mrgoltra’s picture

Still getting the error. Don't know if I am the only one. Fresh install 6.6 and panels dev version snapshot 2008-Nov-17

* warning: Invalid argument supplied for foreach() in /sites/all/modules/panels/includes/display-layout.inc on line 210.

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

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

After I got the errors. I tried this patch http://drupal.org/files/issues/plugins.inc__4.patch but failed
HUNK #1 failed at 1120
HUNK #2 failed at 1224

I didn't try this one http://drupal.org/node/307591 because of Merlin's comment.

socketwench’s picture

Same thing here. A bit frustrating because it's holding up my 6.x update.

dkruglyak’s picture

Title: editing panel page title or URL path causes fatal error » Function _panels_page_menu_item is not implemented
Version: 6.x-2.0-alpha1 » 6.x-2.x-dev
Priority: Normal » Critical

In my panel I went ahead and enabled "menus as tabs" option. This caused the white screen of death with this error:

Fatal error: Call to undefined function _panels_page_menu_item() in /ebs/sdk/webapps/drupal/drupal-6.8/sites/all/modules/panels/panels_page/panels_page.menu.inc on line 372

Just to be sure I grepped the whole codebase for " _panels_page_menu_item" and found that it is called, but never declared.

sdboyer’s picture

Status: Active » Postponed

Yup, and the comment immediately above the call to that non-existent function notes that it doesn't exist.

In -dev, that entire section of the configuration is now just disabled (read: gone); we have enough problems with the menu system as it is without trying to handle that headache.

Sorry, but unless someone decides to dig in on that code and write a patch, it just ain't gonna happen in 6.x-2.x. I just don't have the cognitive latitude to think about yet one more dimension of menu insanity right now. You'll probably have to wait for what we pull together in Panels3.

merlinofchaos’s picture

Status: Postponed » Closed (won't fix)

Panels 2 is no longer available and is unsupported. Marking all Panels 2 issues won't fix.