Hello,

Pagepreview (which is a great module btw) use the cache_page table for storing the temporary node data to be displayed by the iframe.
The problem is that cache_page is meant to store actual rendered pages, and as such, some modules will alter its behavior for page caching purpose, and break the pagepreview functionnality.
For example, the varnish module will take over the caching of cache_page, and it is designed to cache nothing in the cache_page table if you calls cache_set on cache_page.

A patch follows.

Comments

ndeschildre’s picture

Status: Active » Needs review
StatusFileSize
new1.59 KB

The attached patch makes pagepreview create its own cache table, and also delete the cached data right after its use.

Also, a quick check was added to avoid warnings with invalid tokens.

bethhauck’s picture

The cache_clear_all statement in this patch erases the preview before it can be rendered, but it works perfectly if you comment that out. Maybe it just needs to be called later.

les lim’s picture

Status: Needs review » Fixed

Committed to 7.x-1.x. Thanks, ndeschildre.

I couldn't replicate the problem identified in #2. Please re-open this if it remains an issue.

Status: Fixed » Closed (fixed)

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

ericras’s picture

Status: Closed (fixed) » Active

Is creating a new cache bin (and table) necessary? Removing the use of 'cache_page' was the right idea and needed but can't the basic 'cache' be used instead of a custom 'cache_pagepreview'?