Unable to load mautic configuration, it keeps loading

Hi,

Mautic v3.3.2
PHP 7.3
mysql Ver 15.1 Distrib 10.2.32-MariaDB, for Linux (x86_64) using readline 5.1

Recently, we have updated the Mautic to the latest version, since then, Mautic configuration page is not loading

It is keep loading as above image

We also found some errors in the server logs

++++++++++

domain/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:106, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 0): Can’t create table admin_maut475.maukp_bundle_grapesjsbuilder (errno: 150 “Foreign key constraint is incorrectly formed”) at domain/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:151)",“command”:“doctrine:schema:update --force”,“message”:“An exception occurred while executing ‘ALTER TABLE maukp_bundle_grapesjsbuilder ADD CONSTRAINT FK_B4DBBDF5A832C1C9 FOREIGN KEY (email_id) REFERENCES maukp_emails (id) ON DELETE CASCADE’:\n\nCan’t create table admin_maut475.maukp_bundle_grapesjsbuilder (errno: 150 “Foreign key constraint is incorrectly formed”)”}
+++++++++++++

Can anyone advise on this? what could be the reason for this issue?

Thank you

Hi,

Anyone can advise in this case, please?

Thank you.

Something must have gone wrong during the upgrade. Wifi cut, cookies, browser cache, etc.

Load the back up. I bet you must be having a back up before upgrading. If you don’t check automatic back ups.

Once the back up is running, start the upgrade process in a clean environment and stick on the page to ensure nothing goes wrong.

Hi,

May I know is it not possible to resolve this issue without updating again?

Are there no other solutions available?

Thank You

Configurations not loading is a sign something broke during the update.

The only option you have is to use your backup. That’s why it’s highly recommended to do backups before doing an update. Automatic backups made it even easier.

You actually don’t need to upgrade again. You can use your backup as it is. Since the update broke your installation, I’d recommend not upgrading for now and wait for the next update. Continue enjoying Mautic in the meantime.

When the next update comes. Upgrade in a clean environment and monitor the process to ensure nothing breaks.

Hi,

Thank you for the suggestion.

We have already gone through the update three times since each update had issues. We have done using Mautic automatic update and also done manual backend update as well. We saw some pending updates in the backend also and it never completes. Here is the result below,

php bin/console doctrine:migration:status

== Configuration

>> Name:                                               Mautic Migrations
>> Database Driver:                                    mysqli
>> Database Host:                                      localhost
>> Database Name:                                      xxxxxxxxx
>> Configuration Source:                               manually configured
>> Version Table Name:                                 maukp_migrations
>> Version Column Name:                                version
>> Migrations Namespace:                               Mautic\Migrations
>> Migrations Directory:                               /path/to/file/domain.com/mautic.domain.com/sg/app/migrations
>> Previous Version:                                   2021-01-04 17:10:05 (20210104171005)
>> Current Version:                                    2021-02-23 17:47:02 (20210223174702)
>> Next Version:                                       Already at latest version
>> Latest Version:                                     2021-02-23 17:47:02 (20210223174702)
>> Executed Migrations:                                162
>> Executed Unavailable Migrations:                    134
>> Available Migrations:                               28
>> New Migrations:                                     0

May I know why this is causing and can we solve it? What is the suggested way for the update?

Thank you so much for your help and waiting for the reply.

Hi,

Anyone can advise in this case, please?

Thank you.

Hi,

Please help us with this case. We are really having issues using the Mautic now. An update with this case is really appreciated.

Thank you.

Hello,
What happens if you disable the GrapeJS plugin?
Then log out, and log back in?
Joey

Hello,
I have same problem Settings > Configuration does not load.
I have even made command prompt upgrade.
I am kind of desperate.
I have tried recommendations from : Mautic Hangs Due to Missing Files In Cache Folder · Issue #10750 · mautic/mautic · GitHub

Mautic 4.4.9
PHP 7.4.33

What else should I try ?
I really need to check SMTP bounces

Thank you,
Daniel

What errors you have in your folder MAUTICPATH/var/log ?
Today’s file.

Hello @joeyk - this is the trick that I don’t find any error on log file and server log.
on var logs I can find a warning
[2023-07-25 04:29:03] mautic.WARNING: PHP Warning - file_put_contents(/home2/dandumit/public_html/mautic/var/cache/prod/…/languageList.txt): failed to open stream: Permission denied - in file /home2/dandumit/public_html/mautic/app/bundles/CoreBundle/Helper/LanguageHelper.php - at line 222 {“overrideCache”:false,“returnError”:false,…

I have tried to grant permission 777 on all subfolders var/cache/prod but nothing positive happened.

Thank you,
Daniel

Hello Daniel,
Can you clear the cache?

from above issue report I have taken and run

rm -rf var/cache/prod/*
rm: cannot remove ‘var/cache/prod/data/1/I/Z/BJnWQDrwbcWu5DWD+MDg’: Permission denied
rm: cannot remove ‘var/cache/prod/data/1/I/V/tinnTZLFO5ZpKCF24ejQ’: Permission denied
rm: cannot remove ‘var/cache/prod/data/1/U/3/yJsbfbDmEwC091ZuCVkg’: Permission denied
rm: cannot remove ‘var/cache/prod/data/1/Q/A/iWLplEB3Yo1W3onkmkkA’: Permission denied
rm: cannot remove ‘var/cache/prod/data/1/C/+/CVvJIFzNH4AaVZBv7JtQ’: Permission denied
rm: cannot remove ‘var/cache/prod/data/1/A/V/UHTwcQ2daxaU9QmE72sA’: Permission denied
rm: cannot remove ‘var/cache/prod/data/1/3/2/Fnx2zkuliaWajcoCxyUg’: Permission denied
rm: cannot remove ‘var/cache/prod/data/1/L/Z/bz+kuUFca9r4if3I+WwQ’: Permission denied
rm: cannot remove ‘var/cache/prod/data/1/E/E/YtJNlZH4YdJGrQcB-RaA’: Permission denied
rm: cannot remove ‘var/cache/prod/data/1/R/Z/klWLm5VR-AhbPC8CnmjA’: Permission denied
rm: cannot remove ‘var/cache/prod/data/1/G/7/fAK8Rauk-0R8dvfoC5oQ’: Permission denied

php bin/console cache:clear --env=prod
// Clearing the cache for the prod environment with debug false


 [OK] Cache for the "prod" environment (debug=false) was successfully cleared.```

Still does not load settings page.

Daniel

I would remove with sudo.
You should clear those cache files.
But since I don’t know your system, maybe ask someone if that is safe.

1 Like

It also give some hints about problems with file access rights. Looks like the upgrade process uses a different user than the web server. This should be fixed, as you will otherwise run into other kinds of issues pretty soon after this.

Hello, I have connected as root and run that command.
Now I have found something in today log

[2023-07-26 10:54:34] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Filesystem\Exception\IOException: "Cannot rename "/tmp/UrlMatcher.phpGvn0hs" to "/home2/dandumit/public_html/mautic/var/cache/prod/UrlMatcher.php"." at /home2/dandumit/public_html/mautic/vendor/symfony/filesystem/Filesystem.php line 290 {"exception":"[object] (Symfony\\Component\\Filesystem\\Exception\\IOException(code: 0): Cannot rename \"/tmp/UrlMatcher.phpGvn0hs\" to \"/home2/dandumit/public_html/mautic/var/cache/prod/UrlMatcher.php\". at /home2/dandumit/public_html/mautic/vendor/symfony/filesystem/Filesystem.php:290)
[stacktrace]
#0 /home2/dandumit/public_html/mautic/vendor/symfony/filesystem/Filesystem.php(692): Symfony\\Component\\Filesystem\\Filesystem->rename('/tmp/UrlMatcher...', '/home2/dandumit...', true)
#1 /home2/dandumit/public_html/mautic/vendor/symfony/config/ResourceCheckerConfigCache.php(124): Symfony\\Component\\Filesystem\\Filesystem->dumpFile('/home2/dandumit...', '<?php\

it looks to me that he want a full server restart or something. I used to have PHPFPM. I have disabled it. MAybe some sessions are hanging on PHPFM

Daniel