recoverable fatal error: Object of class stdClass could not be converted to string in panels/panels_views/panels_views.module on line 124.

This happens when I view an overridden node which has a view in one of its panes consisting of a teaser type list of related nodes.
The argument/context passed to the view/pane is the Node ID, and on top of the above error, the view shown in the pane is a full list of nodes, not just the ones referencing that node.

Comments

Renee S’s picture

I marked this one as a duplicate of this issue. It seems that the argument isn't getting into the view, something's getting passed that the view panes module is choking on.

Renee S’s picture

Category: support » bug

And sorry, this should be a bug report!

Renee S’s picture

Ok, I spent a bit of time on this. It has something to do with the view being treated as a block instead of as a page. When I created a block view then it worked, even thought it was set as a page view in the panel.

Renee S’s picture

Status: Active » Closed (fixed)

Ok, I think problem is solved - need to create the Panel View setting in the view. D'oh. Although that doesn't explain why views are also available to be added, and why they're wonky, but I think that might get ironed out with subsequent releases.

mistresskim’s picture

z allen, what do you mean by this?

...need to create the Panel View setting in the view

Do you mean adding a 'Panel Pane' display from the Views UI? If so, where is that option? It says to do this on the admin/panels/views page but there is no 'Panel Pane' option in my display dropdown.

bejam’s picture

Am a bit confused too (and getting this error). Could you clarify?

Renee S’s picture

Status: Closed (fixed) » Active

Yes, that's what I meant - I am seeing a 'Panel pane' option, and after I used that my problems disappeared. But if you're not seeing it, then...??

But under "Views panes" you can check the following:

If checked, all views will be made available as content panes to be added to content types. If not checked, only Views that have a 'Panel pane' display will be available as content panes.

It appears that this isn't working properly, because I can *only* get 'Panel pane' displays to work as a content pane. Sigh.

bejam’s picture

I am using a panel page (have the panel views option unticked). Works ok until I try to insert a view into the panel. Have a very simple view that just does a filter by node-type (no arguments from panel required) and am still getting the error above.

bejam’s picture

Anybody got any idea why this isn't working (well at least for me!). I have no option for panel view in the views UI dropdown. If I add the block to my pane I get the same error. Have done a bit of debugging on line 124 of panel_views.module and the panels_args vairable passed into the function and treated as an array is an array but does not contain expected args, rather has a single entry which is a class (node object) as below. Am using the very latest HEAD for views and panels (perhaps something changed in views that broke this part of panels??).

Array
(
[0] => stdClass Object
(
[nid] => 3
[type] => og
[language] =>
[uid] => 1
[status] => 1
[created] => 1222167953
[changed] => 1222167953
[comment] => 0
[promote] => 0
[moderate] => 0
[sticky] => 0
[tnid] => 0
[translate] => 0
[vid] => 3
[revision_uid] => 1
[title] => Front Page
[body] =>
[teaser] =>
[log] =>
[revision_timestamp] => 1222167953
[format] => 1
[name] => administer
[picture] =>
[data] => a:0:{}
[path] => front
[og_selective] => 1
[og_description] => Front Page
[og_theme] =>
[og_register] => 1
[og_directory] => 1
[og_language] =>
[og_private] => 0
[last_comment_timestamp] => 1222167953
[last_comment_name] =>
[comment_count] => 0
[taxonomy] => Array
(
)

)

)

bejam’s picture

Did a fresh install of drupal 6.4 for my own sanity last night to make sure it wasn't my version that was screwed. Installed views 6.x-2.0-rc3, panels HEAD, and organic groups HEAD. Created a new view (this time "panel page" is listed as an option) accepting a single argument. Added the view to my panel page, which has a node ID context which is passed to the pane view. Still getting the error above.

sdboyer’s picture

Just wanted to quickly note that this IS on my radar, and I'm aiming for some Panels time this weekend. It's not the highest thing on the list, but ideally I'll have a fix sorted by the next release.

bejam’s picture

Fab! This is a blocker for me using panels at the moment.... no context passing (especially when using organic groups).

bejam’s picture

Any progress on this? Really want to use panels but without the argument passing working, panels are not so useful for me (am I right in thinking this issue stops argument passing to panes working properly??)

merlinofchaos’s picture

bejam: It does appear to break arguments that are not contexts, yes, and in more than just views.

Renee S’s picture

benjam: Panels Pages in Views is a views plugin module you'll have to grab separately.

tanc’s picture

Also getting this error but only when the panel has some arguments which I guess are mistakenly being passed to the view (the view doesn't use any arguments). Anyway, I think Sam is onto this so we'll sit tight and wait for the outcome.

merlinofchaos’s picture

Ok, the problem right now is that Panels isn't preserving the arguments that panels_views expects. The line causing this error can probably be safely commented out. It means that using @0 in the 'args' textfield in the pane configuration will not work, but I imagine that's not as much in use right now. (Using %0 I believe should continue to work as that pulls from arg()).

This one will take us awhile to fix. The D6 menu system really threw wrenches into this.

mfb’s picture

Subscribe :)

Flying Drupalist’s picture

Hi, also wondering about this.

jacobson’s picture

The code cited is on line 124 of panels_views.module and is:

  foreach ($panel_args as $id => $arg) {
    $args = str_replace("@$id", $arg, $args);
  }

I commented out these lines per your suggestion, and the error no longer appears.

Hope this helps. HAJ

aaron’s picture

subscribing. also confirming that the workaround in #17 and #20 suppress the error.

nicholasthompson’s picture

Version: 6.x-2.0-alpha1 » 6.x-2.x-dev

I can also confirm that commenting out the arguments makes the error go away.... Not really a sollution though ;-)

Good luck getting this fixed - wish I had a clue where to start looking!

I've moved the version to 2.x-dev as thats the one I checked out and its still present... Sorry if this is the wrong thing to do.

dmadruga’s picture

Subscribe.

masood_mj’s picture

Subscribing

sdboyer’s picture

Status: Active » Fixed

Fixed in -dev.

I think. Confirmation would be nice, I just don't have time to test everything atm

Status: Fixed » Closed (fixed)

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