The site url used when emailing subscription notification appears to be set when the cron runs: if the cron accesses the site as http://example.com/cron.php, then example.com will be used (as opposed to www.example.com, for example). Or, if the cron is run via drush without any explicit site name, then 'default' will be used as the site url.
These issues can be fixed by using the canonical domain name to run the cron. However, when a site uses Domain Access then there is no single canonical domain and whichever domain the cron runs under, then all subscription notifications will be sent out using this domain.
One potential workaround I can see for this is that the site url should be recorded in the {subscriptions_queue} table at the time of the subscription being enqueued. This resolves the site url issue, but may leave unresolved other site tokens that are domain specific.
Has anyone else come across this issue? Any ideas how best to resolve it?
Comments
Comment #1
salvisThank you for the explanation, that makes sense.
I wouldn't want to force an additional column upon everyone just for the benefit of DA, but either an optional add-on module or a conditional include would make sense.