Can't clear cache

Your software
My Mautic version is: 5.1.1
My PHP version is: 8.2
My Database type and version is:

Your problem
My problem is: I can’t clear the cache.

These errors are showing in the log:

// Clearing the cache for the prod environment with debug false

In FileLocator.php line 39:

An empty file name is not valid to be located.

cache:clear [–no-warmup] [–no-optional-warmers]

Steps I have tried to fix the problem:

Installed another instance of Mautic via composer and there it works.

Perhaps a permissions issue? If you are on a Linux system, try giving appropriate permissions to the cache directory before running cache:clear again:

sudo chown -R www-data:www-data /path/to/mautic/var/cache
sudo chmod -R 775 /path/to/mautic/var/cache
1 Like

Many thanks for your answer.

Unfortunately no change after changing permissions. Same error.

I’d try
rm -rf /path/to/mautic/var/cache/prod/*

1 Like

No success either.

It must have to do with composer.
I just rolled back to the non-composer installation and now it works!

1 Like

Could it be, that the error is because in the Configuration I did not enable: “Update Mautic through Composer [BETA]” ?

I installed mautic 5 again via composer and now it works, so far. I could clear the cache and also update the plugins.