Object of class stdClass could not be converted to string in esi_panels_url() (line 195 af ..../drupal7/sites/all/modules/contrib/esi/modules/esi_panels/esi_panels.module).

It seems that

// Add all the display arguments to the end of the URL.
$url .= '/' . implode('/', $display->args);

crashes. Args can be objects.
It happened when the ESI cache was enabled in a pane on a panels_everywhere site template.
Files: 
CommentFileSizeAuthor
#2 1841588_esi_panel_cache_fails.patch634 bytessam3k

Comments

It seems like it is used to generate a unique identifier?

I am having the same issue, without panels everywhere (just using panels). Assuming that it will be used to create a unique identifier, I did the following:

  $args = is_object($display->args) ? get_object_vars($display->args) : $display->args;
  $url .= '/' . implode('/', array_keys($args));
  // Always add the current page URL.
  $url .= '/' . base64_encode($_GET['q']);

This sent the error away, and now I see the esi tag baked in the HTML of the pane where I enabled the esi cache. But, to be honest, still don't know if it works as my varnish is not caching at the moment.

Status:Active» Needs review
StatusFileSize
new634 bytes

Attaching a patch.

patch doesn't apply
i think it has to be done from within the esi directory

Issue summary:View changes

Seems patch has no sense.
Normally $display->args could not be an object.
But $display->args[0] is object in most of cases.
As a result implode('/', array_keys($args)) will return '0', which is not pretty useful.

I think idea of add display args should be reviewed. Because i don't see clear way to handle all $display->args values within URL.
It could contain big set of data (nested arrays and etc).