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 8 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.
- CreatorTopic
- November 14, 2014 at 9:03 am #33558
I try to run our CRM production instance in dev env, but have this error:
123Fatal error: Uncaught exception 'Oro\Bundle\EntityConfigBundle\Exception\RuntimeException' with message 'A model for "OroCRM\Bundle\SalesBundle\Entity\Lead::test_field" was not found' in /home/vagrant/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityConfigBundle/Config/ConfigModelManager.php:223 Stack trace: #0 /home/vagrant/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityConfigBundle/Config/ConfigManager.php(351): Oro\Bundle\EntityConfigBundle\Config\ConfigModelManager->getFieldModel('OroCRM\\Bundle\\S...', 'test_field') #1 /home/vagrant/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityConfigBundle/Provider/ConfigProvider.php(87): Oro\Bundle\EntityConfigBundle\Config\ConfigManager->getId('extend', 'OroCRM\\Bundle\\S...', 'test_field') #2 /home/vagrant/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityConfigBundle/Provider/ConfigProvider.php(136): Oro\Bundle\EntityConfigBundle\Provider\ConfigProvider->getId('OroCRM\\Bundle\\S...', 'test_field') #3 /home/vagrant/orocrm/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/ORM/ in /home/vagrant/orocrm/vendor/twig/twig/lib/Twig/Template.php on line 148As 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.
- CreatorTopic
- AuthorReplies
- November 18, 2014 at 11:14 pm #33559
Cleaning cache in dev environment should resolve the problem.
November 19, 2014 at 2:28 am #33560Unfortunately 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?
November 20, 2014 at 1:54 am #33561Hi!
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
tabledata
– serialized data in base64November 24, 2014 at 2:23 am #33562When I try to update platform in prod mode there is no error:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990$ app/console oro:platform:update --force --env=prodProcess migrations...[notice] > Oro\Bundle\EntityExtendBundle\Migration\RefreshExtendCacheMigration[notice] > Oro\Bundle\EntityConfigBundle\Migration\UpdateEntityConfigMigration[notice] > Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendConfigMigration[notice] > Oro\Bundle\EntityExtendBundle\Migration\UpdateExtendIndicesMigrationLoading workflow definitions...> task_flow> b2b_flow_lead> b2b_flow_sales> b2b_flow_sales_funnel> b2c_flow_abandoned_shopping_cart> b2c_flow_order_follow_upLoading process definitions...> magento_customer_creationLoading process triggers...> magento_customer_creation:createLoad "Title Templates" from annotations and config files to dbCompletedInstalling assets using the hard copy optionInstalling assets for Symfony\Bundle\FrameworkBundle into web/bundles/frameworkInstalling assets for FOS\JsRoutingBundle into web/bundles/fosjsroutingInstalling assets for Nelmio\ApiDocBundle into web/bundles/nelmioapidocInstalling assets for Genemu\Bundle\FormBundle into web/bundles/genemuformInstalling assets for A2lix\TranslationFormBundle into web/bundles/a2lixtranslationformInstalling assets for Oro\Bundle\SecurityBundle into web/bundles/orosecurityInstalling assets for Oro\Bundle\UIBundle into web/bundles/orouiInstalling assets for Oro\Bundle\AttachmentBundle into web/bundles/oroattachmentInstalling assets for Oro\Bundle\EntityBundle into web/bundles/oroentityInstalling assets for Oro\Bundle\EmailBundle into web/bundles/oroemailInstalling assets for Oro\Bundle\UserBundle into web/bundles/orouserInstalling assets for Oro\Bundle\IntegrationBundle into web/bundles/orointegrationInstalling assets for JDare\ClankBundle into web/bundles/jdareclankInstalling assets for JMS\JobQueueBundle into web/bundles/jmsjobqueueInstalling assets for Oro\Bundle\AddressBundle into web/bundles/oroaddressInstalling assets for Oro\Bundle\CalendarBundle into web/bundles/orocalendarInstalling assets for Oro\Bundle\ChartBundle into web/bundles/orochartInstalling assets for Oro\Bundle\ConfigBundle into web/bundles/oroconfigInstalling assets for Oro\Bundle\CronBundle into web/bundles/orocronInstalling assets for Oro\Bundle\DashboardBundle into web/bundles/orodashboardInstalling assets for Oro\Bundle\DataGridBundle into web/bundles/orodatagridInstalling assets for Oro\Bundle\DistributionBundle into web/bundles/orodistributionInstalling assets for Oro\Bundle\EmbeddedFormBundle into web/bundles/oroembeddedformInstalling assets for Oro\Bundle\EntityExtendBundle into web/bundles/oroentityextendInstalling assets for Oro\Bundle\EntityMergeBundle into web/bundles/oroentitymergeInstalling assets for Oro\Bundle\FilterBundle into web/bundles/orofilterInstalling assets for Oro\Bundle\FormBundle into web/bundles/oroformInstalling assets for Oro\Bundle\ImportExportBundle into web/bundles/oroimportexportInstalling assets for Oro\Bundle\LocaleBundle into web/bundles/orolocaleInstalling assets for Oro\Bundle\NoteBundle into web/bundles/oronoteInstalling assets for Oro\Bundle\NotificationBundle into web/bundles/oronotificationInstalling assets for Oro\Bundle\PlatformBundle into web/bundles/oroplatformInstalling assets for Oro\Bundle\QueryDesignerBundle into web/bundles/oroquerydesignerInstalling assets for Oro\Bundle\ReportBundle into web/bundles/ororeportInstalling assets for Oro\Bundle\RequireJSBundle into web/bundles/ororequirejsInstalling assets for Oro\Bundle\SearchBundle into web/bundles/orosearchInstalling assets for Oro\Bundle\SegmentBundle into web/bundles/orosegmentInstalling assets for Oro\Bundle\SidebarBundle into web/bundles/orosidebarInstalling assets for Oro\Bundle\SyncBundle into web/bundles/orosyncInstalling assets for Oro\Bundle\TagBundle into web/bundles/orotagInstalling assets for Oro\Bundle\TranslationBundle into web/bundles/orotranslationInstalling assets for Oro\Bundle\WindowsBundle into web/bundles/orowindowsInstalling assets for Oro\Bundle\WorkflowBundle into web/bundles/oroworkflowInstalling assets for Oro\Bundle\NavigationBundle into web/bundles/oronavigationInstalling assets for OroCRM\Bundle\ContactBundle into web/bundles/orocrmcontactInstalling assets for OroCRM\Bundle\AccountBundle into web/bundles/orocrmaccountInstalling assets for Oro\Bundle\ReminderBundle into web/bundles/ororeminderInstalling assets for Oro\Bundle\TrackingBundle into web/bundles/orotrackingInstalling assets for OroCRM\Bundle\CallBundle into web/bundles/orocrmcallInstalling assets for OroCRM\Bundle\CampaignBundle into web/bundles/orocrmcampaignInstalling assets for OroCRM\Bundle\TaskBundle into web/bundles/orocrmtaskInstalling assets for OroCRM\Bundle\SalesBundle into web/bundles/orocrmsalesInstalling assets for OroCRM\Bundle\MagentoBundle into web/bundles/orocrmmagentoInstalling assets for OroCRM\Bundle\CaseBundle into web/bundles/orocrmcaseDumping all prod assets.Debug mode is off.13:20:50 [file+] /home/vagrant/orocrm/app/../web/js/7946a9a.js13:20:50 [file+] /home/vagrant/orocrm/app/../web/css/oro.cssDumping exposed routes.[file+] web/js/routes.js13:20:55 [file+] oro.locale_data.jsGenerating require.js main configGenerating require.js build configRunning code optimizerCleaning up13:21:27 [file+] /home/vagrant/orocrm/web/js/oro.min.jsWhen I try in dev env (or without passing env parameter) error still here:
123456789101112131415161718192021222324252627$ app/console oro:platform:update --forceProcess migrations...[notice] > Oro\Bundle\EntityExtendBundle\Migration\RefreshExtendCacheMigration[error][Oro\Bundle\EntityConfigBundle\Exception\RuntimeException]A model for "OroCRM\Bundle\SalesBundle\Entity\Lead::test_field" was not foundoro:entity-extend:update-config[RuntimeException]The command terminated with an exit code: 1.oro:migration:load [--force] [--dry-run] [--show-queries] [--bundles[="..."]] [--exclude[="..."]][RuntimeException]The command terminated with an exit code: 1.oro:platform:update [--force] [--timeout[="..."]]Seems I need to clear DB manually…
November 24, 2014 at 2:37 am #33563In oro_entity_config table I see something like this:
123a:10:{s:9:"ownership";a:3:{s:10:"owner_type";s:4:"USER";s:16:"owner_field_name";s:5:"owner";s:17:"owner_column_name";s:13:"user_owner_id";}s:8:"security";a:2:{s:4:"type";s:3:"ACL";s:10:"group_name";s:0:"";}s:6:"entity";a:4:{s:4:"icon";s:10:"icon-phone";s:5:"label";s:30:"orocrm.sales.lead.entity_label";s:12:"plural_label";s:37:"orocrm.sales.lead.entity_plural_label";s:11:"description";s:36:"orocrm.sales.lead.entity_description";}s:4:"form";a:1:{s:9:"form_type";s:24:"orocrm_sales_lead_select";}s:9:"dataaudit";a:1:{s:9:"auditable";b:1;}s:6:"extend";a:9:{s:5:"owner";s:6:"System";s:9:"is_extend";b:1;s:5:"state";s:6:"Active";s:10:"is_deleted";b:0;s:11:"upgradeable";b:1;s:12:"extend_class";s:24:"Extend\Entity\ExtendLead";s:5:"index";a:2:{s:10:"test_field";i:1;s:11:"user_count1";b:1;}s:8:"relation";a:1:{s:101:"manyToOne|OroCRM\Bundle\SalesBundle\Entity\Lead|OroCRM\Bundle\CampaignBundle\Entity\Campaign|campaign";a:5:{s:6:"assign";b:1;s:8:"field_id";C:53:"Oro\Bundle\EntityConfigBundle\Config\Id\FieldConfigId":111:{a:4:{i:0;s:37:"OroCRM\Bundle\SalesBundle\Entity\Lead";i:1;s:6:"extend";i:2;s:8:"campaign";i:3;s:9:"manyToOne";}}s:5:"owner";b:1;s:13:"target_entity";s:44:"OroCRM\Bundle\CampaignBundle\Entity\Campaign";s:15:"target_field_id";b:0;}}s:6:"schema";a:10:{s:5:"class";s:37:"OroCRM\Bundle\SalesBundle\Entity\Lead";s:6:"entity";s:24:"Extend\Entity\ExtendLead";s:4:"type";s:6:"Extend";s:8:"property";a:5:{s:10:"test_field";s:10:"test_field";s:17:"provided_services";s:17:"provided_services";s:11:"user_count1";s:11:"user_count1";s:16:"users_count_text";s:16:"users_count_text";s:18:"extend_source_text";s:18:"extend_source_text";}s:8:"relation";a:3:{s:13:"extend_source";s:13:"extend_source";s:8:"campaign";s:8:"campaign";s:11:"users_count";s:11:"users_count";}s:7:"default";a:2:{s:21:"default_extend_source";s:21:"default_extend_source";s:19:"default_users_count";s:19:"default_users_count";}s:9:"addremove";a:0:{}s:8:"doctrine";a:1:{s:24:"Extend\Entity\ExtendLead";a:2:{s:4:"type";s:16:"mappedSuperclass";s:6:"fields";a:5:{s:10:"test_field";a:6:{s:4:"code";s:10:"test_field";s:4:"type";s:6:"string";s:8:"nullable";b:1;s:6:"length";s:3:"255";s:9:"precision";N;s:5:"scale";N;}s:17:"provided_services";a:6:{s:4:"code";s:17:"provided_services";s:4:"type";s:4:"text";s:8:"nullable";b:1;s:6:"length";N;s:9:"precision";N;s:5:"scale";N;}s:11:"user_count1";a:6:{s:4:"code";s:11:"user_count1";s:4:"type";s:4:"text";s:8:"nullable";b:1;s:6:"length";N;s:9:"precision";N;s:5:"scale";N;}s:16:"users_count_text";a:6:{s:4:"code";s:16:"users_count_text";s:4:"type";s:6:"string";s:8:"nullable";b:1;s:6:"length";s:3:"255";s:9:"precision";N;s:5:"scale";N;}s:18:"extend_source_text";a:6:{s:4:"code";s:18:"extend_source_text";s:4:"type";s:6:"string";s:8:"nullable";b:1;s:6:"length";s:3:"255";s:9:"precision";N;s:5:"scale";N;}}}}s:6:"parent";s:42:"OroCRM\Bundle\SalesBundle\Model\ExtendLead";s:7:"inherit";b:0;}}s:8:"workflow";a:1:{s:17:"show_step_in_grid";b:1;}s:10:"attachment";a:2:{s:7:"enabled";b:0;s:7:"maxsize";i:1;}s:4:"note";a:1:{s:7:"enabled";b:1;}s:8:"activity";a:1:{s:10:"activities";a:1:{i:0;s:35:"Oro\Bundle\EmailBundle\Entity\Email";}}}This is custom format? Is there any way to convert them in readable view?
November 27, 2014 at 10:31 am #33564Thats serialized data, you can restore it here https://www.functions-online.com/unserialize.html
February 11, 2015 at 5:41 am #33565I updated data for table oro_entity_config for Lead (“test_field” excluded):
123a:10:{s:9:"ownership";a:3:{s:10:"owner_type";s:4:"USER";s:16:"owner_field_name";s:5:"owner";s:17:"owner_column_name";s:13:"user_owner_id";}s:8:"security";a:2:{s:4:"type";s:3:"ACL";s:10:"group_name";s:0:"";}s:6:"entity";a:4:{s:4:"icon";s:10:"icon-phone";s:5:"label";s:30:"orocrm.sales.lead.entity_label";s:12:"plural_label";s:37:"orocrm.sales.lead.entity_plural_label";s:11:"description";s:36:"orocrm.sales.lead.entity_description";}s:4:"form";a:1:{s:9:"form_type";s:24:"orocrm_sales_lead_select";}s:9:"dataaudit";a:1:{s:9:"auditable";b:1;}s:6:"extend";a:9:{s:5:"owner";s:6:"System";s:9:"is_extend";b:1;s:5:"state";s:15:"Requires update";s:10:"is_deleted";b:0;s:11:"upgradeable";b:1;s:12:"extend_class";s:24:"Extend\\Entity\\ExtendLead";s:5:"index";a:0:{}s:8:"relation";a:1:{s:101:"manyToOne|OroCRM\\Bundle\\SalesBundle\\Entity\\Lead|OroCRM\\Bundle\\CampaignBundle\\Entity\\Campaign|campaign";a:5:{s:6:"assign";b:1;s:8:"field_id";C:53:"Oro\\Bundle\\EntityConfigBundle\\Config\\Id\\FieldConfigId":111:{a:4:{i:0;s:37:"OroCRM\\Bundle\\SalesBundle\\Entity\\Lead";i:1;s:6:"extend";i:2;s:8:"campaign";i:3;s:9:"manyToOne";}}s:5:"owner";b:1;s:13:"target_entity";s:44:"OroCRM\\Bundle\\CampaignBundle\\Entity\\Campaign";s:15:"target_field_id";b:0;}}s:6:"schema";a:10:{s:5:"class";s:37:"OroCRM\\Bundle\\SalesBundle\\Entity\\Lead";s:6:"entity";s:24:"Extend\\Entity\\ExtendLead";s:4:"type";s:6:"Extend";s:8:"property";a:3:{s:17:"provided_services";s:17:"provided_services";s:16:"users_count_text";s:16:"users_count_text";s:18:"extend_source_text";s:18:"extend_source_text";}s:8:"relation";a:3:{s:13:"extend_source";s:13:"extend_source";s:8:"campaign";s:8:"campaign";s:11:"users_count";s:11:"users_count";}s:7:"default";a:2:{s:21:"default_extend_source";s:21:"default_extend_source";s:19:"default_users_count";s:19:"default_users_count";}s:9:"addremove";a:0:{}s:8:"doctrine";a:1:{s:24:"Extend\\Entity\\ExtendLead";a:2:{s:4:"type";s:16:"mappedSuperclass";s:6:"fields";a:3:{s:17:"provided_services";a:6:{s:4:"code";s:17:"provided_services";s:4:"type";s:4:"text";s:8:"nullable";b:1;s:6:"length";N;s:9:"precision";N;s:5:"scale";N;}s:16:"users_count_text";a:6:{s:4:"code";s:16:"users_count_text";s:4:"type";s:6:"string";s:8:"nullable";b:1;s:6:"length";s:3:"255";s:9:"precision";N;s:5:"scale";N;}s:18:"extend_source_text";a:6:{s:4:"code";s:18:"extend_source_text";s:4:"type";s:6:"string";s:8:"nullable";b:1;s:6:"length";s:3:"255";s:9:"precision";N;s:5:"scale";N;}}}}s:6:"parent";s:42:"OroCRM\\Bundle\\SalesBundle\\Model\\ExtendLead";s:7:"inherit";b:0;}}s:8:"workflow";a:1:{s:17:"show_step_in_grid";b:1;}s:10:"attachment";a:2:{s:7:"enabled";b:0;s:7:"maxsize";i:1;}s:4:"note";a:1:{s:7:"enabled";b:1;}s:8:"activity";a:1:{s:10:"activities";a:1:{i:0;s:35:"Oro\\Bundle\\EmailBundle\\Entity\\Email";}}}But after this after performing:
1app/console --env=dev oro:entity-extend:update-config -vvvI have this error:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546Prepare entity config[ReflectionException]Property Oro\Bundle\NoteBundle\Entity\Note::$contact_6d50e87e does not existException trace:() at /var/www/orocrm-test2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php:82ReflectionProperty->__construct() at /var/www/orocrm-test2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php:82Doctrine\Common\Persistence\Mapping\RuntimeReflectionService->getAccessibleProperty() at /var/www/orocrm-test2/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php:899Doctrine\ORM\Mapping\ClassMetadataInfo->wakeupReflection() at /var/www/orocrm-test2/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:537Doctrine\ORM\Mapping\ClassMetadataFactory->wakeupReflection() at /var/www/orocrm-test2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:329Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->loadMetadata() at /var/www/orocrm-test2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:211Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->getMetadataFor() at /var/www/orocrm-test2/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:114Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->getAllMetadata() at /var/www/orocrm-test2/vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/DoctrineBundle.php:83Doctrine\Bundle\DoctrineBundle\DoctrineBundle->Doctrine\Bundle\DoctrineBundle\{closure}() at n/a:n/aspl_autoload_call() at n/a:n/aunserialize() at /var/www/orocrm-test2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ArrayType.php:58Doctrine\DBAL\Types\ArrayType->convertToPHPValue() at /var/www/orocrm-test2/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php:330Doctrine\ORM\Internal\Hydration\AbstractHydrator->gatherRowData() at /var/www/orocrm-test2/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php:365Doctrine\ORM\Internal\Hydration\ObjectHydrator->hydrateRowData() at /var/www/orocrm-test2/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php:179Doctrine\ORM\Internal\Hydration\ObjectHydrator->hydrateAllData() at /var/www/orocrm-test2/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php:140Doctrine\ORM\Internal\Hydration\AbstractHydrator->hydrateAll() at /var/www/orocrm-test2/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:997Doctrine\ORM\Persisters\BasicEntityPersister->loadCollectionFromStatement() at /var/www/orocrm-test2/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:1737Doctrine\ORM\Persisters\BasicEntityPersister->loadOneToManyCollection() at /var/www/orocrm-test2/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:2791Doctrine\ORM\UnitOfWork->loadCollection() at /var/www/orocrm-test2/vendor/doctrine/orm/lib/Doctrine/ORM/PersistentCollection.php:236Doctrine\ORM\PersistentCollection->initialize() at /var/www/orocrm-test2/vendor/doctrine/orm/lib/Doctrine/ORM/PersistentCollection.php:612Doctrine\ORM\PersistentCollection->getIterator() at /var/www/orocrm-test2/vendor/oro/platform/src/Oro/Bundle/EntityConfigBundle/Config/ConfigModelManager.php:423Oro\Bundle\EntityConfigBundle\Config\ConfigModelManager->ensureFieldLocalCacheWarmed() at /var/www/orocrm-test2/vendor/oro/platform/src/Oro/Bundle/EntityConfigBundle/Config/ConfigModelManager.php:311Oro\Bundle\EntityConfigBundle\Config\ConfigModelManager->getModels() at /var/www/orocrm-test2/vendor/oro/platform/src/Oro/Bundle/EntityConfigBundle/Config/ConfigManager.php:305Oro\Bundle\EntityConfigBundle\Config\ConfigManager->getIds() at /var/www/orocrm-test2/vendor/oro/platform/src/Oro/Bundle/EntityConfigBundle/Provider/ConfigProvider.php:161Oro\Bundle\EntityConfigBundle\Provider\ConfigProvider->getIds() at /var/www/orocrm-test2/vendor/oro/platform/src/Oro/Bundle/EntityConfigBundle/Provider/ConfigProvider.php:177Oro\Bundle\EntityConfigBundle\Provider\ConfigProvider->getConfigs() at /var/www/orocrm-test2/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/Tools/DumperExtensions/IndexEntityConfigDumperExtension.php:66Oro\Bundle\EntityExtendBundle\Tools\DumperExtensions\IndexEntityConfigDumperExtension->updateIndices() at /var/www/orocrm-test2/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/Tools/DumperExtensions/IndexEntityConfigDumperExtension.php:45Oro\Bundle\EntityExtendBundle\Tools\DumperExtensions\IndexEntityConfigDumperExtension->preUpdate() at /var/www/orocrm-test2/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/Tools/ExtendConfigDumper.php:92Oro\Bundle\EntityExtendBundle\Tools\ExtendConfigDumper->updateConfig() at /var/www/orocrm-test2/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/Command/UpdateConfigCommand.php:34Oro\Bundle\EntityExtendBundle\Command\UpdateConfigCommand->execute() at /var/www/orocrm-test2/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:244Symfony\Component\Console\Command\Command->run() at /var/www/orocrm-test2/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:904Symfony\Component\Console\Application->doRunCommand() at /var/www/orocrm-test2/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:191Symfony\Component\Console\Application->doRun() at /var/www/orocrm-test2/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:96Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/orocrm-test2/vendor/jms/job-queue-bundle/JMS/JobQueueBundle/Console/Application.php:44JMS\JobQueueBundle\Console\Application->doRun() at /var/www/orocrm-test2/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:121Symfony\Component\Console\Application->run() at /var/www/orocrm-test2/app/console:23oro:entity-extend:update-configIt seems that everything has broken. Is there any way to clean up entity configs?
February 16, 2015 at 2:44 am #33566Anybody 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.
June 4, 2015 at 2:57 am #33567Hi.
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.
- AuthorReplies
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.