Version: Drupal 7.x
Description
Module provide option to update comment configuration for existing nodes(if any exist).
When configuration for any content type updated for comments, its applicable only for future nodes.
There is no option which can take care and confirm that latest comments configuration set to existing/old nodes.
This module provide option on content type edit form, under comment section, where Administrator can run batch to apply new comment configuration for existing nodes if required.
How to use
- Logged in as "Administrator" OR user account who is having access to edit/update content type configuration.
- Travel to "Structure » Content Types » Any content type EDIT page.
- Inside vertical tab "Comment settings" look for checkbox option with title "Update comment configuration for existing nodes".
Project page: Comment Bulk action
GIT Access: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/tusharbodke/2551319.git comment_bulk_action
Reviews of other project applications done by me
PasswordResetTabs
| Comment | File | Size | Author |
|---|---|---|---|
| #32 | comment_bulk_action-coding_standard_and_help_comments-2554401-32.patch | 2.84 KB | makbul_khan8 |
| #15 | help-text.png | 21.04 KB | Sumit kumar |
| #3 | uncheck.png | 10.6 KB | Sumit kumar |
Comments
Comment #2
Sumit kumar commentedYour git command is not working please uncheck the maintainer checkbox in version control tab and then click on show button
: :- you find the right git command
Comment #3
Sumit kumar commentedFor reference see the attached screenshot
Comment #4
tusharbodke commentedHi Sumit,
Updated sandbox for maintainer checkbox.
Can you please try one more time?
Comment #5
tusharbodke commentedComment #6
Vignesh Puliyadi Raja commentedAutomated Review
issues found in pareview, need to be fix.
http://pareview.sh/pareview/httpgitdrupalorgsandboxtusharbodke2551319git
Manual Review
Coding style
Line no: 97 when using node_load its affecting the site performance[its fetching all the node informations]. so if you want node title field, write query for that.
You should also really have a hook_help() with some basic info about the module.
Comment #7
tusharbodke commentedHi Vignesh,
Thanks for your review.
Automated review - Done with code clean up and matching Drupal standards as per http://pareview.sh/.
Manual Review - Batch process need to update each node configuration for comments which is only possible by loading node. I am not doing anything related to Node Title.
Also implemented HOOK_help().
Thanks again
Comment #8
PA robot commentedWe 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 #9
makbul_khan8 commentedHi Tushar,
I installed, tested and ran through your code. Everything looks great! This can be used for all nodes migrated from other platform to drupal, where we have comments active/disabled/hidden.
Was looking for this functionality for my previous project.
Reports
Online Automated testing report
http://pareview.sh/pareview/httpgitdrupalorgsandboxtusharbodke2551319git
Code is clean.
Manual review result:
Individual user account
Yes
No duplication
Yes
Master Branch
Yes
Licensing
Yes
3rd party assets/code
Yes
README.txt/README.md
Yes
Code long/complex enough for review
Yes : Code is long enough for review.
Secure code
Yes : Looks secured
Coding style & Drupal API usage
Yes : Looks good and follows drupal coding standards.
Thanks for your contribution.
Comment #10
makbul_khan8 commentedComment #11
ayesh commentedHi Tushar,
Thank you for submitting this application. Quite small yet nifty module!
I found a similar module, https://www.drupal.org/project/bulk_apply_comment_settings , which does that same thing. It has no releases, but the git repo contains code that works. That code however, appears to handle loads of nodes efficiently by splitting it to smaller chunks.
- While enabling the module, the module was downloaded to comment_bulk_actions, but the module's name is comment_bulk_action. Please rename the folder name to remove the trailing "s" to prevent confusions.
- In comment_bulk_action_update_node_comment_configuration(), its second argument seems to be the comment enabled status. But the batch process does not send the user-submitted value to that function.
See the second array key above.
- Unset
$_SESSION['http_request_count']in thefinishedComment #12
tusharbodke commentedHi Ayesh,
Thanks for review feedback.
Here is following changes implemented
1) Updated code to handle node load in chunks. Also saw code from module https://www.drupal.org/project/bulk_apply_comment_settings. Instead of fetching 5 node ids with DB query in each pass, My module fetching all node ids at once(avoid multiple DB query in each pass).
2) Yes, updated module folder name by removing unwanted 's'.
3) Added arguments for batch operations.
4) Done unset
$_SESSION['http_request_count']in thefinished.Thanks again for valuable inputs.
Comment #13
tusharbodke commentedComment #14
tusharbodke commentedComment #15
Sumit kumar commentedHi tusharbodke,
Thanks for your contribution,
when we click on help link , I did not see any text after click on help.
As you Implements hook_help().
Comment #16
tusharbodke commentedHi Sumit,
Sorry last time I removed unwanted "S" from module name OR parent folder, But forgot to update in HOOK_Help().
Update help link to match module, Can you please have look once again.
Thanks for feedback.
Comment #17
darol100 commentedAutomated Review
Pareview.sh does not show any errors - http://pareview.sh/pareview/httpgitdrupalorgsandboxtusharbodke2551319git
Coder modules does not show any errors.
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.
I think the only blocker is lack of documentation. Add the documentation on "How to use" in the README.txt, hook_help and if you can on the project page. The module works like charm but if there instruction how to use it can be useless.
Comment #18
tusharbodke commentedHI darol100,
Thanks for your feedback/review.
1) Updated module name and remove unwanted "s".
2) HOOK_help and README.txt is updated for "HOW TO USE".
3) Project Image attached to project page which can help to understand how to use module.
Please have a look.
Comment #19
tusharbodke commentedComment #20
rashid_786 commentedThanks for your contribution, as i tested this module and it is working fine for me. However i think the help content
which you mentioned at the top inside .module file should be removed because you already had this content inside hook_help() and readme.txt to avoid the repetition.
Comment #21
tusharbodke commentedHi Rashid,
Thanks for your feedback.
Yes you are right, Update module to remove unwanted comments.
Regards,
Comment #22
tusharbodke commentedHi Rashid,
Thanks for your feedback.
Yes you are right, Update module to remove unwanted comments.
Regards,
Comment #23
rashid_786 commentedComment #24
tusharbodke commentedHi Rashid,
Can you please add complete review as per standards?
For more details please check #17.
Then you can mark status as "Reviewed & tested by community".
Thanks
Comment #25
rashid_786 commentedAutomated Review
No error found in automated review: http://pareview.sh/pareview/httpgitdrupalorgsandboxtusharbodke2551319git
Manual Review
All looks good to me, however some observations mentioned below:
$chunk_size = 5;, why it was supposed to have value as '5' or it might be defined at the Top as constant variable.db_query("SELECT nid FROM {node} WHERE type = :node_type ORDER BY node.nid ASC", array(':node_type' => $node_type))->fetchAllAssoc("nid");it might be used pdo based query e.g.db_select()->condition->fetchAllAssoc.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 #26
tusharbodke commentedThanks Rashid for review.
Here is my updates regarding your suggestions.
1) Done with changes, CHUNK_SIZE constant added at top. thanks.
2) I did use static query(db_query) with purpose, instead of db_select(). PDO queries are heavy & mostly for conditional OR for long query statements.
Thanks
Comment #27
dishabhadra commentedCoder Sniffer has found some issues with your code (please check the Drupal coding standards).
FILE: /var/www/drupal-7-pareview/pareview_temp/comment_bulk_action.module
---------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------
5 | ERROR | There must be exactly one blank line after the file comment
8 | WARNING | All constants defined by a module must be prefixed with the
| | module's name, expected "COMMENT_BULK_ACTION_CHUNK_SIZE"
| | but found "CHUNK_SIZE"
Comment #28
tusharbodke commentedHi Disha,
Thanks for your review feedback.
Updated code changes based on your suggestions, Will be great if you can add complete review for module.
Looking forward to hearing from your end.
Thanks,
Comment #29
tusharbodke commentedComment #30
tusharbodke commentedComment #31
tusharbodke commentedComment #32
makbul_khan8 commentedHi Tushar,
I have tested your module again and it works fine. Looked on coding standards for you module and found 1 sniff, so fixed that with some changes on help comments.
Hope this will help developers to debug the exact functionality of this module.
Created patch for this comment_bulk_action-coding_standard_and_help_comments-2554401-32.patch
Comment #33
tusharbodke commentedThanks Makbul.
Patch has been has been merged.
Thanks
Comment #34
dishabhadra commentedComment #35
TimRutherford commentedAutomated Review
All good here.
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.
Other than the 1 minor issue, its looking good!
Comment #36
tusharbodke commentedComment #37
tusharbodke commentedHi TimRutherford
Thanks for review.
Updated code as per standards and your suggested.
Thanks for pointer.
Comment #38
adam_ commentedIndividual User Account?
Yes: Follows the guidelines for an individual user account.
No duplication?
No: I don’t see a published module that does this exact thing.
Master Branch?
Yes: Master branch is set.
Licensing?
Licensing looks correct.
3rd party assets/code?
No, I don’t see any 3rd pary assets or code.
README.txt/README.md?
README.txt is present.
Code long/complex enough for review?
Yes, follows the guidelines for project length and complexity.
Secure code?
Everything looks like it’s being run through sanitation and
Coding style & Drupal API usage? The general coding style looks good and syntax looks great.
Recommendation: Line 74 where the progress_message is being assigned a value in comment_bulk_action.module looks like it has replacement tokens, but no values are being passed in (@current, @total).
I tested the module out and it worked for me, I could definitely see myself using this. Very convenient.
Marking as Reviewed & Tested by the Community
Comment #39
damienmckennaThanks for your contribution, Tushar!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.