Problem/Motivation

The current logic in Panelizer to control whether a node revision should be created is incorrect and does not match what is available in core.

In Drupal 7, the content type settings regarding revisions control whether a revision is created by default, even when this option is disabled the revision options are still present, it just isn't set "on" by default.

In Panelizer it only shows the "new revision" fields when the content type is set to create a new revision by default.

Proposed resolution

Modify PanelizerEntityNode->entity_allows_revisions() so that it always returns TRUE for the first $retval value. Also extend PanelizerEntityDefault->entity_allows_revisions() to add a third option to control the default state of the "new

API changes

A third item will be added to PanelizerEntityDefault->entity_allows_revisions(), controlling whether a new revision will be created by default, primarily for use in PanelizerEntityNode->entity_allows_revisions().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

DamienMcKenna’s picture

Status: Active » Needs review
FileSize
0 bytes

This seems to work nicely.

DamienMcKenna’s picture

Status: Needs review » Needs work

ARGH! I never realized the patch was empty and have since reverted the changes. Dangit! Dangit! Dangit!

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
3.06 KB

Ok, I think this has all of the same functionality again, thankfully I documented in the issue description what changes I was going to make =)

  • Commit e68d003 on 7.x-3.x by DamienMcKenna:
    Issue #2223479 by DamienMcKenna: Expanded entity_allows_revisions() to...
DamienMcKenna’s picture

Status: Needs review » Fixed

This is good to go.

Status: Fixed » Closed (fixed)

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