Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Out of band data (css, js, head) is not cached with pane-specific caching.
Display renderer takes a snapshot of existing data (with panels_cache_object constructor) after rendering pane content:
$content = ctools_content_render($pane->type, $pane->subtype, $pane->configuration, array(), $this->display->args, $this->display->context);
foreach (module_implements('panels_pane_content_alter') as $module) {
$function = $module . '_panels_pane_content_alter';
$function($content, $pane, $this->display->args, $this->display->context);
}
if ($caching) {
$cache = new panels_cache_object();
$cache->set_content($content);
panels_set_cached_content($cache, $this->display, $this->display->args, $this->display->context, $pane);
$content = $cache->content;
}
Moving $cache = new panels_cache_object();
above $content = ctools_content_render(..);
seems to fix this.
Comment | File | Size | Author |
---|---|---|---|
#10 | panels-1043148-diff-8-10.txt | 752 bytes | vijaycs85 |
#10 | panels-1043148-cache-panel-css-js-10.patch | 1.18 KB | vijaycs85 |
Comments
Comment #1
olli CreditAttribution: olli commentedIs anyone else having this problem?
1. Create a panel page
2. Create a view with pager and enable ajax
3. Add this view to the panel page
4. Set this pane's cache lifetime to 10 minutes
5. On first load the pager is working fine
6. Reload the page and ajax functionality is broken
7. After ten minutes pager is working again
8. Reload and pager broken
Comment #2
olli CreditAttribution: olli commentedComment #3
Letharion CreditAttribution: Letharion commentedolli, sorry your issue got sitting so long. I belive this has been fixed in Panels now, could you please try again with a recent -dev version?
Comment #4
olli CreditAttribution: olli commentedI tried the latest -dev and could not reproduce the issue with a fresh drupal installation.
The issue still exists when using a site with Panels operating in legacy mode.
Comment #5
Letharion CreditAttribution: Letharion commentedI'm not sure "Not working in legacy mode", is a problem worth fixing. Do you have an argument for that?
Comment #6
merlinofchaos CreditAttribution: merlinofchaos commentedLetharion: Yes that's worth fixing, though I don't actually have any idea how legacy mode could affect the caching. It shouldn't.
Comment #7
olli CreditAttribution: olli commentedLatest dev fixes only standard renderer and legacy mode enforces legacy renderer. Should we re-use the code with copy-paste or have legacy extend standard?
Comment #8
olli CreditAttribution: olli commentedThe standard renderer had the same fix here http://drupalcode.org/project/panels.git/commit/f6f4cc5fc867dd8ae2ba7a70...
Comment #9
DamienMcKennaComment #10
vijaycs85As per http://cgit.drupalcode.org/panels/commit/?id=f6f4cc5fc867dd8ae2ba7a70846... updating the condition to check for $cache is set.
Comment #11
DamienMcKennaIf anyone would be able to spare some time to review this patch it may get committed for the next release.
Comment #12
japerryNope, sorry, it won't :(