Mautic Community Forums

Upgrade error from 2.16.3 to 3

Your software
My Mautic version is: 2.16.3
My PHP version is: 7.2.33

Your problem
My problem is: After running the v3 upgrade script the second time my installation fails…

These errors are showing in the log:
Command output:
// Clearing the cache for the prod environment with debug true

In FileLoader.php line 168:

Notice: Undefined variable: container in /app/config/config.php (which is loaded i
n resource “/app/config/config.php”).

In config.php line 12:

Notice: Undefined variable: container

cache:clear [–no-warmup] [–no-optional-warmers] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–]

ERR_BUILD_M3_CACHE: Failed to build cache for Mautic 3. All your data has been successfully migrated to Mautic 3, but this error very likely needs to be fixed before you can start using Mautic 3.

Command output:
// Clearing the cache for the prod environment with debug true

In FileLoader.php line 168:

Notice: Undefined variable: container in /app/config/config.php (which is loaded i
n resource “/app/config/config.php”).

In config.php line 12:

Notice: Undefined variable: container

cache:clear [–no-warmup] [–no-optional-warmers] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–]

1 Like

Hi there, does your Mautic instance load? If there are errors, try clearing out /var/cache and then reload.

I solved it! The instance didn’t load, and it did not help to clear cache folder. I could not even run any cli commands.
So I ended up just removing the whole Mautic root folder (after taking a backup on the config file & media folder) and reinstalled the 2.16.3 from github and then run the upgrade, then it worked. :grinning:

1 Like

How did you originally install Mautic, out of interest?

I have installed it by just downloading the release zip a year ago.
But I know we have added the composer later on and some plugins to the installation so it can have been something of this that made some conflict with it.?