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.
Once I enable the authcache_panels module on admin/module I see the following:
Notice: Undefined index: did in _authcache_panels_page_manager_collect_displays_from_handlers() (line 15 of authcache/modules/authcache_panels/authcache_panels.module).
Notice: Undefined variable: fragments in authcache_panels_authcache_p13n_fragment() (line 85 of authcache/modules/authcache_panels/authcache_panels.module).
I also see the error when I enable autcache_panels in a panel?
Comment | File | Size | Author |
---|---|---|---|
#4 | 2132239-rework-authcache-panels.diff | 20.88 KB | znerol |
Comments
Comment #1
znerol CreditAttribution: znerol commentedOk, I found the cause of the second notice (
authcache_panels_authcache_p13n_fragment
), however I'm not sure what is causing the first one. This one actually is harmless.The other one though is serious. However I do not have any clue at the moment what is causing it. I think I'll have to dig a bit deeper into the panels source.
Thanks for the report.
Comment #2
znerol CreditAttribution: znerol commented@SocialNicheGuru: Is this a panel loaded from code? E.g. via Features or exported using ctools?
Comment #3
znerol CreditAttribution: znerol commentedOk, this one is sort of tricky to implement. Though there is a workaround for the moment: Just make sure that your panels are stored in the database and not in Features or a Ctools exportable.
I think it will take me some time to find a proper solution. The problem is that it is tricky to get hold of a display when it is not stored in the database. There is even code in panels itself indicating that there are some nasty problems connected to this. E.g.:
From the simple cache plugin (panels_simple_cache_get_id):
Comparing this fragment to the its companion panels_simple_cache_clear_cache one can easily spot an obvious bug: The cache id is calculated in a completely different way. Its a bit surprising that this issue was only found some months ago #2017455: Exported panels won't clear simple cache . The inconsistency was introduced by #1349118: Simple Caching ID scheme will lead to conflicts with exported Panels definitions (commit diff).
Other modules implementing panels cache plugins:
All of them presumably started with copying over the simple cache plugin with either one or both of the flaws... Seems that we cannot simply steal some brilliant solution already implemented in another project :(
Comment #4
znerol CreditAttribution: znerol commentedOk, this is more or less a rewrite. Extracted Panels / Page Manager stuff to new module Authcache Panels by Page Manager module. Also adds a Machine Name to Panes with Authcache-Cache method to circumvent the dilemma outlined above. There is currently no upgrade-code, therefore Panes need to be configured again.
Comment #5
znerol CreditAttribution: znerol commentedComment #6
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedThe panels are from features.
Comment #7
znerol CreditAttribution: znerol commentedOk, this is fixed in 2.x-dev now. Enable the new "Authcache Panels by Page Manager" module and it should work with panels defined in code as well as in the database.
A note on context in panel panes. If the content of a pane loaded by authcache varies according to e.g. the currently viewed node, it is necessary to turn on per-page cache granularity.