Module Description
Required On Publish will let you save any node in unpublished state even if there are some required fields left unfilled. Those required fields will act only when node is saved in published state, i.e. if some required fields are still left empty while publishing the node then it will not allow until all the required fields are non-empty.
Project Page:
https://www.drupal.org/sandbox/abhishek_pareek/2549931
Git Clone:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/abhishek_pareek/2549931.git required_on_publish
cd required_on_publish
PAReview:
http://pareview.sh/pareview/httpgitdrupalorgsandboxabhishekpareek2549931git
Manual reviews of other project:
1. https://www.drupal.org/node/2676036#comment-10906678
2. https://www.drupal.org/node/2677542#comment-10905490
3. https://www.drupal.org/node/2678258#comment-10909880
Comments
Comment #2
PA robot commentedFixed the git clone URL in the issue summary for non-maintainer users.
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
pankajsachdeva commentedAutomated Review
No issues found.
Manual Review
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Comment #4
pankajsachdeva commentedComment #5
jitujain commentedNodes on the "admin/config/content/list_required" this page are visible after filling the all required fields. This page shows all the unpublished nodes, you have to show only those nodes which are unpublished and have the required field.
If there is no records to show in table then display a message instead showing header of table.
install file should be there.
Comment #6
jitujain commentedComment #7
abhishek.pareek commentedFixed all the issues stated above.
Comment #8
basant commentedI ran automated review on your code and got following error :
PHP Fatal error: Can't use function return value in write context in ./required_on_publish.module on line 148
Errors parsing ./required_on_publish.module
Comment #9
ziomizar commentedHi abhishek.pareek,
On line 136 and 95 and for all the other strings you should use t() function.
Comment #10
abhishek.pareek commentedHi basant, well i corrected that one. Thanks for that !
Thanks ziomizar, I wrapped those strings in t() function.
Comment #11
abhishek.pareek commentedComment #12
saraswathi ravikumar commentedHi abhishek.pareek,
Please use t() function for the return statements. Refer to line number 187.
EX : return t('You are not allowed to access this page.');
Comment #13
abhishek.pareek commentedHey sarah ravikumar,
I applied t() upon that string, thanks for pointing out that.
Is there anything else in this module, which you would like to suggest me ?
Comment #14
perennial.sky commentedHi Abhishek
I tried your module, and I impressed with this
I would point out some issue that I found in your module
1. When I tick Required validation only when publishing setting, It mean field is required but I can't see any required star mark on that field, Add that so that user can understand that which field is required
2. In module line number 172, use t() function
3. Please change module package name in info file
4. There is menu named admin/config/content/list_required it shows list of empty field, I think it should come under report page not in configuration
5. You created the menu but you define its callback in the module file itself it must be required to write any menu callback in a different file.
6. You are using prefix and suffix instead of that you can use container type form element,
7. use annotation instead of using variable directly in l() function
Comment #15
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #16
abhishek.pareek commentedHi Akash,
Thanks for reviewing my code :)
That is done.
Well I removed the pakage from info file, that will put my module in others category, that is fine.
Well Yes, that was not appropriate earlier, so I changed it to 'admin/reports/list_required' I guess that is fine now.
Well I don't have many fields and so I don't want them in a container field, but I needed form inside a div tag so I used prefix and suffix
OK, so I put title in t() and used annotation for title variable.
Now comes the most important point
Well that is a tricky part and I am not able to solve it :) Well it can be possible through overriding theme function, so I will leave that for end user if they really want that asterisk, by the way that asterisk is not really required in my case as I am allowing user to save node in unpublished state without caring about required. So that is actually an ambiguous state. But if someone comes up with a good solution of it, then I would love to provide that asterisk as an optional part.
Comment #17
abhishek.pareek commentedComment #18
PA robot commentedProject 1: https://www.drupal.org/node/2751523
Project 2: https://www.drupal.org/node/2687537
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #19
abhishek.pareek commentedThis is not a duplicate application, although those manual reviews were, so I have changed those manual reviews in another application of mine.
Comment #20
abhishek.pareek commentedComment #21
PA robot commentedProject 1: https://www.drupal.org/node/2687537
Project 2: https://www.drupal.org/node/2751523
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #22
abhishek.pareek commentedComment #23
PA robot commentedProject 1: https://www.drupal.org/node/2751523
Project 2: https://www.drupal.org/node/2687537
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #24
avpaderno