Error saving non revisionable content entities

Created on 27 April 2023, about 1 year ago

Problem/Motivation

A database exception is thrown when saving a content entity that isn't revisionable. I came across this issue while using the Config Pages module. This module checks if an entity type is revisionable by checking if its class is an instance of RevisionableInterface. RevisionableInterface is inherited through ContentEntityInterface regardless of if the entity type is revisionable.

Steps to reproduce

  • Add a Layout Paragraphs field to a non-revisionable content entity.
  • Create and attempt to save.

Proposed resolution

Use the isRevisionable() method of the entity type definition to check if the entity type is revisionable.

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States davisben NH

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

Comments & Activities

Production build 0.69.0 2024