EntityMetadataWrapperException: Unknown data property

Created on 17 October 2016, about 8 years ago
Updated 13 June 2023, over 1 year ago

I enabled entity translation and related modules using drush (site already has lot of content).

drush en -y entity_translation admin_language pathauto_i18n title languageicons entity_translation_i18n_menu i18n_block i18n_field

Then i enabled the feature with translated content type. After that i get the following error when i navigate to /admin/structure/types/manage/article.

EntityMetadataWrapperException: Unknown data property commerce_line_items. in EntityStructureWrapper->getPropertyInfo() (line 335 of /drupal_root/sites/all/modules/entity/includes/entity.wrapper.inc)

When i check the status page(/admin/reports/status) i have the following waning in tokens section

$info['types']['node']
$info['types']['term']
$info['types']['vocabulary']
$info['types']['file']
$info['types']['user']
$info['types']['current-user']

Also, the fields in Search API index (/admin/config/search/search_api/index/solr_index_test/fields) dont include node title, body etc.

Is there any way to reinitialize the entity definitions ( like a drush command) since entity metadata seems to be corrupted somehow?

I solved the same error in another instance by running update.php(i had Panels update pending). There is no pending database updates in the current situation.

Any help appreciated.

💬 Support request
Status

Fixed

Version

1.0

Component

Entity property wrapper

Created by

🇮🇳India zuhair_ak Dubai

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇬🇧United Kingdom newaytech

    Arrived here after getting: EntityMetadataWrapperException: Unknown data property commerce_line_items. in EntityStructureWrapper->getPropertyInfo() (line 360 of /etc/apache2/htdocs/drupal-7/sites/all/modules/contrib/entity/includes/entity.wrapper.inc).

    Ran the commerce repair module but to no avail.

    Patch @ #6 fixed for me - thanks folks!

Production build 0.71.5 2024