Closed (cannot reproduce)
Project:
Panels
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jan 2010 at 21:16 UTC
Updated:
19 Oct 2011 at 06:45 UTC
I get following message when i display the panels admin screen:
warning: Invalid argument supplied for foreach() in /home/xxx/www.xxx.com/sites/all/modules/panels/includes/callbacks.inc on line 53.
Previous stored panels are hidden und not functional.
I use the newest Drupal and modules versions.
wr
paulap
Comments
Comment #1
Sylvain_G commentedSame here with D6.15 panels 6.x-3.2 + ctools 6.x-1.2
Actually a brand new installation does not have this issue, i wonder if it's DB content related but cannot figure out where to look
The offending code looks like this
line 53 is the foreach,
the $pages array looks like this
no $pages['rows']
looks like page_manager_get_pages($tasks, $pages); does nothing, and actualy $tasks is an empty array too
Comment #2
Sylvain_G commentedI found out the following
the panels code will call function ctools_plugin_get_info($module, $type)
for the following params
ctools_get_plugins Module : purl Type : processor
ctools_get_plugins Module : purl Type : processor
ctools_get_plugins Module : purl Type : processor
ctools_get_plugins Module : page_manager Type : tasks
For thoses 4 calls the function ctools_plugin_get_info($module, $type) will be called two times
the two calls would do a function_exists for
function purl_ctools_plugin_processor
function page_manager_ctools_plugin_tasks
AFIK none of the following functions exists in my installation :(
Comment #3
Sylvain_G commentedwow on my working D6.15 installation i had edited function ctools_plugin_get_info($module, $type) to figure out which methods exists and which does not exists.
And suddenly D6.15 got same error, after reverting my changes site is still broken O_o
Comment #4
merlinofchaos commentedWhen you get this error, do you get similar errors from administer >> site building >> pages ?
Comment #5
Sylvain_G commentedthe /admin/build/pages url is blank page, with debug on
Fatal error: Unsupported operand types in /ctools/page_manager/page_manager.admin.inc on line 239
:(
Comment #6
merlinofchaos commentedAny database looking errors showing up in watchdog? There's something seriously wrong breaking the load process. :/
Comment #7
Sylvain_G commentedi added
to index.php to display the Fatal Error, can it break it all?
nothing related to database in watchdog.
I also notice that drush does not work
error appear even if i comment the two added lines in index.php
Comment #8
Sylvain_G commentednew error msgs
definitely DB related c.name in ()
here is the schema of the related tables
the ctools_object_cache table is empty
Comment #9
merlinofchaos commentedHmm. Those all look like side effects of there being no pages. Ordinarily that's not possible since page manager ships with some pages, so validation to make sure some pages were listed never needed to happen.
Comment #10
Sylvain_G commentedHum is there a way to replay page manager without killing my existing panels?
i
got same problem
i also notice the following in page_manager.install
I don't have this delegator_pages table :(
Comment #11
merlinofchaos commentedYou should only have the delegator tables if upgrading from an alpha version of Panels that had the delegator. Their absence is a good thing.
The table itself should be empty when Page Manager is freshly installed; the plugins should be supplying the initial pages.
Is it possible that the plugins are not properly installed? The ctools/page_manager directory should contain a 'plugins/tasks' directory with several .inc files in it.
Comment #12
Sylvain_G commentedthe page_manager looks correctly installed
Can you give me a sql dump of the page_manager_pages table that should not be empty? may be it wil fix it all
Comment #13
merlinofchaos commentedAgain, the table will only be not empty if you have created pages. It *should* be empty when you install. So I don't think the table is the problem.
Comment #14
ejolivet commentedHello
I am having quite the same issue on my fresh Drupal install using basic modules with Panels (admin, cck, views).
I lost my default pages and the ability to add some.
Any new idea on where the problem comes from ?
Thaks a lot
Comment #15
Sylvain_G commentedhere is the list module i have
$ drush mm list
missing: getid3 module_grants og services simpletest workflow workflow_access
enabled: addthis admin_menu adminrole aggregator auto_nodetitle batax better_messages block block_class book calendar cck_blocks color contact content content_profile context context_contrib context_ui ctools custom_breadcrumbs date date_api date_locale date_timezone date_tools dblog diff extlink favicon features fieldgroup filefield filter flowplayer3 googleanalytics help i18n i18nblocks i18ncontent i18nlogo i18nmenu i18nstrings i18nsync i18ntaxonomy i18nviews image image_attach image_gallery image_im_advanced image_import imageapi imageapi_gd imagecache imagefield img_assist jcalendar jq jq_bridge jquery_ui languageicons lightbox2 link locale lowername menu menu_block menu_breadcrumb module_weights nlsubscribe node nodequeue nodereference nodewords nodewords_basic nodewords_extra nodewords_verification_tags number optionwidgets page_manager page_title panels panels_mini panels_node path pathauto pathfilter pngfix purl seochecklist site_map swfobject2 swftools system system_module tagadelic taxonomy taxonomy_access text text_resize token tokenSTARTER token_actions translation translation_helpers translation_table update upload user userreference util vertical_tabs views views_content views_export wysiwyg xmlsitemap xmlsitemap_engines xmlsitemap_node
Is there a known conflict between panels and one i used?
Comment #16
merlinofchaos commentedNothing jumps out at me.
If you can provide me shell and admin access to the site I could do some debugging and see if I can figure out why the pages aren't being read.
Comment #17
blueprint commentedFresh installs in the context of the ngp profile (built with features, context, et. al.) display the same behaviour as outlined above.
For the hell of it, since it's NOT possible to disable and re-install panels and ctools (since some features have dependencies, etc) I tried mini_panels and node panels.
THESE work as expected. It's just the panel pages which are broken. It is indeed some load problem. The page_manager_page_new() can't be called since admin.inc file appears not to load....
Since panels, per-se, seem to function, I'd chalk it up to ctools...
This is an aegir deploy of an ngpprofile, with:
D6.15 panels 6.x-3.2 + ctools 6.x-1.2
as above.
Comment #18
blueprint commentedFollow up, my last comment:
added:
require_once './' . drupal_get_path('module', 'page_manager') . "/plugins/tasks/page.inc";
and at least got to a create admin/build/pages/add/ page. There, after being able to enter the primary data (title, sysid) I wound up at the original probelm report.
Fatal error: Unsupported operand types in /var/aegir/platforms/ngp/sites/all/modules/ctools/page_manager/plugins/tasks/page.admin.inc on line 232
Comment #19
blueprint commentedYet another follow up. It appears the object_cache is screwed. I tested the += array merge on the forms and was able to see the structures. However, the object_cache kicks in and it becomes difficult to debug. Is there a simple way to turn it off?
Comment #20
blueprint commentedwith array merge instead of += (ie. $form_info['forms'] = array_merge($form_info['forms'], $handler_plugin['forms']); )
I get this far.
Fatal error: Unsupported operand types in /var/aegir/platforms/ngp/sites/all/modules/ctools/page_manager/page_manager.admin.inc on line 239
Comment #21
merlinofchaos commentedThe object cache cannot be turned off because without it, there is no way to actually remember edits between page loads.
Comment #22
blueprint commentedOk, so cache remains. I realized that the only reason for the failure of the array merge was that one of the values simply wasn't initialized. Back to the load problem.
I've just done a clean install (dumped the database, removed and drush dl'ed the panels and ctools). I still get
Fatal error: Unsupported operand types in /var/aegir/platforms/ngp/sites/all/modules/ctools/page_manager/page_manager.admin.inc on line 239
I examined another install (an openpublish) where pages works correctly and (since there aren't any) noted that there were no values for the page-manager in the db.
So, it seems to be some module conflict (as comments above sort of suggest)? How to you suggest debugging this?
Greetings,
mark
Comment #23
Sylvain_G commentedi upgrade to
* Chaos tool suite [ctools-6.x-1.3],
* Panels [panels-6.x-3.3]
Same error persist.
Comment #24
Sylvain_G commentedThank you, i will create a jailed env where you will have full access, i'll send you details by private Msg
Comment #25
Sylvain_G commentedHey merlin, i dig a clone of my broken site, can you give an email where i can ship you details?
You can contact me at merlinofchaos.6.meshee@spamgourmet.com
cheers
Comment #26
Sylvain_G commentedI finaly move to another solution and remove panels/ctools from my module map :( to bad panels is so kewls
@merlin i still have a jailed env for you if you want to dig it, just mail me at merlinofchaos.6.meshee@spamgourmet.com
Comment #27
mastho95 commentedHi Sylvain_G,
did you finally solve your problem?, I get the same issue and I do not manage to fix it.
Thks
Comment #28
kobnim commentedsubscribing (same problem)
Comment #29
Sylvain_G commentedhi dudes, no real solution, i just removed the panel and use a custom page tpl to handle my layout
still no news from merlinofchaos,
keep in touch guys
Comment #30
kobnim commentedThe problem appears to be some sort of conflict with the swftools module.
When I disable swftools, the warning message goes away.
Hope that helps.
- Mindy
Comment #31
kobnim commentedComment #32
kobnim commentedfyi, on a fresh re-install with swf-tools enabled ...
a) the warning message pops up when I go to admin/build/pages
b) my panels are not displayed when I go to admin/build/panels
When I disable swf-tools, both problems go away.
Comment #33
sraisz commentedHi,
I'm facing the same problem. Our host recently moved us to a new server and in the process changed a lot of stuff. Somehow for one of our multi-site installs panels broke with the same error as above.
I don't have swf-tools, so that it is not the problem.
Any other suggestions?
Comment #34
boabjohn commentedNot sure it helps, but I have a clean D6.16 install with heaps of modules and had installed panels/ctools when I first se the site up...but had not actually gotten around to creating any panels assets at all.
I had forgotten this fact, and was playing around with a view and nominated to create a panels display. The view saved, but then when I went to Panels>Dashboard, I got the same error as starting this thread.
I changed the display type to grid, then read this thread and reloaded the Dashboard page a few times and my errors started to stack up.
Note that this is on an install with no panel assets (pages, panes, etc) at all.
Here's where the errors got to:
Am now going to uninstall panels/ctools and try again.
Comment #35
boabjohn commentedBack on track after re-installing Panels. I wanted to do a clean install of ctools as well, but the module dependency interconnects now are so noodled (spaces, context, etc etc) I gave up and just did a Panels re-install.
Comment #36
sraisz commentedI was able to fix this problem by disabling and uninstalling ctools, page manager and panels and then downloading and reinstalling
Comment #37
kmontyUsing Persistent URLs (PURL) and views_modes caused this error. Disabling them fixed the bug.
Comment #38
Sylvain_G commented@merlin i sent you all details to connect my jailed env
cheers
Comment #39
scott859 commentedSame issue here (panels version 3.5 - ctools version 1.6) - no luck in a successful fix by re-installing ctools and panels.
Here's more about what I am getting:
From the dashboard - when I go to the following:
Panel Page: admin/build/pages/add - page not found
Panel Node:node/add/panel - access denied
Mini Panels: admin/build/panel-mini/add - everything okay on this page
When I go to admin/build/pages, I receive the following error:
Fatal error: Unsupported operand types in /home/sample-site/public_html/sites/all/modules/ctools/page_manager/page_manager.admin.inc on line 244
Returning back to the previous page, I get these messages:
# warning: array_fill() [function.array-fill]: Number of elements must be positive in /home/sample-site/public_html/includes/database.inc on line 253.
# warning: implode() [function.implode]: Invalid arguments passed in /home/sample-site/public_html/includes/database.inc on line 253.
# user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY c.updated ASC' at line 1 query: SELECT c.name, s.uid, c.updated FROM ctools_object_cache c INNER JOIN sessions s ON c.sid = s.sid WHERE c.obj = 'page_manager_page' AND c.name IN () ORDER BY c.updated ASC in /home/sample-site/public_html/sites/all/modules/ctools/includes/object-cache.inc on line 116.
Comment #40
scott859 commentedI believe I have found a solution (at least for my case). There was an incompatibility with the Ajax module. Installing the latest dev version of the Ajax module has appeared to have solved this issue.
Comment #41
Sylvain_G commentedInteresting, we overthere do not use this ajax module
Comment #42
cm_is commentedIn my case the Persitent URL modules caused the warning.
Comment #43
merlinofchaos commentedI'm out of ways to work on this. I played around with the jailed environment, found a few things, but not really enough to figure this out.
For the most part, it appears to be caused by a bug in Drupal core and other modules causing problems in their hook_schema.
Comment #44
Sylvain_G commented:( thanks for your effort anyway, can remove this jailed env?
Comment #45
merlinofchaos commentedYes it is.
Comment #46
idcm commentedI don't know if you are still trying to figure out what's wrong but I thought I would share just in case it helps.
It acts up when I enable a user content item on node template variants. But if I add a user context to a custom page and then add a user content item for logged in user, it doesn't get the error. What's odd is, I have been adding and deleting variants in this practice site and haven't had an issue until today.
I noticed that only part of my error was the same as others above. I have an SQL issue having to do with the user (see below). In D6.19, there is an issue with the user module. I undid the patch, no diff.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /modules/user/user.module on line 518.
THEN
I tested on a fresh install - panels, ctools, views, and devel installed on D6.19 core with patch referenced in http://drupal.org/node/820366. No error.
Comment #47
idcm commentedI am doing some additional testing. In the site that's getting the warnings, I uninstalled (not just disabled) All Panels modules and all ctools modules except CTools itself. I have context running and was hoping not to loose my contexts. I then reinstalled all the modules and tried to add user content. I get the same errors. Does this mean the problem might be in CTools or CTools related at least. Hope this helps.
* warning: array_fill() [function.array-fill]: Number of elements must be positive in /home/idcmi/drupallayout.idcminnovations.com/html/includes/database.inc on line 253.
* warning: implode() [function.implode]: Invalid arguments passed in /home/idcmi/drupallayout.idcminnovations.com/html/includes/database.inc on line 253.
* warning: array_keys() [function.array-keys]: The first argument should be an array in /home/idcmi/drupallayout.idcminnovations.com/html/modules/user/user.module on line 518.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in .../modules/user/user.module on line 518.
Comment #48
idcm commentedummm, the uninstall is not clearing the settings from the database. In the test I just did, I noticed that two of the system pages were still enabled when I reinstalled Panels. I thought maybe Ctools might have something to do with it since I didn't uninstall it. But I have uninstalled all of Ctools and all of Panels now and reinstalled and the system pages are still enabled. I recreated the variant and still get the errors.
I have manually gone in and cleared ctools and panels entries from the variable, system, and cache, cache_form tables. Nothing seems to work. I tried uninstalling context, profile, content profile. Nothing.
BUT, on a clean install, it works.
I assume something is interfering but it is hard to figure which. I have these still installed on the "broken" site:
cck + various cck fields
views
composite
vertical tabs
node form settings
automatic nodetitles
menu breadcrumb
pathauto
submitted by
page theme
jquery ui
token
location
gmap
imagecache and imageapi
devel
administration menu
Comment #49
merlinofchaos commentedidcm: I think your error is different, and probably should be a new issue.
It looks like what's going on is that user_access() is being called with a broken $account somewhere.
The best way to debug this would be to add this piece of code into user_roles() itself. Assuming you have devel.module enabled:
You can then see where the user_access call that's doing that is coming from. And possibly some other data as well.
Let's take this to another issue if you want to go on debugging this.
Comment #50
idcm commentedthe IDCM issue is now at http://drupal.org/node/953724
Comment #51
Letharion commentedBecause the issue queue has a great number of open issues, and there are few volunteers to tend them, I must prune old issues that are left untouched for a long time.
This issue has been marked "Postponed, needs info" for a long period, and is therefore closed. If this issue is still relevant to you, please feel free to re-open it.