Needs review
Project:
Required for Publishing
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Jul 2011 at 03:45 UTC
Updated:
21 Nov 2013 at 22:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gloomcheng commentedThere is my first try to port module to Drupal 7, but I'm newbie for module development so that couldn't fix some errors after rewrite this module. The error message was "Fatal error: Call to undefined function _content_widget_types()".
Does someone know how to fix this error? How could I get field widget type on Drupal 7?
Sorry for my poor English writing, you could ask me to description detail for this issue if you didn't know what I saying. And I really need your help, please.
Comment #2
gloomcheng commentedDears,
I've rewrite the basic function of Required for Publishing module as attachment file for 5 hours effort.
Now you could set fields as required for publishing at each field settings page after enabled this module on Drupal 7.
This version really very initial and lack of full functionality, it still have some bugs need to report/fix.
There is an issue for this version that Undefined Index alert message, like:
1. Notice: Undefined index: #node_edit_form in required_for_pub_element_process() (line 97 of public_html/sites/all/modules/custom/required_for_pub/required_for_pub.module) shown on field settings page like admin/structure/types/manage/[node-type]/fields/[field_name]
2. Notice: Undefined index: log in required_for_pub_element_process() (line 97 of public_html/sites/all/modules/custom/required_for_pub/required_for_pub.module) shown on node edit page like node/[nid]/edit or node/add/[node-type]
I guess this problem cause by hook_element_info() below, the question is how could I pass fields only need process required_for_pub_element_process function instead of pass all fields?
Comment #3
gloomcheng commentedDears,
I've fixed the "Undefined index" error from previous comment as attachment files.
This version of module could only be used in specific scenario that:
1. Enabled Save & Edit Module, and hidden default Save button, rename Publish button to 'Submit'.
2. Fields enabled required for publishing option will validate when click 'Submit' button, and only validated when you submit node.
3. Validation mechanism only effect on field type is textfield or textarea.
If you test this module and find some bugs, please file a issues here let me know, appreciate your kindly help.
Comment #4
eaton commentedAny updated status on this one?
It looks like there hasn't been much work on the project since the D6 days, this would be a real boost for D7 sites as well.
Comment #5
xbrianx commentedIs there anything like this for D7 this seems like such a great advantage for creating nodes with many fields.
Comment #6
dooug commentedAn alternative possible solution for this in D7 is the Save Draft module with the patch: #1786442: Allow saving drafts with missing required fields. That will allow to save an unpublished node without filling in all required fields. Though it is all or nothing for required fields.
Comment #7
mrf commentedHere is #3 in patch format for your reviewing pleasure.
Comment #8
mrf commentedWe've been putting quite a bit of work into the D7 port.
https://github.com/chapter-three/require-to-publish
Pull request welcome!
Comment #9
Dentorat commentedI downloaded #8 from github and I can't seem to modify the node after it's been published, I'm looking through it right now, but nothing so far