Yesterday Drupal 8.9.0 was released and i updated and redid a migration i already did 10000 times because migration from D7 to D8 is a nightmare.
But the fieldgroup migration always worked.

Now the labels of my tabs are empty. There is no label at all, also nit in the html code. Its just empty.

<li class="horizontal-tab-button horizontal-tab-button-1" tabindex="-1"><a href="#edit-group-referenzen"><strong></strong><span class="summary"></span></a></li>

Anyone elese eber had this problem?

Edit: The labels are there and some javascript removes them.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marcoka created an issue. See original summary.

marcoka’s picture

Issue summary: View changes
marcoka’s picture

Problem is here because "text(settings.title)" returns "blank"

/**
   * Theme function for a horizontal tab.
   *
   * @param {object} settings
   *   An object with the following keys:
   *   - title: The name of the tab.
   * @return {object}
   *   This function has to return an object with at least these keys:
   *   - item: The root tab jQuery element
   *   - link: The anchor tag that acts as the clickable area of the tab
   *       (jQuery version)
   *   - summary: The jQuery element that contains the tab summary
   */
  Drupal.theme.horizontalTab = function (settings) {
    var tab = {};
    var idAttr = settings.details.attr('id');

    tab.item = $('<li class="horizontal-tab-button" tabindex="-1"></li>')
      .append(tab.link = $('<a href="#' + idAttr + '"></a>')
        .append(tab.title = $('<strong></strong>').text(settings.title))
      );

    // No need to add summary on frontend.
    if (settings.details.drupalGetSummary) {
      tab.link.append(tab.summary = $('<span class="summary"></span>'));
    }

    return tab;
  };

On an older Drupal version it still works btw. SOmething with the JS is wrong now. "settings.title" is empty here.

marcoka’s picture

Title: Empty tab labels » Empty tab labels Drupal 8.9.0

also added tabs manually after migration, the same result.

voege’s picture

FileSize
547 bytes

dirty workaround

YahyaAlHamad’s picture

Most likely because of JQuery 3.5.1. It introduced somewhat breaking changes. As @voege patch, it seems that this line is somewhat acting weird.

Belshi’s picture

#6 can you define "weird". Just applied the patch and the labels are visible again

marcoka’s picture

Yea, #6 works here too.

Kurt.j’s picture

#5 patch worked for me, Thanks!

marcoka’s picture

This is related as it seems: #3104205: Titles are missing in horizontal tabs
The jquery update has more issues as it seems. fields i place in a tab are actually outside of the container.

YahyaAlHamad’s picture

@Belshi, sorry for the poor choice of my words, I was referring to the old line not the patched one, after the Drupal 8.9.0 update.

huzooka’s picture

I think we fixed this issue in #3104205-12: Titles are missing in horizontal tabs, where comment 12 also adds(Nightwatch) test coverage.

I missed that it's about the Bootstrap theme.

huzooka’s picture

Assigned: Unassigned » huzooka
Category: Support request » Bug report
huzooka’s picture

Maintainers, please credit @gmercer, he/she was the one who made the first patch at #3104205-6: Titles are missing in horizontal tabs.

huzooka’s picture

Status: Needs review » Needs work

#14 fails on Drupal core 8.8.x, so back to NW.

marcoka’s picture

I tested this pacth against 8.x-3.x but that did not make a difference about the fields beeing placed outside(other major issue). But the labels are back with this one. Using Drupla 8.9.0.

huzooka’s picture

Assigned: Unassigned » huzooka
huzooka’s picture

Same fix as in #14, but with a PHPUnit test coverage.

The last submitted patch, 18: field_group-fix_horizontal_tab_labels-3145717-18--test-only.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

arturopanetta’s picture

Status: Needs review » Needs work

#18 works fine to me on 8.9.x . Thanks :) :) :)

huzooka’s picture

Status: Needs work » Needs review

@arturopanetta if it works for you on 8.9.x, then why NW? 😀

Back to needs review.

huzooka’s picture

This time without new coding standard errors.

Eunicia Estrocio’s picture

Status: Needs review » Reviewed & tested by the community

Works for me.

ronaldmulero’s picture

Works for me.
Drupal 8.9.0

nils.destoop’s picture

Status: Reviewed & tested by the community » Fixed

Thx for the patch. Confirmed to work also on my site. I committed it to dev

  • nils.destoop committed f8d4ea1 on 8.x-3.x authored by huzooka
    Issue #3145717 by huzooka, voege, marcoka, YahyaAlHamad, Belshi, Kurt.j...
