Skip to content

fix(lexicon): Keep signup email manager URL out of trailing punctuation - #17017

Open
Ibochkarev wants to merge 2 commits into
modxcms:3.xfrom
Ibochkarev:fix/15209-signupemail-surl-punctuation
Open

Ibochkarev wants to merge 2 commits into
modxcms:3.xfrom
Ibochkarev:fix/15209-signupemail-surl-punctuation

Conversation

@Ibochkarev

Copy link
Copy Markdown
Collaborator

What changed and why

Some mail clients (Windows Mail was the original report) autolink [[+surl]] in the default signup email and pull in the following , or ). The opened URL 404s.

English setting_signupemail_message_default now uses an HTML anchor: <a href="[[+surl]]">[[+surl]]</a>. Punctuation stays outside the href. Mail already goes out as HTML via email/default.tpl.

The 3.3.0 upgrade wraps bare [[+surl]] in the stored signupemail_message setting the same way. Values that already use href="[[+surl]]" (or customized text without surl) are left alone. Other lexicon locales are unchanged in this PR.

How to test

  1. Fresh/dev site: set System Settings → signupemail_message to the English default (or clear it and confirm create-user notify falls back / uses the updated default after reset).
  2. Create a user with "notify" enabled. Open the message in a client that autolinks plain URLs (or inspect the HTML). The manager link must not include a trailing , or ).
  3. Upgrade path: put an old stock value in the DB (…at [[+surl]],… or …([[+surl]])…), run the 3.3.0 upgrade script, confirm it becomes an <a href="[[+surl]]"> and customized messages without that placeholder are untouched.

Related issue(s)/PR(s)

Resolves #15209

Compatibility notes

Universal for sites that still use the stock signupemail_message text (common after 2.x upgrades). Fresh 3.x installs without that setting already fall back to login_signup_email, which already uses a proper link.

Breaking change assessment

No public API change. Default English copy and upgrade rewrite of matching DB values only. Custom signup email text without [[+surl]] is not modified. Safe for patch-level consumers.

Test coverage

No automated tests. Coverage is email-client behavior and a one-shot setup upgrade against stored system setting values.

Contributors

Thanks @stuke2 for the report.

AI tool use

Cursor (Composer) helped draft the lexicon/upgrade change and this PR description. I reviewed the diff and the upgrade guards before opening the PR.

Some mail clients autolink [[+surl]] with the following comma or
parenthesis and break the manager link. Wrap the English default in an
HTML anchor and rewrite stock signupemail_message values on upgrade.

Fixes modxcms#15209
@Ibochkarev
Ibochkarev marked this pull request as ready for review September 6, 2026 05:49
@Ibochkarev Ibochkarev added area-lexicons Issues related to translations and lexicons implementation. bug The issue in the code or project, which should be addressed. labels Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-lexicons Issues related to translations and lexicons implementation. bug The issue in the code or project, which should be addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link to manager inside signupemail_message results in Page not Found

2 participants