Error blocked the "Activity Creator" cron job

Created on 28 March 2023, over 1 year ago
Updated 28 April 2023, about 1 year ago

Problem/Motivation

If try to execute the function _social_group_get_current_group($node) in out-of-page context we get an error:

WARNING  Undefined array key "node" in profiles/contrib/social/modules/social_features/social_group/src/SocialGroupHelperService.php on line 128

This issue can be reproduced in a lot of places related to activity creation (and may block Activity Creator cron job).

Steps to reproduce

  1. Install profile with demo content
  2. Execute the command in terminal:
    drush php:eval '$node = \Drupal::entityTypeManager()->getStorage("node")->load(10); _social_group_get_current_group($node);'

Proposed resolution

Fix syntax error.

Remaining tasks

n/a

User interface changes

n/a

API changes

n/a

Data model changes

n/a

πŸ› Bug report
Status

Fixed

Version

11.8

Component

Code (back-end)

Created by

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

Comments & Activities

Production build 0.69.0 2024