Author or Acting User read Anonymous

Created on 18 August 2025, about 2 months ago

Problem/Motivation

All content is managed by authenticated users but author and acting user sometimes come up as "Anonymous (not verified)"

πŸ› Bug report
Status

Active

Version

1.2

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States kappaluppa

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

Comments & Activities

  • Issue created by @kappaluppa
  • πŸ‡ΊπŸ‡ΈUnited States kappaluppa
  • πŸ‡ΊπŸ‡ΈUnited States maskedjellybean Portland, OR

    This probably has to do with this part of entity_delete_log.module:

    // If there is an entity user id, we'll use that as the author, otherwise
        // we'll just use user #1. We don't want to use the deleted user's entity id
        // as the author, since they will lo longer exist, so we'll just use #1.
        $variables['author'] = 1;
        if (isset($entity->uid) && $type != 'user') {
          $user = $entity->uid->entity;
          if ($user instanceof User) {
            $variables['author'] = $entity->uid->entity->id();
          }
        }
    

    $entity->uid is a protected property if it exists at all. Therefore the if statement fails and the author is never assigned.

Production build 0.71.5 2024