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

Sylvain_G’s picture

Title: warning: Invalid argument supplied for foreach() in /home/pitsccbr/www.ecmpatterns.com/sites/all/modules/panels/includes/callbac » warning: Invalid argument supplied for foreach() in panels/includes/callback.inc

Same 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

  if (module_exists('page_manager')) {
    module_load_include('inc', 'page_manager', 'page_manager.admin');
    $tasks = page_manager_get_tasks_by_type('page');
    $pages = array('operations' => array());

    page_manager_get_pages($tasks, $pages);
    $count = 0;
    $rows = array();
    foreach ($pages['rows'] as $id => $info) {
      $rows[] = array(
        'data' => array(
          $info['data']['title'],
          $info['data']['operations'],
        ),
        'class' => $info['class'],
      );

      // Only show 10.
      if (++$count >= 10) {
        break;
      }
    }

line 53 is the foreach,

the $pages array looks like this

Array
(
    [operations] => Array
        (
        )

)

no $pages['rows']

looks like page_manager_get_pages($tasks, $pages); does nothing, and actualy $tasks is an empty array too

Sylvain_G’s picture

I 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

function ctools_plugin_get_info($module, $type) {
  $info = array();
  $function = $module . '_ctools_plugin_' . $type;
  if (function_exists($function)) {
    $info = $function();
  }

  // Apply defaults. Array addition will not overwrite pre-existing keys.
  $info += array(
    'module' => $module,
    'type' => $type,
    'cache' => FALSE,
    'cache table' => 'cache',
    'defaults' => array(),
    'hook' => $module . '_' . $type,
    'load themes' => FALSE,
  );

  return $info;
}

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 :(

Sylvain_G’s picture

wow 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

merlinofchaos’s picture

When you get this error, do you get similar errors from administer >> site building >> pages ?

Sylvain_G’s picture

the /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

:(

  $form['type'] = array(
    '#type' => 'select',
    '#title' => t('Type'),
    '#options' => $all + $form_state['pages']['types'], // <- line 239
    '#default_value' => 'all',
  );
$ php -v
PHP 5.2.6-1+lenny3 with Suhosin-Patch 0.9.6.2 (cli) (built: Sep 29 2009 11:37:33) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans
merlinofchaos’s picture

Any database looking errors showing up in watchdog? There's something seriously wrong breaking the load process. :/

Sylvain_G’s picture

i added

error_reporting(E_ALL ^ E_NOTICE);
ini_set('display_errors', true);

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

$ drush -dv watchdog show all
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.016 sec]                                                                [bootstrap]
Initialized Drupal 6.15 root directory at /home/syg/www.amnesty.fr [0.023 sec]                                                       [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.026 sec]                                                                [bootstrap]
Initialized Drupal site default at sites/default [0.049 sec]                                                                         [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.052 sec]                                                       [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.057 sec]                                                            [bootstrap]
Successfully connected to the Drupal database. [0.058 sec]                                                                        [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.064 sec]                                                                [bootstrap]
session_start(): Cannot send session cookie - headers already sent by (output started at /usr/local/bin/includes/drush.inc:439)   [warning]
[0.065 sec]
session_start(): Cannot send session cache limiter - headers already sent (output started at                                      [warning]
/usr/local/bin/includes/drush.inc:439) [0.065 sec]
Cannot modify header information - headers already sent by (output started at /usr/local/bin/includes/drush.inc:439) [0.067 sec]  [warning]
Cannot modify header information - headers already sent by (output started at /usr/local/bin/includes/drush.inc:439) [0.068 sec]  [warning]
Cannot modify header information - headers already sent by (output started at /usr/local/bin/includes/drush.inc:439) [0.068 sec]  [warning]
Cannot modify header information - headers already sent by (output started at /usr/local/bin/includes/drush.inc:439) [0.068 sec]  [warning]
Drush command could not be completed. [0.246 sec]                                                                                 [error]

error appear even if i comment the two added lines in index.php

Sylvain_G’s picture

new error msgs

    * warning: array_fill() [function.array-fill]: Number of elements must be positive in /includes/database.inc on line 253.
    * warning: implode() [function.implode]: Invalid arguments passed in /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 /sites/all/modules/contrib/ctools/includes/object-cache.inc on line 113.
    * warning: array_fill() [function.array-fill]: Number of elements must be positive in /includes/database.inc on line 253.
    * warning: implode() [function.implode]: Invalid arguments passed in /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 /sites/all/modules/contrib/ctools/includes/object-cache.inc on line 113.
    * warning: Invalid argument supplied for foreach() in /sites/all/modules/contrib/panels/includes/callbacks.inc on line 53.

definitely DB related c.name in ()

here is the schema of the related tables

--
-- Structure de la table `ctools_object_cache`
--

CREATE TABLE IF NOT EXISTS `ctools_object_cache` (
  `sid` varchar(64) NOT NULL,
  `name` varchar(128) NOT NULL,
  `obj` varchar(32) NOT NULL,
  `updated` int(10) unsigned NOT NULL default '0',
  `data` longtext,
  PRIMARY KEY  (`sid`,`obj`,`name`),
  KEY `updated` (`updated`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


--
-- Structure de la table `sessions`
--

CREATE TABLE IF NOT EXISTS `sessions` (
  `uid` int(10) unsigned NOT NULL,
  `sid` varchar(64) NOT NULL default '',
  `hostname` varchar(128) NOT NULL default '',
  `timestamp` int(11) NOT NULL default '0',
  `cache` int(11) NOT NULL default '0',
  `session` longtext,
  PRIMARY KEY  (`sid`),
  KEY `timestamp` (`timestamp`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

the ctools_object_cache table is empty

merlinofchaos’s picture

Hmm. 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.

Sylvain_G’s picture

Hum is there a way to replay page manager without killing my existing panels?
i

drush mm uninstall page_manager
drush mm enable page_manager

got same problem

i also notice the following in page_manager.install

function page_manager_install() {
  drupal_install_schema('page_manager');

  // If we're swapping over from delegator module, take away its tables.
  // Take THAT, delegator!
  if (db_table_exists('{delegator_pages}')) {
    db_query("INSERT INTO {page_manager_pages} (pid, name, task, admin_title, path, access, menu, arguments, conf) (SELECT pid, name, task, admin_title, path, access, menu, arguments, conf FROM {delegator_pages})");
    db_query("INSERT INTO {page_manager_handlers} (SELECT did, name, task, subtask, handler, weight, conf FROM {delegator_handlers})");
    db_query("INSERT INTO {page_manager_weights} (SELECT name, weight FROM {delegator_weights})");

    // Update all of the 'panel_page' type pages appropriately:
    $result = db_query("SELECT * FROM {page_manager_pages} WHERE task = 'panel_page'");
    while ($page = db_fetch_object($result)) {
      $page->conf = unserialize($page->conf);
      $handler = new stdClass();
      $handler->name = 'page_' . $page->name . '_panel_context';
      $handler->task = 'page';
      $handler->subtask = $page->name;
      $handler->handler = 'panel_context';
      $handler->weight = 0;
      $handler->conf = array();
..

I don't have this delegator_pages table :(

merlinofchaos’s picture

You 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.

Sylvain_G’s picture

the page_manager looks correctly installed

[syg@DEV64][~/www.test.fr/sites/all/modules/contrib/ctools/page_manager/plugins/tasks]
$ ll
total 164K
drwxr-xr-x 3 www-data www-data 4,0K jan 12 12:36 ./
drwxr-xr-x 4 www-data www-data 4,0K jan 12 12:36 ../
-rw-r--r-- 1 www-data www-data 3,4K jan 12 12:36 blog.inc
-rw-r--r-- 1 www-data www-data 4,6K jan 12 12:36 blog_user.inc
-rw-r--r-- 1 www-data www-data 3,5K jan 12 12:36 contact_site.inc
-rw-r--r-- 1 www-data www-data 4,7K jan 12 12:36 contact_user.inc
-rw-r--r-- 1 www-data www-data 6,2K jan 12 12:36 node_edit.inc
-rw-r--r-- 1 www-data www-data 5,2K jan 12 12:36 node_view.inc
-rw-r--r-- 1 www-data www-data  51K jan 12 12:36 page.admin.inc
-rw-r--r-- 1 www-data www-data  23K jan 12 12:36 page.inc
-rw-r--r-- 1 www-data www-data 3,3K jan 12 12:36 poll.inc
-rw-r--r-- 1 www-data www-data 7,3K jan 12 12:36 search.inc
drwxr-xr-x 6 www-data www-data 4,0K jan 12 12:37 .svn/
-rw-r--r-- 1 www-data www-data  12K jan 12 12:36 term_view.inc
-rw-r--r-- 1 www-data www-data 4,7K jan 12 12:36 user_view.inc

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

merlinofchaos’s picture

Again, 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.

ejolivet’s picture

Hello

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

Sylvain_G’s picture

here 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?

merlinofchaos’s picture

Nothing 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.

blueprint’s picture

Fresh 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.

blueprint’s picture

Follow 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

blueprint’s picture

Yet 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?

blueprint’s picture

with 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

merlinofchaos’s picture

The object cache cannot be turned off because without it, there is no way to actually remember edits between page loads.

blueprint’s picture

Ok, 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

Sylvain_G’s picture

i upgrade to

* Chaos tool suite [ctools-6.x-1.3],
* Panels [panels-6.x-3.3]

Same error persist.

Sylvain_G’s picture

Thank you, i will create a jailed env where you will have full access, i'll send you details by private Msg

Sylvain_G’s picture

Hey 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

Sylvain_G’s picture

I 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

mastho95’s picture

Hi Sylvain_G,
did you finally solve your problem?, I get the same issue and I do not manage to fix it.
Thks

kobnim’s picture

subscribing (same problem)

Sylvain_G’s picture

hi 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

kobnim’s picture

The 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

kobnim’s picture

kobnim’s picture

fyi, 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.

sraisz’s picture

Hi,

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?

boabjohn’s picture

Not 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:

* warning: array_fill() [function.array-fill]: Number of elements must be positive in /home/blah/drupal/includes/database.inc on line 253.

* warning: implode() [function.implode]: Bad arguments. in /home/blah/drupal/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/blah/drupal/sites/all/modules/ctools/includes/object-cache.inc on line 113.
    
* warning: Invalid argument supplied for foreach() in /home/blah/drupal/sites/all/modules/panels/includes/callbacks.inc on line 53.

Am now going to uninstall panels/ctools and try again.

boabjohn’s picture

Back 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.

sraisz’s picture

I was able to fix this problem by disabling and uninstalling ctools, page manager and panels and then downloading and reinstalling

kmonty’s picture

Using Persistent URLs (PURL) and views_modes caused this error. Disabling them fixed the bug.

Sylvain_G’s picture

@merlin i sent you all details to connect my jailed env

cheers

scott859’s picture

Same 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.

scott859’s picture

I 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.

Sylvain_G’s picture

Interesting, we overthere do not use this ajax module

cm_is’s picture

In my case the Persitent URL modules caused the warning.

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

I'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.

Sylvain_G’s picture

:( thanks for your effort anyway, can remove this jailed env?

merlinofchaos’s picture

Yes it is.

idcm’s picture

I 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.

idcm’s picture

I 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.

idcm’s picture

ummm, 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

merlinofchaos’s picture

idcm: 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:

if (empty($account->roles)) { dsm(debug_backtrace()); } 

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.

idcm’s picture

the IDCM issue is now at http://drupal.org/node/953724

Letharion’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Because 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.