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.
Error: Call to a member function id() on null in social_core_preprocess_block() (line 203 of profiles/contrib/social/modules/social_features/social_core/social_core.module).
I am getting this error when open some user profiles using non admin account (student_01). I guess it is a permission issue because this work well for admin.
Comments
Comment #2
DeBeukeleerM CreditAttribution: DeBeukeleerM as a volunteer commentedI have a similar error:
Fatal error: Call to a member function getEntity() on null in C:\wamp\www\democratie\profiles\contrib\social\profiles\social\themes\socialbase\includes\block.inc on line 169
It occurs while I will login on my local site
Comment #3
jochemvn CreditAttribution: jochemvn for Open Social commentedComment #4
frankgraave CreditAttribution: frankgraave for Open Social commentedHi Chi,
If I understand this correctly you meant that when u logged in as any demo user, you are not able to go to
/user/11/stream
? (this is the account id of student_01). I have tested this scenario on the version you reported in this bug report and on the current version of Open Social (RC3). I was not able to reproduce this bug.If I misunderstood your bug report then please clarify how to reproduce this so I can test this, thanks!
Comment #5
frankgraave CreditAttribution: frankgraave for Open Social commentedComment #6
frankgraave CreditAttribution: frankgraave for Open Social commentedHi Chi,
I did find something. There are certain demo users with a 'blocked' status by default. However, these users show up in the
/all-members
page where one might click on the blocked user. Since the logged in user (not admin) does not have permission to view this account, the error you provide will be thrown. I will look into this, thanks!Comment #7
jochemvn CreditAttribution: jochemvn for Open Social commentedHi,
This issue has been fixed in: https://patch-diff.githubusercontent.com/raw/goalgorilla/open_social/pul.... It will be included in the RC4.
Jochem
Comment #8
jochemvn CreditAttribution: jochemvn for Open Social commentedComment #9
frankgraave CreditAttribution: frankgraave for Open Social commentedWorks like a charm, this will be part of RC4!
Frank
Comment #11
jaapjan CreditAttribution: jaapjan at Open Social commented