Closed totten closed 4 years ago
This was originally written/tested on roughly civicrm-core@master
.
I decided to give it a whirl on 5.21 as well -- and needed to fix the compatibility test (is_callable(...)
=> version_compare(...)
per c4f95e1). However, after fixing that, the test-suite looked good on 5.21
, and I was able to successfully send a mailing via Mosaico and track the opens/click-throughs.
I guess we just need to wait for the new test run on civicrm-core@master
with the updated patch.
This aims to improve cooperation between
flexmailer
,civicrm-wordpress:wp-rest/
, and https://github.com/civicrm/civicrm-core/pull/17312 -- so that flexmailer produces compliant URLs.Before
The open-tracking URL is constructed as a reference to the standalone script
extern/open.php
using certain$config
properties.It always links to the standalone script, even if you have a different end-point available (e.g.
civicrm/mailing/open
orcivicrm-wordpress:wp-rest/
).After
On Civi v5.23+, it uses
CRM_Utils_System::externUrl()
API to request the full URL ofextern/open
. Flexmailer is no longer responsible for figuring the URL, and other agents (viahook_civicrm_alterExternUrl
) can do so.On Civi v5.22 and earlier, it continues using the same old formula. This provides drop-in/bug-level-compatibility on older versions. This can be removed in a couple months.
Comments
I suspect this also fixes dev/mail#17, wherein the open tracker has flawed URLs in certain multilingual configurations. However, I can't confirm for certain because I don't have that configuration.
But just to game this out...
civicrm-core
'sCRM_Utils_System::externUrl()
(notflexmailer:OpenTracker.php
). Which means:civirm-core
in v5.23+.civicrm-core
.Either way, addressing dev/mail#17 shouldn't require any further change in
flexmailer
.