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().
Comment | File | Size | Author |
---|---|---|---|
#4 | panelizer-n2223479-4.patch | 3.06 KB | DamienMcKenna |
Comments
Comment #1
DamienMcKennaThis is related to #2055275: Option to create revision for entity when display is modified.
Comment #2
DamienMcKennaThis seems to work nicely.
Comment #3
DamienMcKennaARGH! I never realized the patch was empty and have since reverted the changes. Dangit! Dangit! Dangit!
Comment #4
DamienMcKennaOk, I think this has all of the same functionality again, thankfully I documented in the issue description what changes I was going to make =)
Comment #6
DamienMcKennaThis is good to go.