Token in HTML link broken

Created on 23 April 2024, 8 months ago
Updated 24 April 2024, 8 months ago

Problem/Motivation

I am trying to create a replacement "Password Reset" email.
However, when I create a link in the HTML Body using a token for the URL, it fails.

I am following along with the HTML Emails from Drupal Made Easy video (22:13 mark).

Steps to reproduce

1. Create a new template.
2. Add HTML body

Click here to reset password.

3. Convert "here" to a link. Use [easy_email:recipient_uid:0:entity:one-time-login-url]
4. Send a new email via `/admin/reports/email` page.
5. When I preview the mail in Mailpit, I see the following code

Click <a href="one-time-login-url]">here</a> 

If I add [easy_email:recipient_uid:0:entity:one-time-login-url] to the HTML body, it correctly generates the URL. Ie. https://d10-base-demo.ddev.site/user/reset/2/1713841479/-PuW0XL17kdsUqnsKNBAcWGNYlpc7CSHPLGQz_XqIK4

If I edit the email template, the link address appears malformed:

Drupal: 10.2.3
Easy Email: 3.0.0
Symfony Mailer Lite: 1.0.6
DDEV: 1.23

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

πŸ‡―πŸ‡΅Japan tyler36 Osaka

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @tyler36
  • Status changed to Postponed: needs info 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States zengenuity

    I think CkEditor will mess up the tokenized link if you use Basic HTML or some other limited HTML format. Try using Full HTML or another format without tag filtering.

  • πŸ‡―πŸ‡΅Japan tyler36 Osaka

    Thank you for the update.

    It works when CKeditor is set "Full HTML" but is broken when set to "Basic HTML".
    I guess this is a core issue and not a problem with "easy email" module.

    Thank you for pointing me in the right direction.

  • Status changed to Closed: works as designed 8 months ago
  • πŸ‡―πŸ‡΅Japan tyler36 Osaka
Production build 0.71.5 2024