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.
Sometimes collapse.js loads after (if at all) horizontal-tabs.js which brakes the tabs — tab titles are empty .
Looking at the code I'd say horizontal-tabs.js really depends on collapse.js
Somehow it works fine in Safari and Chrome but fails in MS Edge and Firefox.
It actually works in Firefox on a node edit page but I'm also using tabs for node display.
Solved by adding core/drupal.collapse to horizontal tabs dependencies. I'm not sure if the other formatters depend on it also.
field_group.libraries.yml
...
formatter.horizontal_tabs:
version: VERSION
js:
formatters/horizontal_tabs/horizontal-tabs.js: {}
css:
component:
formatters/horizontal_tabs/horizontal-tabs.css: {}
dependencies:
- field_group/core
- core/drupal.collapse
Comment | File | Size | Author |
---|---|---|---|
#17 | 2743127-core_collapse_dependency_17.patch | 579 bytes | jurgenhaas |
#8 | 2743127-core_collapse_dependency_8.patch | 522 bytes | SteffenR |
#5 | 2743127-5.patch | 357 bytes | rajeshwari10 |
#3 | add-core-dependency-2743127-3.patch | 384 bytes | chishah92 |
Comments
Comment #2
chishah92 CreditAttribution: chishah92 at Blisstering Solutions commentedComment #3
chishah92 CreditAttribution: chishah92 at Blisstering Solutions commentedHere is the patch adding the core/drupal.collapse dependency.
Comment #5
rajeshwari10 CreditAttribution: rajeshwari10 as a volunteer and at Blisstering Solutions commentedComment #7
jurgenhaasI'm having the same issue with empty labels in Firefox and I applied the patch from #5 but without any luck. I did a cache rebuild, but that didn't help either. Anything else I should be trying?
Comment #8
SteffenRThe patch from @rajeshwari10 is not working for me on node/add / node/edit and term forms.
You have to add the dependency to the element.horizontal_tabs also.
Attached a patch fixing the issue.
Comment #9
SteffenRComment #10
jurgenhaasOn the entity detail view, this latest patch still didn't work but adding two more dependencies finally did the trick for me.
Comment #11
jurgenhaasComment #13
jurgenhaasCorrected patch, removing blank lines at file end.
Comment #15
jurgenhaasAnother blank line correction, thanks to Atom editor ;-)
Comment #17
jurgenhaasThis is an example why following coding standards is such a nice thing. This latest patch now should make sure that there is exactly one empty line att the end of the file - sorry everyone for all the spam.
Comment #18
jurgenhaasHide the broken patches.
Comment #20
nils.destoop CreditAttribution: nils.destoop as a volunteer and at Wunder commentedThx for the patch. I committed it to dev
Comment #21
nils.destoop CreditAttribution: nils.destoop as a volunteer and at Wunder commented