DivanteLtd / pimcore-magento2-bridge

Pimcore module for Magento 2 integration
36 stars 24 forks source link

Fatal error while installation #18

Closed gauert closed 5 years ago

gauert commented 5 years ago

getting error after bin/console pimcore:bundle:enable DivanteMagentoIntegrationBundle (pimcore 6.0.2)

Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\RuntimeException: Cannot autowire service "Divante\MagentoIntegrationBundle\Service\Product\ProductStatusService": argument "$mapper" of method "Divante\MagentoIntegrationBundle\Service\AbstractObjectService::__construct()" references interface "Divante\MagentoIntegrationBundle\Interfaces\MapperInterface" but no such service exists. Did you create a class that implements this interface? in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php:54 Stack trace:

0 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php(82): Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass->processValue(Object(Symfony\Component\DependencyInjection\Definition), true)

1 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php(32): Symfony\Component\DependencyInje in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php on line 54

prugala commented 5 years ago

Hello

Please try to enable DivanteObjectMapperBundle bundle before with commend (or in Pimcore panel Tools > Bundles): bin/console pimcore:bundle:enable DivanteObjectMapperBundle

gauert commented 5 years ago

Hello

Please try to enable DivanteObjectMapperBundle bundle before with commend (or in Pimcore panel Tools > Bundles): bin/console pimcore:bundle:enable DivanteObjectMapperBundle hello, thank you for help! it works but now im getting this "Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException: The service "coreshop.command.create_database_tables" has a dependency on a non-existent parameter "coreshop.resources". in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php:100 Stack trace:

0 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php(67): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->get('coreshop.resour...')

1 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php(216): Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag->get('coreshop.resour...')

2 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php(187): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->resolveString('%coreshop.resou...', Array)

3 /var/www/html/v in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php on line 100"

gauert commented 5 years ago

what should i do to fix such errors so i could stop reinstall pimcore over and over?

prugala commented 5 years ago

I got the same error. I will investigate and fix it tomorrow. At the moment please edit your var/config/extensions.php file and sort bundles in this order.

        "CoreShop\\Bundle\\ResourceBundle\\CoreShopResourceBundle" => TRUE,
        "CoreShop\\Bundle\\PimcoreBundle\\CoreShopPimcoreBundle" => TRUE,
        "PimcoreDevkitBundle\\PimcoreDevkitBundle" => TRUE,
        "Divante\\ObjectMapperBundle\\DivanteObjectMapperBundle" => TRUE,
        "Divante\\MagentoIntegrationBundle\\DivanteMagentoIntegrationBundle" => TRUE

Clear cache with bin/console c:c and site should works.

BPWBeck commented 5 years ago

Hey, did you get any results yesterday?

prugala commented 5 years ago

Hi, no

In the instalation instruction we have information about bundles which user should enable. We can "fix" this problem in two ways: first is change order in instruction and second (better): In Installer class add checking that other bundles are enabled if not turn them on https://github.com/DivanteLtd/pimcore-magento2-bridge/blob/master/src/Divante/MagentoIntegrationBundle/Migrations/Installer.php

We are open on Pull Requests :)

https://github.com/DivanteLtd/pimcore-magento2-bridge#installinggetting-started

gauert commented 5 years ago

so right now i cant do anything with coreshop.resources error?

prugala commented 5 years ago

You can edit your extensions file as I wrote above: https://github.com/DivanteLtd/pimcore-magento2-bridge/issues/18#issuecomment-511229574

In new projects bundles should be installed in this order:

  1. bin/console pimcore:bundle:enable CoreShopResourceBundle
  2. bin/console pimcore:bundle:enable DivanteObjectMapperBundle
  3. bin/console pimcore:bundle:enable DivanteMagentoIntegrationBundle
gauert commented 5 years ago

oh, my bad. thank you!

gauert commented 5 years ago

so i try'd your advise above, same error after cleaning cache (( image bin/console c:c Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException: The service "coreshop.command.create_database_tables" has a dependency on a non-existent parameter "coreshop.resources". in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php:100 Stack trace:

0 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php(67): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->get('coreshop.resour...')

1 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php(216): Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag->get('coreshop.resour...')

2 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php(187): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->resolveString('%coreshop.resou...', Array)

3 /var/www/html/v in /var/www/html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php on line 100

gauert commented 5 years ago

funny: i can exec bin/console pimcore:bundle:enable DivanteMagentoIntegrationBundle then bin/console pimcore:bundle:enable DivanteObjectMapperBundle but after this everything goes black =( bin/console pimcore:bundle:enable CoreShopResourceBundle

mbolka commented 5 years ago

@SergeyGauert Because many users have encountered issues with CoreShopResourceBundle we have decided to remove this dependency. Could you confirm if your problem still occurs?

mbolka commented 5 years ago

I’m closing this issue because it has been inactive for a few months. This probably means that it is not reproducible or it has been fixed in a newer version.

Please reopen if you still encounter this issue with the 1.2.0 and then please ireport issue. You can also contribute directly by providing a patch. Thank you!