I'm running:
drupal 6.15
ctools 6.x-1.3
panels 6.x-3.3
Using:
chaos tools
page manager
views content panes
panels
panel nodes
When I save the modules page (regardless of whether I change anything) I get the following errors:
* warning: Invalid argument supplied for foreach() in /var/www/vhosts/mysite/sites/all/modules/vanilla/ctools/page_manager/page_manager.module on line 121.
* warning: Invalid argument supplied for foreach() in /var/www/vhosts/mysite/sites/all/modules/vanilla/ctools/page_manager/page_manager.module on line 152.
After a few refreshes the warnings go away but they come back if I save the page again.
Comments
Comment #1
Agileware CreditAttribution: Agileware commentedThe warnings also appear when saving the content type edit page.
For example, admin/content/node-type/page
Comment #2
Agileware CreditAttribution: Agileware commentedAnd also when saving views & panels pages.
Possibly in other places too.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedI'm getting a similar error, but this time on an All blogs page. It's fine if there's no content, but if I add an existing node I get an error message on the /blog page:
warning: Invalid argument supplied for foreach() in /home/sites/haringeyshed.org/public_html/newsite/sites/all/modules/ctools/plugins/content_types/node/node.inc on line 46.
And if I add a block display of a view I get:
warning: Invalid argument supplied for foreach() in /home/sites/haringeyshed.org/public_html/newsite/sites/all/modules/ctools/views_content/plugins/content_types/views.inc on line 131.
as well.
It doesn't stop the content from being displayed, but I would like to sort it out.
Anyone got any ideas?
Thanks!
Matt
UPDATE:
I removed lines 46 of node.inc and 131 of views.inc just to see what happened, and the error messages went away. Turns out it was the same bit of code causing a problem in each:
foreach ($panel_args as $id => $arg) {
$nid = str_replace("@$id", $arg, $nid);
}
If I leave the code out permanently, will it do terrible violence to the rest of the module or should it be ok?
Thanks!
Comment #4
Agileware CreditAttribution: Agileware commented@rick_random777:
Your issue is definitely a different issue so you should open a new issue for it.
This issue is related to the page manager module (more specifically the function page_manager_get_task_subtasks())
but your issue is not related to the page manager.
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedI believe this is caused by a task having a missing/invalid subtasks callback. I'm not sure why this could happen, but I've put in a piece of code to make sure that it at least returns an array() in the failure case.
Comment #7
Chris Johnson CreditAttribution: Chris Johnson commentedThis error still occurs in the 1.7 version (dating a couple weeks after your post above regarding the piece of code you put in to return an array). For me, it occurred when I ran update.php to update the devel module.
Comment #8
Ashlar CreditAttribution: Ashlar commentedThis bug report has not been active for over six months. In an effort to clean-up the issue queue this item has been closed. If your modules are current and the report is still relevant please feel free to change the Status back to active.