0

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/entity.wrapper.inc).

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?

Thanks!!!

  • I think you call entity_metadata_wrapper somewhere in your code like $wrapper = entity_metadata_wrapper('user', $user); so first search in your codebase for field_contact_information_skype – berramou Oct 18 at 21:42
  • it maybe like $wrapper->field_contact_information_skype – berramou Oct 18 at 21:53
  • Hi berramou, thanks for responding. This is just a field that I have added to my user object at some point in the past and I no longer need it. I don't reference the fields anywhere in any code of mine, and if I delete the field then it causes this error. – David Pugh Oct 22 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.