Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Getting a notice "Undefined property: stdClass::$group_content_access" when saving a user account after adding a photo.
This may be related to having moved the user photo field to the profile using the user_picture_field module.
Issue solved by just adding a test if the $entity->group_content_access element exists (line 241 in commons_media.module)
if (isset($entity->group_content_access[LANGUAGE_NONE][0]['value']) AND $entity->group_content_access[LANGUAGE_NONE][0]['value'] == 2) {
Comments
Comment #1
Devin Carlson CreditAttribution: Devin Carlson commentedThanks for the suggestion!
Tested and committed to Commons 7.x-3.x.