Not when the form is generated. Bad ezra-g ;).

Comments

pierrepaul’s picture

Assigned: Unassigned » pierrepaul
Status: Active » Needs review
StatusFileSize
new1.14 KB

You already did a check if the node was published, but you did it in the form_state (I guess you were tired :P). Here I removed the $node->status in the form_alter. I'm not 100% sure it's the best idea to check for the state of the status in the form_state.

I know _validate checked if it was a good value, but let's say someone is using to hook_insert() to play around the status variable, we would still output the message.

I could use the hook_insert myself, but I feel like it doesn't belong there and it's overkill. What do you think?

ezra-g’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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