pim-community-dev icon indicating copy to clipboard operation
pim-community-dev copied to clipboard

Error Getting 500 Internal Server Error

Open ludo-mon-key opened this issue 1 year ago • 3 comments

HI, I have to upgrade an old Akeneo 4 installation to 5. I followed the instructions in the documentation: https://docs.akeneo.com/latest/migrate_pim/upgrade/upgrade_from_40_to_50.html After running the command: NO_DOCKER=true make upgrade-front if I go to the login page, the application goes into 500 Internal Server Error.

In the logs: request.CRITICAL: Uncaught PHP Exception ArgumentCountError: “Too few arguments to function Akeneo\Pim\Enrichment\Component\Product\Normalizer\Standard\ProductNormalizer::__construct(), 2 passed in /var/www/pim/var/cache/ prod/Container27T9tUS/getAkeneoBatch_Job_JobRegistryService.php on line 709 and exactly 3 expected” at /var/www/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Enrichment/Component/Product/Normalizer/Standard/ProductNormalizer .php line 37 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Too few arguments to function Akeneo\Pim\Enrichment\Component\ Product\Normalizer\Standard\ProductNormalizer::__construct(), 2 passed in /var/www/pim/var/cache/prod/Container27T9tUS/getAkeneoBatch_Job_JobRegistryService.php on line 709 and exactly 3 expected at /var/www/ pim/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Enrichment/Component/Product/Normalizer/Standard/ProductNormalizer.php:37)“} []

request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: Unable to find template “” (looked into: /var/www/pim/vendor/symfony/twig-bridge/Resources/views/Form). at /var/www /pim/vendor/symfony/twig-bridge/TwigEngine.php line 137) {“exception”:“[object] (InvalidArgumentException(code: 0): Unable to find template \“\” (looked into: /var/www /pim/vendor/symfony/twig-bridge/Resources/views/Form).at /var/www/pim/vendor/symfony/twig-bridge/TwigEngine.php:137, Twig\Error\LoaderError(code: 0): Unable to find template \“\” (looked into: /var/www/pim/vendor/symfony/twig-bridge/Resources/views/Form). at /var/www/pim/vendor/twig/twig /src/Loader/FilesystemLoader.php:265)“} []

Do you have any suggestions on how to troubleshoot?

ludo-mon-key avatar Jun 12 '23 09:06 ludo-mon-key

Have same problem!

rmxnnkoko avatar Sep 23 '23 00:09 rmxnnkoko

Hello,

Does the cache is cleared ?

Can you look the construct declaration of the file src/Akeneo/Pim/Enrichment/Component/Product/Normalizer/Standard/ProductNormalizer.php ? Can you paste the lines from public function __construct( to ) { ?

I see that a third argument is needed since this commit but it's tagged with v7.0.29 !

Good luck !

hogren avatar Sep 25 '23 06:09 hogren

Yes i did it! /** * ProductNormalizer constructor. * * @param NormalizerInterface $propertiesNormalizer * @param NormalizerInterface $associationsNormalizer * @param NormalizerInterface $quantifiedAssociationsNormalizer */ public function __construct( NormalizerInterface $propertiesNormalizer, NormalizerInterface $associationsNormalizer, NormalizerInterface $quantifiedAssociationsNormalizer ) { $this->propertiesNormalizer = $propertiesNormalizer; $this->associationsNormalizer = $associationsNormalizer; $this->quantifiedAssociationsNormalizer = $quantifiedAssociationsNormalizer; }

rmxnnkoko avatar Sep 26 '23 00:09 rmxnnkoko