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.
Good Afternoon,
After using radix as a base theme for a project I've noticed that when using panelizer as part of the view mode of an entity (as opposed to full page override) that we end up loosing integration with contextual. Both the quickedit and contextual modules rely on the class contextual-links-region which are passed into relevent preprocess functions however the preprocess in panels.inc resets the array adding 2 values of its own.
Comment | File | Size | Author |
---|---|---|---|
#4 | reset_of_panelizer_view-2454051-4.patch | 675 bytes | shadcn |
#2 | radix-prevent-preprocess-reset_2454051_2.patch | 734 bytes | dan.munn |
#1 | radix-prevent-preprocess-reset_2454051.patch | 893 bytes | dan.munn |
Comments
Comment #1
dan.munn CreditAttribution: dan.munn commentedComment #2
dan.munn CreditAttribution: dan.munn commentedIn hindsight this may not work either (patch proposed) - I'm not all that in favor of a theme duplicating work that modules should be themselves doing, so removing the hook looks more optimal.
Patch attached with radix_preprocess_panelizer_view_mode() removed.
Comment #3
steveoriolI get some notices about Undefined indexs of #entity_type and #bundle in radix_preprocess_panelizer_view_mode()
so, I try to remove also this hook...
Comment #4
shadcn CreditAttribution: shadcn at Chapter Three commentedNot sure why I'm seeing this issue just now. @steveoriol thanks for the ping on this.
It looks like panelizer are now adding the proper classes, so we could do without this preprocess. I'm adding a patch here that keeps the view mode class only for BC.
Let's review.