warning: unserialize() expects parameter 1 to be string, object given in /home/.mysite/sites/all/modules/panels/panels_simple_cache/panels_simple_cache.module on line 74.

cache set to none - for whole page to be cache

I hope I did this corectly - I did't see this issue in release notes

CommentFileSizeAuthor
#5 panels_simple_cache.patch290 bytesCauliflower

Comments

Flying Drupalist’s picture

I'm also getting this.

Flying Drupalist’s picture

Yep after more testing I can confirm this, cache always give this error.

Cauliflower’s picture

Hi,

I also get this error:

* When panels creates the cache, there is no error
* When you view the panel page (before panels regenerate the cache) this error shows up

Caching settings are:

* Method: simple cache
* Lifetime: 15 min
* Granularity: none (I switched this to arguments and contexts, but the errors still shows up

My panel page is build like this:

* no menu
* no contexts
* no arguments
* two column layout (each column has 3 blocks)

Note: the blocks are made with views (but not (yet) with views panes), they simply make a list of the ten most recent posts per content type. In the 'content' tab of the panel-page each block has a description like this:
'Deleted/missing block views-new-block_1'
But they appear correctly on the page (also when caching is enabled).

Hope this helps.

greetz,
Wim

( copy of http://drupal.org/node/329626#comment-1148493 )

Cauliflower’s picture

Hello,

Looking at cache_get (from http://api.drupal.org/api/function/cache_get/6 ):

Return data from the persistent cache. Data may be stored as either plain text or as serialized data. cache_get will automatically return unserialized objects and arrays.

So you don't need to unserialize the data when you return the result.

Hope this helps,
Wim

Cauliflower’s picture

Status: Active » Needs review
StatusFileSize
new290 bytes

And I made a small patch for this,

greetz,
Wim

guillaumeduveau’s picture

Makes sense... Thank you ! The same issue is on 6.x-3 so I posted the same issue and patch for that branch : #391788: warning: unserialize() expects parameter 1 to be string : no need to unserialize data from cache

guillaumeduveau’s picture

Status: Needs review » Reviewed & tested by the community

Tested, but don't know if this will be updated in Panels 2...

merlinofchaos’s picture

Status: Reviewed & tested by the community » Closed (fixed)

No longer relevant.