Email Links Not Working After Using Domain Name

We initially set Mautic up on a server without a domain name, did testing an setup using an IP adress, and eventually pointed one at it. The site lives at [IPAdress]/mautic. The domain points to the www root and the site is accessed at http://[domain]/mautic.



When we changed the SiteURL in General settings from http://[IPAdress]/mautic to http://[domain]/mautic, the tracking links in email stopped working. They go to a Mautic error page (500 internal server error).



If we take one of the tacking links and replace the domain with the IP address, it works. This is the same for asset links. So, something is getting forked in the conversion.



Mautic itself works just fine when address at http://[domain]/mautic.



The error in the logs: [2016-01-18 21:59:31] mautic.NOTICE: PHP Notice: unserialize(): Error at offset 261 of 265 bytes - in file /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ArrayType.php - at line 58 [] []



Any ideas?

We initially set Mautic up on a server without a domain name, did testing an setup using an IP adress, and eventually pointed one at it. The site lives at [IPAdress]/mautic. The domain points to the www root and the site is accessed at http://[domain]/mautic.

When we changed the SiteURL in General settings from http://[IPAdress]/mautic to http://[domain]/mautic, the tracking links in email stopped working. They go to a Mautic error page (500 internal server error).

If we take one of the tacking links and replace the domain with the IP address, it works. This is the same for asset links. So, something is getting forked in the conversion.

Mautic itself works just fine when address at http://[domain]/mautic.

The error in the logs: [2016-01-18 21:59:31] mautic.NOTICE: PHP Notice: unserialize(): Error at offset 261 of 265 bytes - in file /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ArrayType.php - at line 58 [] []

Any ideas?

Are you talking about already sent emails or the emails sent after the Site URL change?

Try to clear the cache (delete app/cache dir)

After the change…

That did the trick. I had another problem this fixed. Need to use this as standard troubleshooting. Thanks for the help, as always.

Embarassed to admit that I was mistaken. Someone tested for me and reported false results.

I tried again and even tried a fresh install (needed to go to a different server anyway) and I still get the 500 Internal Server Error even after a delete of the cache. IP address works, domain name doesn’t.

I am seeing if there is something going on with DNS.