Accept Mosaico-style unsubscribe URLs during validation (#143) #215
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before
As observed in #143, the default
versafix-1
templates use tokens like[unsubscribe_link]
which do not match{action.unsubscribeUrl}
. Thus,when you try to submit the mailing, it fails because the token is missing.
After
The
[unsubscribe_link]
is treated as an alias for{action.unsubscribeUrl}
. Thus, when you try to submit the mailing,it accepts that token.
Comment
There's another required token,
{domain.address}
. For the moment,the patch waives that requirement because Mosaico UX handles that
differently. See comments inlined.
This patch depends on a recent update to Flexmailer: civicrm/org.civicrm.flexmailer#9 . That patch is currently merged.
To fully work, this patch also depends on an open core PR, civicrm/civicrm-core#11316 . However, it is safe to use this patch without 11316 -- the new code is simply inert.