Problem/Motivation
Using Gin admin theme after this commit https://git.drupalcode.org/project/field_group/-/commit/1211c8f4e0659241... the required marks are displayed on every tab item, even those that are already marked as required previously.
Steps to reproduce
Upgrade to dev-3.x 1211c8f and using Gin as admin theme.
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | 3395375-25-4.x.patch | 1.38 KB | rpearl |
| #24 | 3395375-field_group-duplicate-require-3.x-24.patch | 2.1 KB | jedihe |
| fieldgroupduplicated.png | 10.38 KB | albefer |
Issue fork field_group-3395375
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
albefer commentedComment #3
albefer commentedIt seems the issue is in this file https://git.drupalcode.org/project/field_group/-/blob/1211c8f4e06592418c.... With this commit, we have switched from using .text() to .html() to build the content of the tabs. As a result, HTML tags, such as
<span class="required-mark"></span>, are now included in the tab titles.Comment #4
3cwebdev commentedWe are seeing this issue as well when using Horizontal Tabbed field groups on the Gin theme. Switch to vertical tabs or a different theme removes the issue.
Comment #5
ultimikeI can confirm that using Gin with Field Group results in gin's tabs.css file being loaded in the front end (due to the Gin admin menu, I assume) and messing up many (all?) of Field Group's horizontal tab styles. 🙁
-mike
Comment #6
andrerb commentedComment #7
kufliievskyi commentedThanks for the patch. I confirm that patch #6 fixes the issue. Tested on Drupal 10.3.0.
Comment #8
refsI can also confirm that the patch fixes the issue for 3.6 and Drupal 10.3.0.
Comment #9
kevinvb commentedI can confirm the patch works on 10.3.1 with Gin admin theme 8.x-3.0-rc13 and field group on 8.x-3.6
Comment #10
andreic commentedI can also confirm that the patch fixes the issue for 3.6 with Drupal 10.2.6.
Comment #11
butterwise commentedConfirming patch in #6 fixed this issue (8.x-3.6, Drupal 10.2.7, Gin 8.x-3.0-rc13)
Comment #12
jonathan_hunt commentedPatch #6 worked for me on Field Group 8.x-3.6, Drupal 10.3.3, Gin 3.0.0-rc13.
Comment #13
anybodyComment #15
anybodyPlease use MRs!
Comment #16
anybodyMerging based on the many RTBC's.
Comment #18
anybodyComment #19
grevil commentedThis introduced a regression. Created a follow-up issue here: #3473033: Horizontal Tabs render broken, if child allows HTML.
Comment #21
pfrenssenWould it be a good idea to commit this on the stable 3.x branch as well?
Comment #22
anybody@pfrenssen I'm not against it. Still I think we should better focus on a stable 4.0.0 release!
Comment #23
rajab natshahThanks, Andre, for the patch in #6!
It is working with the Field Group ~3.0 version.
Hoping this fix makes it into the
8.x-3.xbranch, especially since Field Group 4.0.0-alpha1 has been released. Many sites are unlikely to upgrade from~3to~4until an RC or the stable 4.0.0 release is available.Comment #24
jedihe commentedFor those of us on 3.6, I'm attaching a patch ported from #3473033: Horizontal Tabs render broken, if child allows HTML #15, only the changes for
formatters/tabs/horizontal-tabs.js.Minimally tested on horizontal tabs, enabling "Mark group as required if it contains required fields." now works as expected: only one required mark, only shown on tab titles for panes actually containing required fields.
Comment #25
rpearl commentedI also came across this issue with Gin 4.0.4 and Field Group 4.0.0-alpha1. The "Mark group as required if it contains required fields." checkbox option did not make any difference. I created this patch which gets around the issue and forces the required mark regardless of this option. There should be a better way to do this, but at least this patch would allow me to ensure that the horizontal tabs were always marked correctly (aka, I always want to mark the group required if there are required fields).
Comment #26
jedihe commentedUpdate: #24 is no longer needed after updating to field_group 4.0.0, using Gin theme.