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
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scoff created an issue. See original summary.

chishah92’s picture

Assigned: Unassigned » chishah92
chishah92’s picture

Status: Active » Needs review
FileSize
384 bytes

Here is the patch adding the core/drupal.collapse dependency.

Status: Needs review » Needs work

The last submitted patch, 3: add-core-dependency-2743127-3.patch, failed testing.

rajeshwari10’s picture

Status: Needs work » Needs review
FileSize
357 bytes

Status: Needs review » Needs work

The last submitted patch, 5: 2743127-5.patch, failed testing.

jurgenhaas’s picture

I'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?

SteffenR’s picture

The 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.

SteffenR’s picture

Status: Needs work » Needs review
jurgenhaas’s picture

Status: Needs review » Needs work
FileSize
575 bytes

On the entity detail view, this latest patch still didn't work but adding two more dependencies finally did the trick for me.

jurgenhaas’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 10: 2743127-core_collapse_dependency_10.patch, failed testing.

jurgenhaas’s picture

Status: Needs work » Needs review
FileSize
575 bytes

Corrected patch, removing blank lines at file end.

Status: Needs review » Needs work

The last submitted patch, 13: 2743127-core_collapse_dependency_12.patch, failed testing.

jurgenhaas’s picture

Status: Needs work » Needs review
FileSize
577 bytes

Another blank line correction, thanks to Atom editor ;-)

Status: Needs review » Needs work

The last submitted patch, 15: 2743127-core_collapse_dependency_15.patch, failed testing.

jurgenhaas’s picture

Status: Needs work » Needs review
FileSize
579 bytes

This 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.

jurgenhaas’s picture

Hide the broken patches.

  • zuuperman committed 8424f51 on 8.x-1.x authored by jurgenhaas
    Issue #2743127 by jurgenhaas, SteffenR, chishah92, rajeshwari10: Add...
nils.destoop’s picture

Thx for the patch. I committed it to dev

nils.destoop’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.