In some cases group owners have errors on the website after the update to 4.4. This is due to a 500 error:

Error: Call to a member function getEntityTypeId() on boolean in template_preprocess_activity() (line 61 of /app/html/profiles/contrib/social/modules/custom/activity_creator/activity.page.inc) #0

This is due to code introduced in issue #3026071 which changes the actor for activities. It doesn't check if the entity is a boolean which can be the case if there are no referenced entities found.

Comments

jaapjan created an issue. See original summary.

jaapjan’s picture

Priority: Major » Normal
Status: Active » Needs review

PR:
https://github.com/goalgorilla/open_social/pull/1228

Marking as normal as it does seem to impact only platforms which somehow already contain invalid activity data.

jochemvn’s picture

Status: Needs review » Reviewed & tested by the community

Can confirm this fixes the issue

jaapjan’s picture

Status: Reviewed & tested by the community » Fixed
chlodewig’s picture

I have the same error at a working installation.
Only one user out of 150 get this error:

Error: Call to a member function getEntityTypeId() on boolean in template_preprocess_activity() (Zeile 61...

How did you solve this problem? I cleared every cache and deleted the activities from this user in the database.
What else can I do to find the invalid activity data?

chlodewig’s picture

Status: Fixed » Active
chlodewig’s picture

Additional info: I'm working with the newest Open Social version: 4.5

jaapjan’s picture

Status: Active » Fixed

Hi chlodewig, not sure if you did it already, but you could apply the patch in this issue. That should solve it. The fix will be in 4.6.

chlodewig’s picture

OK. Now I got it. Every thing is fine. Thank you.

bramtenhove’s picture

We received this error for a client website. I traced it back to a content item posted in to a group and being moved out of the group.

This fix suppresses the error message, but users will see a notification in their stream or notification centre like: User X created [social_group:created_entity_link_html] in the [message:gtitle] group.

I was under the impression that we remove activities when we move content out of a group, this might be in fact the reason this fix was needed. Would be good to do a follow up check in that part of the code.

ronaldtebrake’s picture

  • 1f9f4a6 committed on 8.x-4.x
    Issue #3034318 by jaapjan, jochemvn: prevent Notifications 500 errors...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.