Allow tokens to be used in classes and attributes for HTML element.
Patch from field_group-tokens_in_classes-2858336-5-8.patch breaks the form display if classes are added. To fix this add an if statement to check for entity first.
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | field_group-2961885-26-mr96.diff | 5.65 KB | mjgruta |
| #20 | field_group-2961885-20.patch | 5.62 KB | pareshpatel |
| #19 | 2961885-19.patch | 5.66 KB | lubna hmeid |
| #16 | field_group-2961885-16.patch | 5.57 KB | rosk0 |
| #15 | allow-token-to-be-used-in-attributes-HTML-elements-2961885-15.patch | 5.18 KB | yousefanbar |
Issue fork field_group-2961885
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
bobbysaul commentedHere is the patch.
Comment #3
bemarlan@bobbysaul thanks for the patch. Your patch adds and allows tokens to be used successfully and it's working well. I have checked it using Acquia Dev Desktop and attached screenshots.
Comment #4
bemarlanNew patch tokens_in_attributes-2961885-2.patch added to work better with Tokens in field group's css classes patches.
Comment #6
bemarlanComment #7
bemarlanRetesting patch.
Comment #8
bemarlanComment #9
bemarlanComment #10
bobbysaul commentedI have updated the patch.
Comment #11
bobbysaul commentedUpdating again so it does not error out on the display form.
Comment #12
bobbysaul commentedComment #13
nikitagupta commentedComment #14
nikitagupta commentedFixed test case and coding standard.
Comment #15
yousefanbar commentedI rerolled the #13 patch to be compatible with Drupal 9 and field_group version 8.x-3.2.
Comment #16
rosk0Review for #14.
validateId()reverts correct change from the previous patch for
validateId().RE #15 - I wasn't able to apply the patch with either composer-patches and manually with patch utility.
I re-rolled #14 fixing validation issue. Patch wasn't applying , had to fix conflicts manually , so no interdiff. This patch however is perfectly applicable to 3.2.
Comment #17
rosk0Tests are broken , see #3248782: Fix tests in HEAD.
Comment #18
maxmendez commentedTested patch #16 on Drupal 9.4.5 and Field Group 8.x-3.2, seems to work perfectly.
Comment #19
lubna hmeid commentedI re-rolled the patch to be compatible with this issue
https://www.drupal.org/project/field_group/issues/2858336
Comment #20
pareshpatel commentedI found the issue with token replacement when we use the link field token. It encodes to & instead of & for link so I have fixed it and attached the patch file. Please verify.
Comment #21
xaa commentedpatch from #20 working here. thanks
Comment #22
uditrawatYes, #20 is working, thanks
Comment #23
anybodyPlease use MR, not patches.
Comment #27
mjgruta commentedCreated a merge request from patch #20 plus changing the clean up code to only allow alphanumeric, hyphens, underscores, and space for classes.
Also adding here the static patch just in-case someone modifies the MR and breaks the code.
Comment #28
iorusoivan commentedThe patch at the comment #20 work for me in version 8.x.3.4 since update to D 10.4, other version for this module not work a patch for me.
I'm waiting apply this patch, since update to Drupal 10. i could grantee it's work in Drupal 11.1.2 whit version 8.x.3.4. if merged to dev i will test quickly and i will send my feedback.