pim-community-dev
pim-community-dev copied to clipboard
pim_enrich.entity.fallback.generic_error when trying to create a product
: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"
[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?
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 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));
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)"} []
@mabt I've installed mySQL (and remove MariaDb) maybe you should do the same, and now everything is going good 👍
@karimennassiri thanks, I gonna give a try.
This bug still exists in MariaDB 10.9.3. Is MariaDB officially not supported?
any news on this issue? when you will provide the support for the MariaDB?
Any update regarding that error I am also facing same issue
==> https://prnt.sc/4LiQdOtLl_Te
Issue still exists in Edition CE Version 6.0.28.
Seems to exist for me in CE 7.0.68:
- fresh prod install following guides (MySQL 8.2.0 is running on a docker for reasons)
- add a test family,
- add product,
- 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.