Select Page

Mautic is an OpenSource Marketing Automation tool. I basically use it as my auto-responder tool: to store/score contacts & send my emails out (through Amazon Simple Email Service: SES).

I wanted to get the Mautic API to work. So I could add contacts from within my application (PHP code).
So without the use of forms and without manual input through the Mautic dashboard.

After lots of trial and error, Googling and testing, I decided to try to clear the cache.
Your can do that in different ways

  • rm -rf app/cache/*
  • php app/console cache:clear

Clearing the cache is a much recommended solution for almost every technical issue that’s been reported in Mautic it seems.
So I did that. However after that I got thise error 301 Infinite Redirect Loop: “This page isn’t redirecting properly” (ERR_TOO_MANY_REDIRECTS).
The browser suggest things like “Try clearing your cookies”. Of course that didn’t help.

HOW TO FIX
Go to your config file where (to be found here: /app/config/local.php)
And change the site_url:
‘site_url’ => ‘https://yoursite.mautic.com’
to
‘site_url’ => ‘http://yoursite.mautic.com’

Access the dashboard and chang the site_url back to httpS.

Explanation?
I don’t know why exactly.
I guess “for filling the cache” there was something conflicting around SSL.
So for the “filling the cache” I needed http temporarily 😉
There are some references online related to bad SSL, HTTPS configuration, I might try next time:

  • https://forum.mautic.org/t/mautic-2-0-1-stuck-in-infinite-redirect/4750
  • https://gitmemory.com/issue/mautic/mautic/7248/463886177

So I was happy I got Mautic back up and running
… and as a bonus I managed to connect with my Mautic Instance through the use of the API.
So bottom line: deleting the cache helped but can introduce side-effects 😉
As a side-note: Mautic 3 is coming, I love Mautic so far. I hope with the recent partnership with Acquia’s (the company behind Drupal), the troubleshooting / issue will be more clear / streamlined, so more non-technical experience people can start using Mautic without having to hire a developer (kinda as it’s the case with WordPress).

Note to myself: Also make sure to make a backup first (database + files).
At first I thought clearing the cache is not such an action that would require a backup.

My configuration

  • Mautic version: 2.16.2 (to be found in app\version.txt)
  • Mautic on a subdomain
  • ngninx
  • (Free) Let’s Encrypt Certificate (ssl/https)
  • PHP Version 7.3.19