Got this message when creating a frontpage with Panel Pages
warning: Invalid argument supplied for foreach() in /home2/samitier/public_html/cosasvedere/sites/all/modules/panels/includes/display-render.inc on line 168.
Troubleshooted by casting $display to an array in line 168. Changed the line from
foreach ($display->panels as $panel_name => $pids) {
to
foreach ((array)$display->panels as $panel_name => $pids) {
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | display.txt | 7.63 KB | Sancho Panza |
| #2 | task export.txt | 622 bytes | Sancho Panza |
Comments
Comment #1
merlinofchaos commentedCan you tell me what you were doing with that panel? That point of the code I don't think should have a display that isn't really a display (and casting should, I think, make the error disappear but also not actually render anything?)
Comment #2
Sancho Panza commentedI am attaching the export taks
The reason I tried casting was that a print_r of the $display started with "panels_display Object...." so not an array. I am also attaching that.
What I was doing was, I suppose, nothing strange. A stacked 2 columns layout. Two blocks on the top panel with visibility settings from a custom plugin. Nothing in the middle two. One block view and one panel pane view in the bottom panel
Comment #3
merlinofchaos commentedInteresting.
These:
Those appear to be broken mini panel objects, somehow. I think these are causing the problem, not your main display. I wonder how they are getting to be like this, though.
Comment #4
merlinofchaos commentedComment #5
Flying Drupalist commentedI also got this error. I'll come back here when I have more data.
Comment #6
esmerel commentedNo updates for more than 30 days.
Comment #7
afterdark commentedSame problem to me. And... NO panels added, no minipanels, no nothing. Just upgraded to panels-6.x-3.1, with ctools-6.x-1.1 dropped new stuff over the old files without disabling module as recommended, then disabled everything and uninstalled everything, to make things work fresh and new. It was when the message "warning: Invalid argument supplied for foreach() in (path to site)/sites/all/modules/panels/includes/display-render.inc on line 168." stucked in every page. Any clues?