nessunluogo’s picture

Confirm, #22 works for me too.

viappidu’s picture

Status: Fixed » Needs review
FileSize
29.44 KB

Weird (at least) behaviour on my side. Previous 3.x-dev + patch on #22 was working fine, now the label loads fine but then get replaced at the end of js script as per image.
Am I the only one to experience this?

TrevorBradley’s picture

Patch #22 worked great for me!

viappidu’s picture

@TrevorBradley are you using 8.x-3.1 + patch or latest -dev version where patch is already committed?
I have the problem with current -dev. Applying the patch worked for me too

TrevorBradley’s picture

@viappidu - I was using field_group 3.1 with the patch, not the dev version.

nchristensen’s picture

#22 worked for me.

marcoka’s picture

Thank you for the info about the dev version. I also installed it and it works too.

viappidu’s picture

Yep! Found the issue! I am normally using Edge browser on my Win10 (OS build 19041.329) laptop, tried the same page on Chrome and Firefox, bam, issue not present...
So, checking Edge installed version I was offered to download a new one, I did it, and now it's working fine there too.
Console 'clientInformation' outputs:
NOT working (prior) version:

appVersion: "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.19041"
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.19041"

Working (latest) version:

appVersion: "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36 Edg/83.0.478.45"
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36 Edg/83.0.478.45"

I keep issue status on needs review for the mantainers to check. Thanks all for your answers.

PS: found the problem to be summary text was prepended an extra 'show' and 'hide' that was returned on line 59 of horizantal-tabs.js. Hope this is of any use.

huzooka’s picture

So I guess that the issue isn't solved for IE11.

Edge/18.19041, where it is still broken, uses the MS-developed engine, while the up-to-date Edge version is the Chromium-based Edge

SivaprasadC’s picture

FileSize
3.6 KB

Hi All,

Somehow the issue still exists for me. I'm using 8.9.1 and Field group 8.x-3.1.

The labels in the horizontal tab are Blank in Chrome. PFA

Is anyone facing a similar issue?

Jabastin Arul’s picture

Yes this issue is not fixed the latest version 8.9.1. Please help us to fix the issue.

Thanks,
Jabastin.

Jabastin Arul’s picture

Status: Needs review » Needs work
maskedjellybean’s picture

I'm on 8.9.1 and the patch works for me. However, I had to first clear Drupal caches and then shift refresh my browser to clear the browser cache before I could see the fix. Since the patch involves changes to Javascript this makes sense.

Shrutidkadam’s picture

#5 patch works for me for 8.9.1. Saved my time

JonMcL’s picture

Patch at #22 is working for me. I tested with Seven, Adminimal, and Gin themes. (don't be like me: make sure you clear caches to load new Javascript)

Needs to be rerolled for 3.1

JonMcL’s picture

Patch at #22 is working for me. I tested with Seven, Adminimal, and Gin themes. (don't be like me: make sure you clear caches to load new Javascript)

Needs to be rerolled for 3.1

jcnventura’s picture

Status: Needs work » Fixed

It does NOT need to be re-rolled for 3.1. The patch in #22 is already part of the 3.1 release.

Setting back to fixed, as all the comments after #26 are either confirming that #22 works, except for the following comments:

  • #34 + #35: Problem exists only in IE11
  • #36 + #37: not working, no information on browser

Creating a child issue for the IE11 issue.

jcnventura’s picture

FrancescoQ’s picture

@jcnventura sorry, from what i can tell it should be already commited, right? because updating today from 8.8 to 8.9.2 gives me empty tabs in the administration theme wher i use them to organize the node form.
I tried to apply #22 but it says to me that it's already applied.
I've a Horizontal tabs container with 2 "details" groups inside, and in 8.8 everything works fine, in 8.9.2 the tabs are in place but with empty labels.

Edit: forgot to mention that i'm on 8.x-3.1

mark_fullmer’s picture

For me, the patch from #22 (in 3.1 and in 8.x-1.x) does fix the issue on Chrome & Safari, but the problem persists on Firefox, even after the browser and Drupal caches multiple times.

jcnventura’s picture

@FrancescoQ, @mark_fullmer Yes, the patch in #22 is already part of the stable release of this module for more than a month. Maybe you can expand on the problem in #3155064: Horizontal tab label is "Show" in some themes and in IE11

Status: Fixed » Closed (fixed)

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