When trying to cache a pane in a mini panel based on arguments, I receive this error:

Recoverable fatal error: Object of class stdClass could not be converted to string in panels_simple_cache_get_id() (line 100 of /sites/all/modules/panels/plugins/cache/simple.inc).

Comments

sean_e_dietrich’s picture

Issue summary: View changes

Recoverable fatal error: Object of class stdClass could not be converted to string in panels_simple_cache_get_id() (line 112 of /sites/all/modules/contrib/panels/plugins/cache/simple.inc).

I am receiving this issue as well. Has there been any movement?

erwangel’s picture

Same here, error still present in 7.x-3.7, but...
My case:
- a block issued by a views view listing 5 items of same type as the one in main content, excepted the one in content (excluded by a views contextual filter)
- this block is placed at second sidebar of the default site template panel page (admin/structure/pages, panels 7.x-3.7)
- block settings at template panel page "content:nid" = "content ID" (that is sent to my contextual filter)

Thinking this setting was an argument, I set the bock cache (at template panel page) granularity to "arguments". This provoked the above error and a white page.

Setting granularity to "none" doesn't provoke an error but it's not what I wanted as this keeps the same block whatever my "content ID" is and thus making useless my exclusion of the main content from the listing. So I tried to see what happens with granularity set to "context" and it worked !

Conclusion: my "content ID" is not seen by the panel page as an "argument" but as a "context" which in final analysis is correct. In views construction of the block "content ID" is a "contextual filter".

Conclusion 2: even if "context" seems correct, this situation leads user to confuse "argument" and "context". Is a parameter an argument or a context ? Welcome to a byzantine discussion about angel's gender.

Conclusion 3: Nevertheless, there is a problem with the error thrown if we set "argument" where it should be "context" and the is no other warning that our settings are wrong.

Hope it helps resolution

_KurT_’s picture

still present in 7.x-3.9