ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 9 replies, has 4 voices, and was last updated by  Alexander 1 year, 10 months ago.

  • Creator
    Topic
  • #7033

    Nikita Petrov
    Participant

    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
    Replies
  • #7117
    Dima Soroka
    Dima Soroka
    Oro Core

    Cleaning cache in dev environment should resolve the problem.

    #7119

    Nikita Petrov
    Participant

    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?

    #7144

    Sergey
    Oro Core

    Hi!

    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

    #7334

    Nikita Petrov
    Participant

    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…

    #7335

    Nikita Petrov
    Participant

    In oro_entity_config table I see something like this:

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

    #7383

    Sergey
    Oro Core

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

    #8467

    Nikita Petrov
    Participant

    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?

    #8522

    Nikita Petrov
    Participant

    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.

    #10547

    Alexander
    Participant

    Hi.

    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)

You must be logged in to reply to this topic.