1
votes

I have this error in my system in the production server, but I have no idea why cause in my development server everything run fine.

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Unable to load class "Twig_Extension_Escaper"' in /home/content/79/11253479/html/witf/path/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php:259 Stack trace: #0 /home/content/79/11253479/html/witf/path/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php(98): Symfony\Component\ClassLoader\ClassCollectionLoader::getOrderedClasses(Array) #1 /home/content/79/11253479/html/witf/path/app/bootstrap.php.cache(2303): Symfony\Component\ClassLoader\ClassCollectionLoader::load(Array, '/home/content/7...', 'classes', false, false, '.php') #2 /home/content/79/11253479/html/witf/path/app/bootstrap.php.cache(2139): Symfony\Component\HttpKernel\Kernel->doLoadClassCache('classes', '.php') #3 /home/content/79/11253479/html/witf/path/app/bootstrap.php.cache(2173): Symfony\Component\HttpKernel\Kernel->boot() #4 /home/content/79/11253479/html/index.php(27): Symfony\Component\HttpKernel\Kernel->handle(Object(S in /home/content/79/11253479/html/witf/path/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php on line 259

1
please try composer update -o and afterwards app/console cache:clear --env=prod. can you confirm the file vendor/twig/twig/lib/Twig/Extension/Escaper.php exists on your production server? if updating vendors, clearing the cache didn't fix the problem and the file exists ... it might be a permission issue.Nicolai Fröhlich
Thanks a million!!! I have no clue why the class Escaper.php was emptyJuan Luis Vivas Occhipinti
i have added my reply as an answer so you can accept it in order to have the question closed. glad i could help :)Nicolai Fröhlich

1 Answers

0
votes

please try composer update -o and afterwards app/console cache:clear --env=prod.

Further check that the file vendor/twig/twig/lib/Twig/Extension/Escaper.php actually exists on your production server.