I get this error when viewing a panel variant which includes an existing node, and 2 views.

recoverable fatal error: Object of class stdClass could not be converted to string in /var/aegir/platforms/drupal-6.16/sites/all/modules/ctools/plugins/content_types/node/node.inc on line 46.
recoverable fatal error: Object of class stdClass could not be converted to string in /var/aegir/platforms/drupal-6.16/sites/all/modules/ctools/views_content/plugins/content_types/views.inc on line 132.

I've had a look at those lines. The $panel_args array looks something like this on both occurances.

<?php
$panel_args = array(
  'home',
  (object) array(
    'title' => 'home',
    'content' => 'a bunch of html for the rendered node or view',
  ),
  array(
    'name' => 'page-home',
    'task' => array('lots', 'of', 'stuff'),
    'subtask' => array('lots', 'of', 'stuff'),
    'contexts' => array(),
    'arguments' => array().
    'handler' => new stdClass(),
  )
);
?>

I'm not including any contexts or forcing any arguments in the panel, and it's not critical as it's a recoverable error, but any insight you may have would be helpful!

CommentFileSizeAuthor
#5 764006-5.patch1.26 KBdrifter
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mcpuddin’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev

I got this same error both in 6.x-1.0 and 6.x-1.x.-dev when putting a views in the site template for the page manager:

recoverable fatal error: Object of class stdClass could not be converted to string in /Users/mcpuddin/Sites/drupal/clearspire/www/sites/all/modules/contrib/ctools/views_content/plugins/content_types/views.inc on line 132.

For views, the $panel_args argument in the function views_content_views_content_type_render in ctools/views_content/plugins/content_types/views.inc is being passed in objects instead of strings. I have narrowed down this to line 134 in panels_everywhere.module:

$info = ctools_context_handler_render($task, '', $contexts, array($_GET['q'], $content, $page), FALSE);

Removing $content and $page remove the error, but I am not sure of the implications of this piece of code or of it breaking as it is with views:

$info = ctools_context_handler_render($task, '', $contexts, array($_GET['q'], "", ""), FALSE);

Hopefully someone can look into this a bit farther who has more knowledge of the inner workings of this module. Good luck!

mcpuddin’s picture

Version: 6.x-1.x-dev » 6.x-1.0

Any one else experience this same thing? Would love some advice from people that are familiar with the code in this section. I have no problem with writing a patch if someone can confirm my change.

merlinofchaos’s picture

So removing that code will break the access mechanisms that let you compare to the URL or whether or not it's a page. I think we're going to have to go through and correct assumptions in content types where they all assume the arguments will be strings since in this case they're not.

drifter’s picture

subscribe, getting the same error

drifter’s picture

Project: Panels Everywhere » Chaos Tool Suite (ctools)
Version: 6.x-1.0 » 6.x-1.4
Status: Active » Needs review
FileSize
1.26 KB

Here's the minimal approach of checking the type in those two specific places. Fixed it for me, but might need a more general approach.

sdboyer’s picture

Assigned: Unassigned » sdboyer

Yes, I would prefer a more general approach. Having to check parameters to ensure they contain the data type they should suggests a problem that should be fixed in the calling code.

I'll have a look.

merlinofchaos’s picture

Well, Panels Everywhere is using non-string arguments to accomplish a couple of things that could not be accomplished with strings. So this actually probably *is* the right approach, because changing PE to not use strings might be rough.

merlinofchaos’s picture

Well, Panels Everywhere is using non-string arguments to accomplish a couple of things that could not be accomplished with strings. So this actually probably *is* the right approach, because changing PE to not use strings might be rough.

Plus, the place we're testing is nearly deprecated code *anyway*.

electroponix’s picture

I just applied the "fix", so I'm responding here in case I get hopelessly lost. Using AT Panels Everywhere...

merlinofchaos’s picture

Status: Needs review » Fixed

Committed to -dev. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.