Closed (duplicate)
Project:
Save Draft
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2013 at 00:07 UTC
Updated:
28 Nov 2013 at 00:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pooyajavan commentedHere's the patch.
Comment #2
rooby commentedNew features go against the 6.x-dev version.
Is this marked as closed (fixed) for a reason? I assume it should be needs review.
At first glance I see a few problems:
1.
This is bad because it skips more validation than just the required validation.
It also skips the maxlength check and whether or not illegal choices have been entered for options fields. Both of these things could result in problems.
I recommend using the solution from the D7 patch in #1786442-14: Allow saving drafts with missing required fields - Set the #required attribute to FALSE.
2.
It disables validation all the time, instead of adding a setting that admins can configure (point 3 continues on from this).
3.
This should not be part of this patch (also it doesn't do anything with the save_as_draft settings anywhere else so the setting does not do anything currently.
This patch should have the skip validation functionality and an option on the node settings form for "Skip required validation" (as per the patch in #1786442-14: Allow saving drafts with missing required fields for drupal 7.
The part you have actually is a part of a different issue, see #1409000-8: Provide an option to enable "save draft" feature per content type and also the add-on to that #1409000-12: Provide an option to enable "save draft" feature per content type.
So you will also need a drupal 6 patch for #1409000: Provide an option to enable "save draft" feature per content type that combines the patches in comments #8 and #12 of that issue as well replacing the save_as_draft option from this patch with the save_draft_skip_required option (along with a check like
if (variable_get('save_draft_skip_required_' . $form['#node']->type, FALSE)) {in your hook_form_alter() as per the patch in #1786442-14: Allow saving drafts with missing required fieldsReally, you just need drupal 6 versions of the patches in #1786442-14: Allow saving drafts with missing required fields and #1409000-8: Provide an option to enable "save draft" feature per content type + #1409000-12: Provide an option to enable "save draft" feature per content type that are as identical to the drupal 7 versions as possible aside from whatever differences there are from drupal 6 to 7.
There is also no reason you couldn't put them in the existing drupal 7 issues because they are addressing the same issue in both versions and they should just be direct backports of those patches to keep consistency between versions.
Comment #2.0
rooby commentedGrammatical errors
Comment #3
rooby commentedMarking as duplicate of #1786442: Allow saving drafts with missing required fields as that issue is now to port the drupal 7 solution to drupl 6.