When content from a block is displayed in a panel instead of a normal block the "Load block with Ajax on cached Authcache pages" settings are ignored. I have tested this on multiple panels pages and blocks, see this image.

panels_cache

My site is based on a lot of panels so a fix for this should be welcome, what to do?

Files: 
CommentFileSizeAuthor
#2 ajax_pane.zip14.05 KBnielsvoo

Comments

nielsvoo’s picture

Issue summary:View changes

text

nielsvoo’s picture

Issue summary:View changes

text

znerol’s picture

Priority:Major» Normal

Short answer, Authcache Ajax Blocks currently do not work when rendered using panels. Long answer follows.

Panels alone only provides a nice user interface for quickly putting together pages with different layouts. The content (panes) are provided not by panels but using ctools content type plugins (not to confuse with drupal core content types - sight). The code responsible for rendering blocks in panels is located at ctools/plugins/content_types/block/block.inc.

In order to inject the markup necessary to defer the rendering of blocks, authcache 1.x implements hook_preprocess_blocks which is never called from the ctools block content type plugin. This problem also exist in authcache 2.x where the Ajax code is injected via hook_page_alter.

Instead of trying to support blocks in panel panes, it would be better to directly target ctools content types and try to make them loadable via ajax. I guess that the Ajax Pane module might solve your problem. However keep in mind that when every cached page request triggers multiple Ajax request to the backend, you probably won't get much performance gains from authcache. Authcache Ajax Blocks solves this problem by setting a Cache-Control HTTP header with a maxage. Like this, the response is cached in the users browser and subsequent requests will not hit the server at all.

nielsvoo’s picture

StatusFileSize
new14.05 KB

Dear Znerol,

Thank you for your answer. Indeed the pane module did the trick for me although i had to patch it, otherwise there was an error for these panels.

The patch needed can be found here: page to patch

Attached the complete package of this module included a patched file.

Nielsvoo

nielsvoo’s picture

Issue summary:View changes

text

znerol’s picture

You may want to take a look at the upcoming 2.0 release. In the dev version loading panels content panes via Ajax or ESI is supported natively.

znerol’s picture

Issue summary:View changes
Status:Active» Closed (won't fix)