- Issue created by @maddentim
- π«π·France klelostec
I reproduce the issue only with the tabs component (in /formatters/fieldset/tabs.js).
The code in 8.X-3.x branch seems good, and use once in the right way according to Drupal 10.
I made a patch to fix the 8.x-3.4 version. - πΊπΈUnited States maddentim
Well, upon further review, my issues were introduced by a patch I was using from another field_group issue. I would say to close the issue if not for the issue @klelostec has made a patch to fix his issue.
- πΊπΈUnited States daletrexel Minnesota, USA
Patch #2 looks to be the correct syntax for replacing jquery.once with core/once in the one place that seems to be a problem on the 8.x-3.x branch, /formatters/fieldset/tabs.js
The three JS files mentioned in the issue description do not look to be a problem on 8.x-3.x: they're properly using the $(once()) syntax to use core/once within jQuery.
Patch #4 looks irrelevant because the file doesn't exist in 8.x-3.x. Is there another issue (un-committed) that adds this file?
I've applied the patch in #2 to field_group 8.x-3.4 on a D10 site that was giving the error reported in this issue (multiple times on node edit forms), and the errors went away afterwards.
Not sure if it's safe to mark this RBTC because of the confusion over the competing patches, but #2 looks good to me.
- πΊπΈUnited States Ariun
I have applied Patch#2. It fixed the issue with field_group on Drupal 10 site
- Status changed to Needs work
about 1 year ago 12:54pm 4 October 2023 - miiimooo Europe
Patch in #2 #3384121-2: Javascript once issue in Drupal 10 β and in #4 #3384121-4: Javascript once issue in Drupal 10 β don't apply - tabs.js in 3.4 and in 3.x has no "attach" method https://git.drupalcode.org/project/field_group/-/blob/8.x-3.4/formatters... and https://git.drupalcode.org/project/field_group/-/blob/8.x-3.x/formatters...
I am seeing this issue in D10 with tabs at least too
- Status changed to Closed: works as designed
about 1 year ago 6:02am 9 October 2023 - πΊπΈUnited States daletrexel Minnesota, USA
Ah. My apologies. I had missed that the build I was working on was ALSO being patched for π HTML5 Validation Prevents Submission in Tabs Postponed: needs info , which introduced the jquery.once error. The patch in my build was from comment #37 π HTML5 Validation Prevents Submission in Tabs Postponed: needs info . The patch in #2 here fixed that use of jquery.once, but the problem has been fixed in that issue since #87 π HTML5 Validation Prevents Submission in Tabs Postponed: needs info . I'll have to get the folks that manage our Drupal build to update the other patch to a more recent version.