When using the field group module in combination with drupal core's vertical tabs. The option to say which tab should be open on the page visit doesn't work. With this patch the choice of which tab should be open on the page visit will work.

Comments

ruudvanoijen created an issue. See original summary.

ruudvanoijen’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.68 KB

the patch.

Status: Needs review » Needs work

The last submitted patch, 2: vertical-tabs-open-2897534-2.patch, failed testing. View results

ruudvanoijen’s picture

Status: Needs work » Needs review
StatusFileSize
new1.68 KB

typo.

GrandmaGlassesRopeMan’s picture

Status: Needs review » Needs work
Issue tags: +JavaScript

@ruudvanoijen Since we're using ES6 features for core now, you'll need to make your changes to the vertical-tabs.es6.js file and then transpile your changes, including both files in the patch. Have a look here for more information, https://www.drupal.org/node/2815083.

idebr’s picture

Version: 8.3.4 » 8.4.x-dev
ruudvanoijen’s picture

Status: Needs work » Needs review
StatusFileSize
new1.72 KB
new1.74 KB

I've added a patch for 8.3 en 8.4

The last submitted patch, 7: vertical-tabs-open-2897534-7.patch, failed testing. View results

droplet’s picture

Hmm.. what if focusID is set?

GrandmaGlassesRopeMan’s picture

Status: Needs review » Needs work
diff --git a/core/misc/vertical-tabs.es6.js b/core/misc/vertical-tabs.es6.js

Missing the transpiled changes.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

seanb’s picture

Status: Needs work » Needs review
StatusFileSize
new3.25 KB
new1.5 KB

Added transpiled js in the new patch.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

seanb’s picture

StatusFileSize
new3.24 KB

Reroll for 8.5 and 8.6 (applies to both).

borisson_’s picture

#9 still needs to be answered. Otherwise this patch looks good. We should be able to write a test for this.

borisson_’s picture

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

idebr’s picture

Issue tags: +Needs tests
StatusFileSize
new2.85 KB

Reroll against 8.7.x after #2981652: [Aug. 9 2018] Format core JavaScript using recently add Prettier was committed.

Still needs an automated JavaScript test.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

ranjith_kumar_k_u’s picture

Issue tags: -JavaScript +JavaScript
StatusFileSize
new2.9 KB

Re-rolled for 9.2

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mlncn’s picture

Title: Vertical tab's doesn't take in account the open attribute. » Vertical tabs don't take in account the open attribute.
Status: Needs review » Reviewed & tested by the community

Applying and working.

lauriii’s picture

Status: Reviewed & tested by the community » Needs work

The CI run for #23 failed. This also still needs tests.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

cbfannin’s picture

This functionality appears to work with Drupal 9.5 without the patch. After upgrading to 9.5, the patch would not apply. I removed it from composer.json and after a composer update was able to set a default vertical tab using the open attribute. If multiple tabs were set to open, the last tab in the tab array that was set to open became the default tab when visiting the page. If only one tab was set to open, that tab was the default tab when visiting the page.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs work » Postponed (maintainer needs more info)
Issue tags: +Bug Smash Initiative

This one came up as a daily BSI target.

Based on #30 is anyone seeing this issue on 11.x?

If no follow up this could be closed in 3+ months.

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)