Wrong entity load inside Context vote_activity_context and on function social_like_tokens()

Created on 18 February 2025, about 2 months ago

Problem/Motivation

The Message template create_like_node_or_post ("A person likes a topic, comment or event created by me") does not save the Activities correctly. This is due to some code mistakes when loading the vote parent entity. In fact, the parent Entity that the Vote is attached to will be always null.

Steps to reproduce

- Install a fresh Open Social instance (version 12.4.0).
- Enable module "social_like" (if not enabled)
- Create a new Topic with User A
- As User A create a new public Event on the site
- Create a new User B
- As User B go to the fresh node (Event) created by User A
- This should create a new Activity due to the message template "create_like_node_or_post"

Proposed resolution

Fix code with a patch.

Remaining tasks

- Is this a duplicate of another issue?
- We should check if we need to fix this in more places.

🐛 Bug report
Status

Needs review

Version

12.4

Component

Code (back-end)

Created by

🇬🇷Greece TheodorosPloumis Greece

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024