Getting "EntityMetadataWrapperException: Unknown data property" error when I delete a users custom field

by David Pugh   Last Updated October 18, 2019 21:07 PM - source

I have added extra fields to the user object. One of the fields I have added was a Skype text field to hold the user's Skype contact information. The field had a machine name: field_contact_information_skype Recently we decided to get rid of this field. After deleting it through the admin UI ( admin/config/people/accounts/fields ) I was no longer able to save a user after editing. If I did so I would get an error:

EntityMetadataWrapperException: Unknown data property field_contact_information_skype. in EntityStructureWrapper->getPropertyInfo() (line 354 of /home/master/public_html/sites/all/modules/entity/includes/

If I go back and add a new text field to the user object and the text field I am adding has the same machine name then I can edit and save a user object (through the Drupal user edit page) without this error happening.

Should I be able to add fields to the user object and delete those fields without unexpected results like this? Does anyone know how I can fix this so I can get rid of that Skype field?


Tags : 7 entities users

Related Questions

hook_entity_base_field_info() vs. creating a new entity

Updated December 14, 2017 23:07 PM