OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce Problem occurring while upgrading OroCommerce 1.3.0 to 1.5.0

This topic contains 15 replies, has 4 voices, and was last updated by  Prabhat 5 years, 10 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #32533

    Prabhat
    Participant

    Hi,

    I am trying to upgrade my OroCommerce instance from 1.3.0 to 1.5.0 but in doing so I am stuck on cache clear step after upgrading the platform using platform:update command as guided in https://oroinc.com/doc/orocommerce/current/install-upgrade/upgrade. Here is the symfony output on console:-

    [Oro\Component\ChainProcessor\Exception\ExecutionFailedException]
    Processor failed: “oro_api.collect_subresources.initialize_subresources”. Reason: Processor failed: “oro_api.get_config.complete_definition”. Reason: Cannot build
    the configuration of “Oro\Bundle\TaskBundle\Entity\Task” because this causes the circular dependency.

    [Oro\Component\ChainProcessor\Exception\ExecutionFailedException]
    Processor failed: “oro_api.get_config.complete_definition”. Reason: Cannot build the configuration of “Oro\Bundle\TaskBundle\Entity\Task” because this causes the c
    ircular dependency.

    [LogicException]
    Cannot build the configuration of “Oro\Bundle\TaskBundle\Entity\Task” because this causes the circular dependency.

    Please help me resolve this problem.

    Thanks and Regards,
    Prabhat

