Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
node system
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
11 Jul 2008 at 15:31 UTC
Updated:
2 Jan 2014 at 23:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dropcube commentedThe attached patch adds per content type node preview settings. It contains the required modifications and adds an update function to set node preview setting per content type using the previous site-wide setting.
Comment #2
catchIt seems like an oversight to me that this was never moved to the admin/build/types/$type forms in the first place. It'd also be a first step towards getting rid of the somewhat confusing 'post settings' menu option.
Patch looks fine visually, will test later on.
Comment #3
dropcube commentedUpdated patch against HEAD.
Comment #4
swentel commentedPatch applies fine and works as intented.
Comment #5
kscheirerworks for me, patch applied cleanly.
Comment #6
catchSet preview to required, ran the update, changed the settings also worked fine for me. After this goes in, we could try to remove the 'post settings' page entirely!
Comment #7
swentel commented@catch posted a follow up for this topic on http://drupal.org/node/295570
Hope this gets in soon!
Comment #8
dries commentedRather than using a variable, shouldn't this be stored in the node_type table? Other settings like 'min_word_count' are also stored in that table.
Comment #9
swentel commentedHmm, we're not very consistent on that part. Published by default and promoted to frontpage are variables, min_word_count not (which only affects the body). Maybe we should move this all to a separate serialized field in the node_type table? Takes more work me thinks, I might slap myself if you say yes now :)
Comment #10
pasqualleconsistency: we can't dynamically add/remove columns in {node_type} table when we need, so some settings have to be stored in {variable} table. Storing them in one column as a serialized field would make the code complicated.
logic for storing node type settings:
settings added by hook -> {variable}
grouped settings extensible by a hook -> {variable}
otherwise -> new column in {node_type}
node_preview should go to {node_type} table..
Comment #11
gábor hojtsyMoving the published by default and promoted settings to the node_type table also sounds like a good idea. These composite name variables are confusing to say the least anyway. Let's make this issue adding the new setting to the node_type table and open a new issue on moving the existing core variables there. The contrib extensions could still use variables.
Comment #12
gábor hojtsyAlso, this original site-wide setting is there, but code was not enforcing it in 6.x, and 7.x suffers from the same problem, so it might be a good idea to commit http://drupal.org/node/254242#comment-1015237 in the meantime, while this patch is in limbo.
Comment #13
sun+1
Comment #14
sunApparently, the preview setting was already moved to a per-node type setting, supporting the three states disabled, optional, and required. So this issue was resolved elsewhere.
The migration from variables to a node_type settings column should be tackled in a separate issue (which might already exist as well).