Skip to content

fix(email): unsubscribe URL without nested link tags - #121

Merged
Ibochkarev merged 1 commit into
masterfrom
fix/unsubscribe-nested-link-tag
Jul 29, 2026
Merged

fix(email): unsubscribe URL without nested link tags#121
Ibochkarev merged 1 commit into
masterfrom
fix/unsubscribe-nested-link-tag

Conversation

@Ibochkarev

Copy link
Copy Markdown
Member

Summary

  • Nested `[[[[++site_start]]]]` in letter templates becomes `[[[[57]]]]` after `++` expands → MODX logs `Bad link tag`.
  • Queue body render adds `[[+unsubscribe_url]]` via `makeUrl` (`sendex_unsubscribe_page` or `site_start`).
  • Flattens residual nested resource links before `processElementTags` so existing DB templates keep working.
  • Demo template + README updated.

Test plan

  • Send a queue mail with a template that still has the old nested tag — no Bad link tag in log; link works
  • Prefer `[[+unsubscribe_url]]` in the letter template
  • Optional: set `sendex_unsubscribe_page` to the resource with `[[!Sendex]]`

Provide [[+unsubscribe_url]] at send time and flatten residual
[[~[[N]]]] patterns so the MODX parser no longer logs Bad link tag.
@Ibochkarev
Ibochkarev merged commit 0c7b0d8 into master Jul 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant