0

Just upgraded to Drupal 7.54 and now when a user account is saved, any other users (other than admin 1 user) are unable to view or update the custom fields associated with the user account. They just see the core fields. The admin 1 user is still able to see all fields.

When the updated user account is viewed or edited by any other user than the admin 1 user (they do have 'administrator' role assigned), they only see the following fields:-

  • email
  • password
  • status
  • roles
  • locality

I have disabled modules that act on fields, such as Field Permissions and Conditional Fields, but still getting this behaviour.

Any ideas why this could be happening would be much appreciated!

  • This looks like a permissions thing. Do you have custom modules installed? You could try to add some debug code where the field access hook is triggered to see which module might deny access. It is in the field_access function: api.drupal.org/api/drupal/modules%21field%21field.module/… – schlicki Feb 16 '17 at 6:03
  • Add a "debug($module);" after "if ($access === false) {". – schlicki Feb 16 '17 at 6:10
  • Thanks @schlicki that showed up the og_field_access module name. great tip for quick debugging! (I was waiting on the infrastructure guys to enable x-debug but this got to the bottom of things way quicker :) – Darren Feb 16 '17 at 17:22
  • strange how this happens just after saving a user account, but not immediately when the module is enabled. – Darren Feb 16 '17 at 17:23
  • glad to help ;) – schlicki Feb 17 '17 at 6:08
0

Turns out a developer had enabled the "og_field_access" module and this was preventing users from viewing custom fields on the user account pages.

We removed the module dependencies (they weren't needed!) and disabled the og_field_access module and the fields now appear again!

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.