Problem/Motivation

When user tables are truncated, then entities with owner (i.e. "node") still have a user ID value, but references to not existing user. It causes some errors or failures in Drupal.

Steps to reproduce

- Create a user
- Create a node and set owner to recently created user
- Truncate all user tables
- Create a new user to log in
- Go to edit the created node - it throws an error

Proposed resolution

Have a fallback to set owners to 0 (anonymous user) when there is no ability to load an author.

Issue fork domino-3338569

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Spleshka created an issue. See original summary.

spleshka’s picture

Status: Active » Needs review

  • Spleshka committed 0e55aa65 on 3.x
    Issue #3338569 by Spleshka: Ensure all entities with an owner gracefully...

Spleshka credited iamdroid.

spleshka’s picture

spleshka’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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