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.
Hi all ,
When I override a basic template, fieldgroup not work. Example, I add a tag 'div.toto' has my full display page it works. however, if I override my template full display page like this "node--page--full.html " keeping the same code. tags fieldgroup are not rendered.
it's same if i override with DS.
It's bug ?
Sorry for my english.
Comment | File | Size | Author |
---|---|---|---|
#12 | 2627194-template-suggestion-fix.patch | 1.05 KB | aspilicious |
#2 | var_$theme_registry.png | 480.71 KB | vanilla-bear |
#2 | var_$entity_info.png | 225.27 KB | vanilla-bear |
Comments
Comment #2
vanilla-bear CreditAttribution: vanilla-bear commentedAfter research i find my problem is situated here :
File : field_group.module
Function : field_group_theme_registry_alter
var $theme_registry contains my template override 'node__etude_de_cas__teaser' and 'node__integrateur'
but
var $entity_info contains only basic theming function.
To be honest i'm not sure understand everything but it's here that 'field_group_build_entity_groups' are not injected.
i hope help someone.
Comment #3
OlafskiThere is the same or a similar similar behaviour using Field Group with a Display Suite layout. According to information of the following threads, the problem should be solved if you apply three patches regarding Drupal Core, Display Suite and Field Group:
Core: Field UI table is broken for nested elements
Display Suite: Field group compatibility
Field Group: Fields are not grouped when render element key is not elements
I updated to the relevant dev versions of Core, DS and FG, but when I create a field group, e.g. "HTML element" in a Display Suite layout, e.g. "One column", the field group still doesn't shows up on the node. (In contrast, it shows up if I deacitivate the Display Suite layout.)
So, possibly a new incompatibility between Display Suite and Field Group? (I'm posting here in the Field Group queue, because I found the active issue of vanilla-bear.)
Comment #4
aspilicious CreditAttribution: aspilicious commentedThis issue could be related. #2594123: fix for ds registry alter, variants of templates did not get picked up
Let me install and see if I can figure out the issue, the summary is a bit confusing.
Comment #5
aspilicious CreditAttribution: aspilicious commentedWell apparently there are still issues with DS and field group, but this issue is something different
Comment #6
aspilicious CreditAttribution: aspilicious commentedCan you try the following code, it's super ugly but at least it should work, but it can cause issues if there is a template that start with "node".
Comment #7
Olafski@aspilicious: At which place should one try the proposed code?
Comment #8
Stalski CreditAttribution: Stalski commentedHi,
I am working on this issue and I have this problem without DS enabled. So it seems like a field_group problem.
As @aspilicious mentions, It could clash with DS since both modules want to hook in the same process and preferably as last one :) .
I'll update as soon as I localised the problem.
Comment #9
aspilicious CreditAttribution: aspilicious commentedStalski the problem is the same problem as my linked issue. In D7 you could assign a function to a generic entity template, that also worked for suggestions. In D8 the function needs to be added to each suggestion. Which is not easy, my code is a workaround that potentially can fail. Probably needs a core fix for a beter solution.
Comment #10
Stalski CreditAttribution: Stalski commentedHi
Yes, I kind of figured that :)
Ofcourse the first approach I tried, was the workaround you posted. That is not working for me atm, I'll keep you posted ;)
Comment #11
aspilicious CreditAttribution: aspilicious commentedGoing to fix this
Comment #12
aspilicious CreditAttribution: aspilicious commentedSame fix as DS and Layout plugin.
Comment #13
aspilicious CreditAttribution: aspilicious commentedDS support isn't needed as DS added fieldgroup support.
These lines were part of the D7 code I suppose and are incorrect/useless now.
Comment #14
swentel CreditAttribution: swentel commentedcommited and pushed, thanks.
Comment #18
swentel CreditAttribution: swentel commented