civicrm / org.civicrm.flexmailer

FlexMailer is now part of civicrm-core. Please see the link below for how to upgrade.
https://civicrm.org/extensions/flexmailer
Other
5 stars 22 forks source link

Malformed tracking links with FlexMailer and Mosaico #50

Closed kcristiano closed 4 years ago

kcristiano commented 4 years ago

Enviornment(s) tested:

CiviCRM: 5.19.3 and 5.20 RC CMS: WordPress 5.3 PHP: 7.2

Create a mailing with two different links:

https://example.org/civicrm?page=CiviCRM&q=civicrm/event/register&reset=1&id=7

https://example.org/event/

When the mailing is sent, the first link converts to: https://example.org/wp-content/plugins/civicrm/civicrm/extern/url.php?u=51&qid=%7Baction.eventQueueId%7D

This link is 'bad' and results in a 404

The second link converts to: https://example.org/wp-content/plugins/civicrm/civicrm/extern/url.php?u=50&qid=50 This link is fine and resolves properly

Just to add I've tested with Image links and regular links. All Image links are malformed. Other links may work fine. I've had inconsistent testing, but all image links are broken.

Send Test and sending via execute on scheduled jobs page works, whereas cron jobs cause the malformed links.

Only place that seems to inject eventQueueId is https://github.com/civicrm/org.civicrm.flexmailer/blob/99f8f6192a6f48b846aac2d54d9a759ef596f7cc/src/Listener/DefaultComposer.php#L187-L202

kcristiano commented 4 years ago

Closing - found it related to a Pre-release PR we had in production: https://github.com/civicrm/civicrm-core/pull/15475