On one of my panels, I get the following notice shown on the page multiple times:

Notice: Array to string conversion in panels_hash_cache_get_id() (line 121 of /var/aegir/platforms/panopoly-7.x-1.30/sites/website.com/modules/panels_hash_cache/plugins/cache/panels_hash_cache.inc).

Anything I can provide to help debug the issue further? Thanks for the great module by the way!

Comments

NWOM created an issue. See original summary.

nwom’s picture

Issue summary: View changes
damienmckenna’s picture

I believe it's these lines at fault:

  if (!empty($conf['granularity']['args'])) {
    foreach ($args as $arg) {
      $hashable_string .= $arg;
    }
  }

The question is, how to convert the arguments to strings so they can be handled properly? Could you please install the Devel module to see what the arguments look like? THanks.

nwom’s picture

Status: Active » Postponed (maintainer needs more info)

I put my use-case for Panels Hash Cache on the back burner for now, but want to look at it in the next few weeks. If I'm lucky, maybe the issue solved itself. I'll be sure to keep you posted as soon as I do. Thanks.

eyilmaz’s picture

Assigned: Unassigned » eyilmaz
Status: Postponed (maintainer needs more info) » Active

We faced this issue also in one of our projects. I would advice to do something like:

if (is_string($arg)) {
$hashable_string .= $arg;
}
else {
$hashable_string .= serialize($arg);
}