Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept Mosaico-style unsubscribe URLs during validation (#143) #215

Merged
merged 4 commits into from
Nov 28, 2017

Conversation

totten
Copy link
Collaborator

@totten totten commented Nov 25, 2017

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.

@totten totten changed the title Accept Mosaico-style unsubscribe URLs (#143) Accept Mosaico-style unsubscribe URLs during validation (#143) Nov 25, 2017
@seamuslee001
Copy link
Contributor

@totten i would note that the core PR and flexmailer PRs are now both merged, should this get merged then?

Before
------
As observed in veda-consulting-company#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.
Before
------
CiviMail generally requires `{domain.address}`. This is not provided
by default in most Mosaico templates. However, the Mosaico templates
do provide a block where you're expected to fill in the address.

After
-----
The `{domain.address}` is not required for Mosaico mailings.
@totten totten force-pushed the 2.x-token-validation branch from 6638959 to a949465 Compare November 28, 2017 22:37
@totten
Copy link
Collaborator Author

totten commented Nov 28, 2017

Yeah, I held off a little on merging -- if you deployed the first couple commits on an outdated version of Flexmailer, then it'd be cause a hard crash, so I wanted to mitigate that. It should now degrade more gracefully.

@totten totten merged commit 48da157 into veda-consulting-company:2.x Nov 28, 2017
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.

2 participants