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

pim_enrich.entity.fallback.generic_error when trying to create a product

Open mabt opened this issue 3 years ago • 10 comments

:bug: I'm reporting a Bug :bug:

Akeneo v5, after a fresh install (make dev) on debian10, getting this error when trying to create a product : "pim_enrich.entity.fallback.generic_error"

image

[2021-05-27 11:13:20] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: Unable to find template "" (looked into: /home/XXX/www/prod-pim-primetimestore/vendor/symfony/twig-bridge/Resources/views/Form). at /home/XXX/www/prod-pim-primetimestore/vendor/symfony/twig-bridge/TwigEngine.php line 137) {"exception":"[object] (InvalidArgumentException(code: 0): Unable to find template "" (looked into: /home/XXX/www/prod-pim-primetimestore/vendor/symfony/twig-bridge/Resources/views/Form). at /home/XXX/www/prod-pim-primetimestore/vendor/symfony/twig-bridge/TwigEngine.php:137, Twig\Error\LoaderError(code: 0): Unable to find template "" (looked into: /home/XXX/www/prod-pim-primetimestore/vendor/symfony/twig-bridge/Resources/views/Form). at /home/XXX/www/prod-pim-primetimestore/vendor/twig/twig/src/Loader/FilesystemLoader.php:265)"} []

Does someone faced this issue?

mabt avatar May 27 '21 11:05 mabt

I'm getting the same error and here

[2021-05-27 14:36:55] request.CRITICAL: Uncaught PHP Exception Akeneo\Platform\Bundle\InstallerBundle\Exception\UnavailableCreationTimeException: ""CREATE_TIME" not available for table "oro_user"" at /srv/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Platform/Bundle/InstallerBundle/InstallStatusManager/InstallStatusManager.php line 67 {"exception":"[object] (Akeneo\\Platform\\Bundle\\InstallerBundle\\Exception\\UnavailableCreationTimeException(code: 0): \"CREATE_TIME\" not available for table \"oro_user\" at /srv/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Platform/Bundle/InstallerBundle/InstallStatusManager/InstallStatusManager.php:67)"} []

karimennassiri avatar May 27 '21 15:05 karimennassiri

@karimennassiri I also faced this error, I don't remember but I think I solved this error updating mariadb to the 10.6.

About my error, there is a strange behavior, some decimals are added :

[27-May-2021 14:54:11 UTC] platform: Y-m-d H:i:s
[27-May-2021 14:54:11 UTC] value: 2021-05-27 14:54:11
[27-May-2021 14:54:11 UTC] selfutc: DateTimeZone Object
(
    [timezone_type] => 3
    [timezone] => UTC
)

[27-May-2021 14:54:11 UTC] platform: Y-m-d H:i:s
[27-May-2021 14:54:11 UTC] value: 2021-05-27 14:54:11.000000 <-------------------
[27-May-2021 14:54:11 UTC] selfutc: DateTimeZone Object
(
    [timezone_type] => 3
    [timezone] => UTC
)

Here a quick fix :

..vendor/akeneo/pim-community-dev/src/Akeneo/Tool/Bundle/StorageUtilsBundle/Doctrine/DBAL/Types/UTCDateTimeType.php

@@ -47,6 +47,15 @@ class UTCDateTimeType extends DateTimeType
             (self::$utc) ? self::$utc : (self::$utc = new \DateTimeZone('UTC'))
         );

+       if (!$val){
+               $val = \DateTime::createFromFormat(
+                       $platform->getDateTimeFormatString(),
+                       explode('.', $value)[0],
+                       (self::$utc) ? self::$utc : (self::$utc = new \DateTimeZone('UTC'))
+               );
+
+       }
+
         $serverTimezone = date_default_timezone_get();
         $val->setTimezone(new \DateTimeZone($serverTimezone));

mabt avatar May 27 '21 15:05 mabt

I still have this my error even i moved into mariadb 10.6

mariadb Ver 15.1 Distrib 10.6.1-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

