Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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!
Comment | File | Size | Author |
---|---|---|---|
#5 | 764006-5.patch | 1.26 KB | drifter |
Comments
Comment #1
mcpuddin CreditAttribution: mcpuddin commentedI 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:
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:
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:
Hopefully someone can look into this a bit farther who has more knowledge of the inner workings of this module. Good luck!
Comment #2
mcpuddin CreditAttribution: mcpuddin commentedAny 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.
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedSo 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.
Comment #4
drifter CreditAttribution: drifter commentedsubscribe, getting the same error
Comment #5
drifter CreditAttribution: drifter commentedHere's the minimal approach of checking the type in those two specific places. Fixed it for me, but might need a more general approach.
Comment #6
sdboyer CreditAttribution: sdboyer commentedYes, 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.
Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedWell, 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.
Comment #8
merlinofchaos CreditAttribution: merlinofchaos commentedWell, 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*.
Comment #9
electroponix CreditAttribution: electroponix commentedI just applied the "fix", so I'm responding here in case I get hopelessly lost. Using AT Panels Everywhere...
Comment #10
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted to -dev. Thanks!