codefog / contao-events_subscriptions

Contao extension that allows members of your website to subscribe to the events
MIT License
10 stars 5 forks source link

Varaible ##event_link## broken in reminder mails (localhost instead of host) #90

Closed Kahmoon closed 1 year ago

Kahmoon commented 1 year ago

Since i changed my mail queue to symfony mailer async (same gateways) because notification center queue was not working correctly and the normal gateway is running to limits of 20, the variable ##event_link## in reminder mails is "localhost" instead of the domain.

https://localhost/intern/termin/gruppe-3-m-2207-15-10-2022-9768.html but it should be https://www.mydomain.de/intern/termin/gruppe-3-m-2207-15-10-2022-9768.html

When i send manual notifications via extension...or members subscribe/unsubscribe....the link is ok. It happens only on event reminder mails which are send or generated by cron at 8am.

Reminder Mailtemplate Link: ##event_link##

Subscribe/Unsubscribe Template Link: ##event_link##

I´m not sure why this mailsetting should affect this because its still using the notification center gateways which are configured in the backend.

Any ideas?

greetz

Kahmoon commented 1 year ago

Maybe another hint...since changing to symfony mailer in backendlog the mail send (process) is logged before the log entry of your extension. SCR-20221014-c4f

Before this was exactly the opposite.

It was "A total number of 49 event reminders have been sent" and afterwards mail logs. Don´t know if this is a thing (probably not).

Kahmoon commented 1 year ago

One more thing i changed. The Contao Cron was triggered by webcron before

* * * * * /usr/bin/wget -O - -q myurl.de/_contao/cron

now its changed to contao cron

* * * * * php meineurl.de/contao/vendor/bin/contao-console contao:cron

This could be probably the reason.

Kahmoon commented 1 year ago

OK, we found the problem. In Websiteroot there was no entry for domain. So the new cron triggered this without a domain.

Bildschirmfoto 2022-10-14 um 11 18 01