[2021-05-27 16:02:05] php.CRITICAL: Uncaught Error: Argument 3 passed to Akeneo\Pim\Structure\Component\Query\PublicApi\Family\RequiredAttributesMaskForChannelAndLocale::__construct() must be of the type array, null given, called in /srv/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Automation/DataQualityInsights/back/Infrastructure/Persistence/Query/Completeness/GetRequiredAttributesMasksQuery.php on line 93 {"exception":"[object] (TypeError(code: 0): Argument 3 passed to Akeneo\\Pim\\Structure\\Component\\Query\\PublicApi\\Family\\RequiredAttributesMaskForChannelAndLocale::__construct() must be of the type array, null given, called in /srv/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Automation/DataQualityInsights/back/Infrastructure/Persistence/Query/Completeness/GetRequiredAttributesMasksQuery.php on line 93 at /srv/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Structure/Component/Query/PublicApi/Family/RequiredAttributesMaskForChannelAndLocale.php:32)"} []
[2021-05-27 16:02:05] request.CRITICAL: Uncaught PHP Exception TypeError: "Argument 3 passed to Akeneo\Pim\Structure\Component\Query\PublicApi\Family\RequiredAttributesMaskForChannelAndLocale::__construct() must be of the type array, null given, called in /srv/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Automation/DataQualityInsights/back/Infrastructure/Persistence/Query/Completeness/GetRequiredAttributesMasksQuery.php on line 93" at /srv/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Structure/Component/Query/PublicApi/Family/RequiredAttributesMaskForChannelAndLocale.php line 32 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Argument 3 passed to Akeneo\\Pim\\Structure\\Component\\Query\\PublicApi\\Family\\RequiredAttributesMaskForChannelAndLocale::__construct() must be of the type array, null given, called in /srv/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Automation/DataQualityInsights/back/Infrastructure/Persistence/Query/Completeness/GetRequiredAttributesMasksQuery.php on line 93 at /srv/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Structure/Component/Query/PublicApi/Family/RequiredAttributesMaskForChannelAndLocale.php:32)"} []
[2021-05-27 16:02:05] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: Unable to find template "" (looked into: /srv/pim/vendor/symfony/twig-bridge/Resources/views/Form). at /srv/pim/vendor/symfony/twig-bridge/TwigEngine.php line 137) {"exception":"[object] (InvalidArgumentException(code: 0): Unable to find template \"\" (looked into: /srv/pim/vendor/symfony/twig-bridge/Resources/views/Form). at /srv/pim/vendor/symfony/twig-bridge/TwigEngine.php:137, Twig\\Error\\LoaderError(code: 0): Unable to find template \"\" (looked into: /srv/pim/vendor/symfony/twig-bridge/Resources/views/Form). at /srv/pim/vendor/twig/twig/src/Loader/FilesystemLoader.php:265)"} []
[2021-05-27 16:02:05] php.CRITICAL: Uncaught Exception: Unable to find template "" (looked into: /srv/pim/vendor/symfony/twig-bridge/Resources/views/Form). {"exception":"[object] (InvalidArgumentException(code: 0): Unable to find template \"\" (looked into: /srv/pim/vendor/symfony/twig-bridge/Resources/views/Form). at /srv/pim/vendor/symfony/twig-bridge/TwigEngine.php:137, Twig\\Error\\LoaderError(code: 0): Unable to find template \"\" (looked into: /srv/pim/vendor/symfony/twig-bridge/Resources/views/Form). at /srv/pim/vendor/twig/twig/src/Loader/FilesystemLoader.php:265, TypeError(code: 0): Argument 3 passed to Akeneo\\Pim\\Structure\\Component\\Query\\PublicApi\\Family\\RequiredAttributesMaskForChannelAndLocale::__construct() must be of the type array, null given, called in /srv/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Automation/DataQualityInsights/back/Infrastructure/Persistence/Query/Completeness/GetRequiredAttributesMasksQuery.php on line 93 at /srv/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Structure/Component/Query/PublicApi/Family/RequiredAttributesMaskForChannelAndLocale.php:32)"} []

karimennassiri avatar May 27 '21 16:05 karimennassiri

@mabt I've installed mySQL (and remove MariaDb) maybe you should do the same, and now everything is going good 👍

karimennassiri avatar May 28 '21 16:05 karimennassiri

@karimennassiri thanks, I gonna give a try.

mabt avatar Jun 01 '21 13:06 mabt

This bug still exists in MariaDB 10.9.3. Is MariaDB officially not supported?

bweinzierl avatar Nov 07 '22 15:11 bweinzierl

any news on this issue? when you will provide the support for the MariaDB?

navneetbhardwaj avatar Dec 08 '22 08:12 navneetbhardwaj

Any update regarding that error I am also facing same issue ==> https://prnt.sc/4LiQdOtLl_Te Screenshot_1

prakhar-rajput avatar Dec 22 '22 05:12 prakhar-rajput

Issue still exists in Edition CE Version 6.0.28. Screenshot 2023-11-03 at 10 44 29

OscarMadia avatar Nov 03 '23 09:11 OscarMadia

Seems to exist for me in CE 7.0.68:

  1. fresh prod install following guides (MySQL 8.2.0 is running on a docker for reasons)
  2. add a test family,
  3. add product,
  4. add fake test sku

Logs show error as:

   "Could not convert database value "2024-07-11 18:31:56.000000" to Doctrine Type datetime_immutable. 
   Expected format: Y-m-d H:i:s" at 
          /srv/pim/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php line 53 
{"exception": "[object] (Doctrine\\DBAL\\Types\\ConversionException(code: 0): Could not convert database value \"2024-07-11 18:31:56.000000\" to Doctrine Type datetime_immutable. Expected format: Y-m-d H:i:s at /srv/pim/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:53)"} []```

I ran `doctrine:schema:update --force` to see if that could help the issue and it does not. 

sethpjohnson avatar Jul 11 '24 18:07 sethpjohnson