Viewing 15 replies - 1 through 15 (of 15 total)
  • Author
    Replies
  • #32534

    mmiasnikov
    Participant

    Hello, Prabhat.

    Thank you for the question. Maybe it’s a bug. We need some time for investigation.

    Please, clarify for me the following:

    1) Do you have your custom api.yml files (at all, did you change some entity API configs in your application)?

    2) Did you create your own API processors for get_config action?

    #32535

    Prabhat
    Participant

    Hi mmiasnikov,

    No we didn’t change anything in the API processors but we do have made a custom bundle which I remove at the time of upgrade with changes in Appkernel.php, config.yml and routing.yml to deregister the custom bundle and then try to upgrade but it gives me error.

    Regards,
    Prabhat

    #32536

    mmiasnikov
    Participant

    Hello, Prabhat.

    Unfortunately, I could not reproduce your bug.

    I tried to install OroCommerce application (https://github.com/oroinc/orocommerce-application) version 1.3, then update it to 1.5 version.

    I’ve successfully cleared the cache on step after ‘oro:platform:update’ command.

    So we need to investigate deeply. Please, answer the following questions:

    1) Did you clear the cache, as described in step, before ‘oro:platform:update’ run?

    2) Had you some changes to DataBase in your custom code?

    3) Please, try to clear the cache in –dev enironment

    and please, let me know the results.

    #32537

    Prabhat
    Participant

    Yes, I have done the same steps as in the documentation. And yes, my bundle changed the database also because I was working on making a new integration channel just like paypal, ups and others. So for creating integration, I did change database. But it should take the database changes as it is since they are new. Is there any way to retain my custom database changes and upgrade only the functionality and fix bugs?

    One more important thing. If I install orocommerce 1.3.0 with demo data and no other changes and then try to upgrade, it does not give any error.

    But my requirement is that when I upgrade, my customization is copied to upgraded instance along with platform upgrade.

    Regards,
    Prabhat

    #32538

    mmiasnikov
    Participant

    The question, that, probably should have been asked first: why do you, actually, remove your bundle before upgrading?

    If you’ve created your own bundle in src (for example) folder without changing the vendors, you do not have to remove your custom code. All the changes during upgrade process are performing only with vendor’s code.

    Did you try to upgrade without removing the code? Or you have some issues with that?

    #32539

    Prabhat
    Participant

    I have tried the following 4 scenarios:-

    1. Generate new bundle in vendor/oro/commerce/src/Oro/Bundle/, add my required functionalities and then tried to upgrade without removing the bundle. Result: Failed with same error.

    2. Generate new bundle in src, add my required functionalities and then tried to upgrade without removing the bundle. Result: Failed with same error.

    3. Generate new bundle in vendor/oro/commerce/src/Oro/Bundle/, add my required functionalities and then tried to upgrade after removing the bundle. Result: Failed with same error.

    4. Generate new bundle in src, add my required functionalities and then tried to upgrade after removing the bundle, making changes in AppKernel.php, config.yml and routing.yml to deregister the bundle. Result: Failed with same error.

    Regards,
    Prabhat Nagpal

    #32540

    mmiasnikov
    Participant

    Thank you.

    Hm. Unfortunately, I can’t imagine at the moment, how I can reproduce the bug… And that is not a usual and simple bug, so I can simply answer you about the cause…

    Please, try the following:

    1) Create the backup of your current DB that you got after upgrading (Backup A)

    2) Install clear OroCommerce application 1.5 version in the new folder and database, created from scratch. Make sure that it works.

    3)
    a) Create a backup of your new application DB (backup B).
    b) Restore backup A to new created DB

    4) Add your customisation to your bundle in src folder (it’s the only correct way for customisations, vendor folder has to be untouchable)

    5) Check if it works

    and, please, tell me about results in this thread.

    Regards,
    Mykolay Miasnikov

    #32541

    Prabhat
    Participant

    Hi mmiasnikov,

    I have tried above step too but the same error is coming while clearing cache. Otherwise, the frontend and backend are working fine. Only cache is not able to clear.

    Regards,
    Prabhat Nagpal

    #32542

    Dmitriy Pasechnik
    Participant

    Hi Prabhat
    Do you use functionality from OroCRMTaskBundle at all? Perhaps you can just remove this bundle from your application.

    Try to remove “oro/crm-task-bundle”: “2.3.x-dev” from composer.json, execute ‘composer update’ command, and then run ‘platform:update’.

    Just dont forget to make full backup of your application & DB before doing such experiments.

    #32543

    Prabhat
    Participant

    I tried to find oro/crm-task-bundle in composer.json too but it is not there. But if I manually try to remove the crm-task-bundle, the first error I get is from EmailBundle.
    The crm-task-bundle directory is present in vendor/oro directory and it has its own separate composer.json file.

    Regards,
    Prabhat Nagpal

    #32544

    Dmitriy Pasechnik
    Participant

    Try to execute
    sudo php composer.phar update –prefer-dist –no-dev
    instead of
    sudo php composer.phar install –prefer-dist –no-dev
    during p.6 at https://oroinc.com/doc/orocommerce/current/install-upgrade/upgrade

    #32545

    Prabhat
    Participant
    #32546

    Prabhat
    Participant

    I tried composer update too. Not working. Getting the same error.

    #32547

    msulima
    Moderator

    Hello,
    as I see from your comments and code of https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/ApiBundle/Provider/ConfigProvider.php#L51 this issue concerns to your customization.

    So, we should know why it happened for “Oro\Bundle\TaskBundle\Entity\Task” entity. Maybe your customization has changes in this entity or entities connected to this entity. Try to use “var_dump($this->processing, $cacheKey, $version, $requestType, $extras)” inside “if” before “\LogicException”. Maybe we will see what entities and what parameters lead to problem.


    #32548

    Prabhat
    Participant

    Hi msulima,

    I have got the following output from the above command:-

    array(1) {
    [“rest|latest|Oro\Bundle\TaskBundle\Entity\Task|definition”]=>
    bool(true)
    }
    string(56) “rest|latest|Oro\Bundle\TaskBundle\Entity\Task|definition”
    string(6) “latest”
    object(Oro\Bundle\ApiBundle\Request\RequestType)#537473 (2) {
    [“types”:protected]=>
    array(1) {
    [0]=>
    string(4) “rest”
    }
    [“str”:”Oro\Bundle\ApiBundle\Request\RequestType”:private]=>
    string(4) “rest”
    }
    array(1) {
    [0]=>
    object(Oro\Bundle\ApiBundle\Config\EntityDefinitionConfigExtra)#537557 (4) {
    [“action”:protected]=>
    NULL
    [“collection”:protected]=>
    bool(false)
    [“parentClassName”:protected]=>
    NULL
    [“associationName”:protected]=>
    NULL
    }
    }

    Please tell how to proceed further.

    Regards,
    Prabhat Nagpal

Viewing 15 replies - 1 through 15 (of 15 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

Back to top