Create new revision checkbox showing 2 times

Created on 1 November 2023, about 1 year ago

Problem/Motivation

When selecting to show the revision checkbox you will both the entity default revision checkbox and the one provided by storage module.

Steps to reproduce

Drupal Version
10.1.5

Web Server
nginx/1.24.0

PHP
Version
8.1.22 (more information)

Enable Expose revision checkbox and Expose revision log

Proposed resolution

Merge the available revision checkbox with functionality provided by storage.

    // Only expose the log field if so configured.
    if (!$bundle->shouldShowRevisionLog()) {
      $form['revision_log']['#access'] = FALSE;
    }

    if ($bundle->shouldShowRevisionToggle()) {
      if (!$this->entity->isNew()) {
        $form['revision']['#default_value'] = $revision_default;
      }
    }
    else {
      $form['revision_information']['#access'] = FALSE;
      $form['revision']['#access'] = FALSE;
      $form['new_revision'] = [
        '#type' => 'value',
        '#value' => $revision_default,
      ];
    }

๐Ÿ› Bug report
Status

Needs review

Version

1.3

Component

Code

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom lexsoft London

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

Comments & Activities

Production build 0.71.5 2024