Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
I tried to override how number element was presented in email so I copied templates/webform-element-base-html.html.twig into my theme "templates" directory, renamed it accordingly to theme suggestions, changed theme in email handler, cleared cache and re-send email. In received email my munber element still was using template from module, not my custom.
Proposed resolution
Make email handler respect selected theme for rendering emails.
Remaining tasks
- Patch
- Review
- Commit
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
TBD
Comment | File | Size | Author |
---|---|---|---|
#5 | 30518654.patch | 3.89 KB | jrockowitz |
| |||
#2 | 3051865-2.patch | 730 bytes | jrockowitz |
|
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented@RoSk0 I think no one has actually used this feature and there is no test coverage.
Please review the attached patch.
Comment #3
RoSk0Hi @jrockowitz,
Thanks for the quick response!
I tested the patch and while it fixes the bug with setting theme properly, original issue is not resolved by it - overridden template is not used.
Comment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented@RoSk0 I was able to copied webform-element-base-html.html.twig into the bartik theme and is picked up as expected with the patch.
Did you make sure to clear your cache?
Comment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThe attached patch has test coverage.
Comment #6
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #7
RoSk0Hi @jrockowitz,
Thank you!
Works like a charm, I misplaced template in previous test.
Comment #9
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented