Mautic Community Forums

After Update 2.15.3 /s/forms and others are not working 500 Server Error

Your software
My Mautic version is: 2.15.3
My PHP version is: 7.0.33 / tried 7.2 not working eather

Your problem
My problem is:
Somen menue Function dont work anymore, e-g- /s/forms

These errors are showing in the log:

[2019-11-12 19:13:43] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: “Compile Error: require(): Failed opening required ‘/var/www/…/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php’ (include_path=’.:/opt/plesk/php/7.0/share/pear’)” at /var/www/…/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php line 209 {“exception”:"[object] (Symfony\Component\Debug\Exception\FatalErrorException(code: 0): Compile Error: require(): Failed opening required ‘/var/www/…/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php’ (include_path=’.:/opt/plesk/php/7.0/share/pear’) at /var/www/…/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:209)"}
[2019-11-12 19:13:43] mautic.WARNING: PHP Warning - require(/var/www/…/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php): failed to open stream: No such file or directory - in file /var/www/…/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 209 {“className”:“Mautic\CategoryBundle\Entity\Category”,“classMetadata”:"[object] (Doctrine\ORM\Mapping\ClassMetadata: Doctrine\ORM\Mapping\ClassMetadataInfo@00000000279c593c000000007538bc77)",“proxyClassName”:“Proxies\CG\Mautic\CategoryBundle\Entity\Category”,“fileName”:"/var/www/…/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php"}
[2019-11-12 19:13:43] mautic.WARNING: PHP Warning - require(/var/www/…/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php): failed to open stream: No such file or directory - in file /var/www/…/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 209 {“className”:“Mautic\CategoryBundle\Entity\Category”,“classMetadata”:"[object] (Doctrine\ORM\Mapping\ClassMetadata: Doctrine\ORM\Mapping\ClassMetadataInfo@00000000279c593c000000007538bc77)",“proxyClassName”:“Proxies\CG\Mautic\CategoryBundle\Entity\Category”,“fileName”:"/var/www/…/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php"}
[2019-11-12 19:13:43] mautic.ERROR: PHP Notice: require(): Failed opening required ‘/var/www/…/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php’ (include_path=’.:/opt/plesk/php/7.0/share/pear’) - in file /var/www/…/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 209
[2019-11-12 19:13:43] mautic.ERROR: Symfony\Component\Debug\Exception\FatalErrorException: Notice: require(): Failed opening required ‘/var/www/…/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php’ (include_path=’.:/opt/plesk/php/7.0/share/pear’) - in file /var/www/…/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 209
[2019-11-12 19:13:43] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: “Compile Error: require(): Failed opening required ‘/var/www/…/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php’ (include_path=’.:/opt/plesk/php/7.0/share/pear’)” at /var/www/…/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php line 209 {“exception”:"[object] (Symfony\Component\Debug\Exception\FatalErrorException(code: 0): Compile Error: require(): Failed opening required ‘/var/www/…/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php’ (include_path=’.:/opt/plesk/php/7.0/share/pear’) at /var/www/…/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:209)"}

Steps I have tried to fix the problem:

rm -rf app/cache/* nothing working
changing plesk from 7.2 to 7.0
rm -rf app/cache/*
not working

schema update allready ok

how to get a quick fix?

If a formfield is connected to a custom field, then check if the problem is related to the custom field. Custom fields can be disabled. Check if the form works without them

This is a problem related with the proxy classes generated by Symfony.

There are only two reasons why Mautic is not able to find them:

  1. The classes are not where they are expected to be;
  2. The classes are there, but they were created by another Unix user.

The first thing you should do is to check that the indicated proxy classes actually exists in the path indicated.

If the classes exist, then you should check the user who created them…

If I’d have to guess, I guess is a problem of permissions.

The problem is Mautic’s cache isn’t being properly generated. Make sure /app/cache/ is owned by the web server user.

Technically, the cache is generated correctly… Is the user who owns the folder and the files in it that is not correct :sweat_smile:

Hi, I am getting the same error, could someone find the solution? Here´s my log:

[2019-12-13 14:10:19] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: “Compile Error: require(): Failed opening required ‘/home/runcloud/webapps/mautic/app/cache/prod/doctrine/orm/Proxies/__CG__MauticPluginBundleEntityPlugin.php’ (include_path=’.:’)” at /home/runcloud/webapps/mautic/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php line 209 {“exception”:"[object] (Symfony\Component\Debug\Exception\FatalErrorException(code: 0): Compile Error: require(): Failed opening required ‘/home/runcloud/webapps/mautic/app/cache/prod/doctrine/orm/Proxies/__CG__MauticPluginBundleEntityPlugin.php’ (include_path=’.:’) at /home/runcloud/webapps/mautic/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php:209)"}

After hours trying to solve it I found a solution:

Just run the command:

php app/console cache:warmup --env=prod

2 Likes

In my case, upgrading Mautic on shell didn’t work properly due to the bad hosting environment.
There was one database migration missing:

ALTER TABLE forms ADD form_attr VARCHAR(255) DEFAULT NULL

You might want to check, if that column exists.

1 Like

Hello,

I had the same error.

My environment was:
cPanel instance inside WHM host with Liquidweb hosting company.
I did the update on the Mautic environment. Failed with error

The Mautic update could not complete successfully because of the following error: An error occurred while updating the database. Check log for more details.

Tried steps on:
https://www.mautic.org/docs/en/tips/update-failed.html

Also Tried steps on:
php app/console mautic:update:find

and then:

php app/console mautic:update:apply

Everythink looked OK but the forms page was not loading… stayed hanged.
I also tried to open directly in another browser the page:
https://mydomainhere.com/mautic/s/forms
and I saw the 500 error which took me here.

I did run
php app/console cache:warmup --env=prod
same results

and i finally went to the database with PHPMyAdmin on the cPanel.
Opened the database called mydomainmain_maut592

went to the mautim_forms table and the field form_attr was not there (you can see that selecting the table in phpMyAdmin and then “Structure” tab. You will see in the field “form_attr” is listed or not.

Then I ran
ALTER TABLE mautim_forms ADD form_attr VARCHAR(255) DEFAULT NULL
(note that in your install, “mautim_forms” can be "forms"or something similar).

and now the problem was fixed.

Thanks to all the community! specially to dirk_s and dante.

Alejandro.-

this saved my day THANKS!

On a NEW environment (not an upgrade) I had the same “AbstractProxyFactory.php on line 209” errors
running the mautic:segments:update commands

dantearaujo suggestion solved the problem for this case and the cron jobs manually ran and segmets where updated.

MORE INFO:
I have this instance in WHM CPanel, so I had to play with dome PHP versions combinations 7.2, 5.6 and so on.

Thanks!

Alejandro.-