OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Apply custom fields changes to dev environment

This topic contains 9 replies, has 4 voices, and was last updated by  Alexander 5 years, 3 months ago.

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

  • Creator
  • #33558

    Nikita Petrov

    I try to run our CRM production instance in dev env, but have this error:

    As I researched “test_field” was one of custom filed that was added to Opportunity via interface (menu “System” -> “Entities” -> “Entity Management”) in prod env, but now it is deleted.

    Is there any way to solve problem with occurrence of error above? Everything happens in version 1.3 and in prod env there is not any error. Additionaly noticed that all entities that has or had any custom fields has schema status “Requires update” in entity management page – when I try to update schema I have 500 error which I can not debug in prod mode.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Author
  • #33559
    Dima Soroka
    Dima Soroka

    Cleaning cache in dev environment should resolve the problem.


    Nikita Petrov

    Unfortunately this does not help. :( I do “rm -rf app/cache/*” but error still here.

    May be there is any way to clear DB? What tables I should check to delete test fields?




    Please try to run app/console oro:platform:update --force on current codebase state.
    That should fix extend configs.

    Extend fields stored in oro_entity_config table data – serialized data in base64


    Nikita Petrov

    When I try to update platform in prod mode there is no error:

    When I try in dev env (or without passing env parameter) error still here:

    Seems I need to clear DB manually…


    Nikita Petrov

    In oro_entity_config table I see something like this:

    This is custom format? Is there any way to convert them in readable view?



    Thats serialized data, you can restore it here https://www.functions-online.com/unserialize.html


    Nikita Petrov

    I updated data for table oro_entity_config for Lead (“test_field” excluded):

    But after this after performing:

    I have this error:

    It seems that everything has broken. Is there any way to clean up entity configs?


    Nikita Petrov

    Anybody can help me? Actually now we have semi-working CRM which broken after editing custom field from UI. When we try to update schema from UI we see 500 error which lead to error above.

    It’s to bad that CRM has broken after UI manipulations… Consequences of them show strange errors about fields with automatically called names.




    It seems like cyclical metadata load under certain conditions.
    Bug appears only in dev mode in this case. But i have met such exception during update process in prod mode too.

      IndexMetadataBuilder tries to get field config
      \Oro\Bundle\EntityConfigBundle\Config\ConfigModelManager::findFieldModel are called and it calls \Oro\Bundle\EntityConfigBundle\Config\ConfigModelManager::ensureFieldLocalCacheWarmed
      ensureFieldLocalCacheWarmed calls \Oro\Bundle\EntityConfigBundle\Entity\EntityConfigModel::getFields
      fields are loaded from DB
      Doctrine unserializes field data and calls autoloader
      autoloader calls getAllMetadata
      that eventually lead to IndexMetadataBuilder tries to get config of the same field
      findFieldModel are called again and it calls ensureFieldLocalCacheWarmed
      BUT we are still in previous ensureFieldLocalCacheWarmed call!

    In the second pass in ensureFieldLocalCacheWarmed $this->fieldLocalCache[$className] is already set. But it is an empty array because the previous call of ensureFieldLocalCacheWarmed not finished yet.
    So findFieldModel returns nothing and the exception are thrown.

    Can you explain what leads to this behaviour? Is it a bug of code, or wrong field config in DB. And how should it be fixed?

    Thank you.

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

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

You will be redirected to [title]. Would you like to continue?

Yes No