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

  1. Patch
  2. Review
  3. Commit

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

TBD

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RoSk0 created an issue. See original summary.

jrockowitz’s picture

Status: Active » Needs review
FileSize
730 bytes

@RoSk0 I think no one has actually used this feature and there is no test coverage.

Please review the attached patch.

RoSk0’s picture

Status: Needs review » Needs work

Hi @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.

jrockowitz’s picture

@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?

jrockowitz’s picture

The attached patch has test coverage.

jrockowitz’s picture

Status: Needs work » Needs review
RoSk0’s picture

Status: Needs review » Reviewed & tested by the community

Hi @jrockowitz,

Thank you!

Works like a charm, I misplaced template in previous test.

  • jrockowitz committed 2722274 on 8.x-5.x
    Issue #3051865 by jrockowitz: Email handler ignores selected theme
    
jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed
Thank you for helping make the Webform module and our community a little better and stronger.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.