To reproduce:

  1. Deselect all the workflow options for a particular content type via the admin->settings->content types page
  2. Edit a node of said content type

In the Publishing Options section of the node edit form the 'Create new revision' option will be checked (despite being unchecked in step 1).

It seems to relate to the following line in the node_form_array() function in node.module: $node->revision = in_array('revision', $node_options);. When no options are selected for a content type, $node_options is an array = (0=>0). The in_array('revision', $node_options) function call will always returns TRUE.

The attached patch adds a condition to the 'else': elseif ($node_options !== array(0)) {.

This may be related to the fix for #17158.

CommentFileSizeAuthor
#1 node_options_in_array.txt581 bytesmleicester

Comments

mleicester’s picture

StatusFileSize
new581 bytes

Patch added

tones’s picture

Status: Active » Closed (fixed)