Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2015 at 12:35 UTC
Updated:
15 Sep 2016 at 11:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
chanderbhushan commentedComment #3
chanderbhushan commentedComment #4
chanderbhushan commentedComment #5
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 #6
chanderbhushan commentedComment #7
chanderbhushan commentedComment #8
manjit.singhAdd appropriate project application reviews. Please check project application reviews doc.
Comment #9
manjit.singhmodule gives me an error after enabling :(
I think
user_activity_log_total_comments_by_user()giving an error when there is no comment added by login user.Comment #10
manjit.singhyay , Find out the problem :) When comments module is disabled then it is throwing the site to an error page. If you are showing the total number of comments in block then you have to add the dependencies of comments module. Otherwise it will gives an error when comments modules is disabled.
Comment #11
chanderbhushan commented@manjit.singh thanks for your comment
I have added dependencies of node and comment modules
Comment #12
chanderbhushan commentedComment #13
gbyteHi, thanks for the contribution. Let me just quickly list some things I found while going through the module:
The problem I see with this module is that the functionality can be easily duplicated with a views block. This module provides a static, non-configurable block. If you intend to create a plug-and-play solution to displaying user info in a block, you should provide a way to configure the output via UI. Otherwise I don't see the point of using this instead of views.
.info
- Please fix the description in the .info file from 'login' to 'logged in' and add a full stop.
- The description should mention, that the module provides a block, alternatively add hook_help.
.module
- Lines 51-54 and 115: The strings should be passed through t().
- Lines 70, 86, 104-105, 131: No need to set the third parameter in the query condition method if it is '='.
Module functionality:
- I tested it on the site where hundreds of thousands of nodes have been created by user 1 and all these nodes where displayed in the block... Please check the limit.
Comment #14
chanderbhushan commentedHi gbyte.co thanks for your comment
right now i am just create the static block in feature i will create full dashboard for user.
Comment #15
chanderbhushan commentedComment #16
manjit.singhPlease add a review bonus to speedup the process.
Comment #17
Anonymous (not verified) commented@chanderbhushan
just enabled and configured block for user_activity_log module. try some hands on creating content/commenting on node works fine for me.
this module could be much better if admin has ability to limit the Display "Recent Created Nodes" and "Recent Comments" in block.
overall good work @chanderbhushan.
Comment #18
prashant.c@chanderbhushan
1. Please follow README TEMPLATE.
2. There are some typos in .info file and also in variable names in your .module file.
Comment #19
banviktor commentedAutomated Review
Manual Review
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1140 In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'd7.n.nid'; this is incompatible with sql_mode=only_full_group_by: SELECT n.nid AS nid, COUNT(1) AS count FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE (n.uid = :db_condition_placeholder_0) AND (n.status = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 1 ) in user_activity_log_total_node_created_by_user() (line 73 of E:\web\drupal7\sites\all\modules\user_activity_log\user_activity_log.module).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.
This review uses the Project Application Review Template.
Comment #20
chanderbhushan commentedfixed issues
Comment #21
chanderbhushan commentedComment #22
chanderbhushan commented@banviktor i fixed all the points that you mentioned. Please check
Comment #23
brahmjeet789 commentedi have tested and it is working fine for me.
great work
Comment #24
ivanzhu commentedThere are two points :
1. use list instead of lsit when you name your variable is better.
2. In order to improve performance, I suppose you can use drupal cache api.
That's all, Thanks.
Comment #25
chanderbhushan commented@ivanzhu thanks for your suggestion, corrected the variables name.
In next release, I will implement drupal cache api.
Thanks
Comment #26
prabhu9484 commentedGood work Chander !
Comment #27
patial.manoj commentedGreat module.. This is very helpful to me. Nice work @chanderbhushan.
Comment #28
leewillis77 commentedHi;
I've completed a review of the project - findings below. Setting back to "Needs work" accordingly.
Automated Review
Completed - wthout any issues.
Manual Review
Individual user account
Follows the guidelines for individual user accounts.
No duplication
Does not cause module duplication and/or fragmentation.
Master Branch
Follows the guidelines for master branch.
Licensing
Follows the licensing requirements.
3rd party assets/code
Follows the guidelines for 3rd party assets/code.
README.txt/README.md
The README.md file is not in markdown format. This should either be README.txt - or rewritten to markdown format.
Code long/complex enough for review
Yes - although only just. The module is 130 lines long including comments & whitespace.
Secure code
Does not meet the requirements. The code fails to adequately escape node titles when outputting them in user_activity_log_latest_comment_by_user() and user_activity_log_latest_node_created_by_user().
Coding style & Drupal API usage
There are a couple of major-ish issues (including the blocking security one) and some more minor issues:
Comment #29
chanderbhushan commented@leewillis77 thanks for comment.
Data needs adequately escaping before output :- Fixed
Links should be created using l() rather than hard-coded HTML:- Fixed
Minor typo in .info file "loged" should be "logged":- Fixed
"Total node created (18)" - should be "Total nodes created (18)" :- Fixed
"Total Comments" should be "Total comments" :- Fixed
user_activity_log_block_content() should exit at the top of the function if UID is 0, not the end :- Fixed
Not sure why you're defining USER_ACTIVITY_LOG_USER_COMMENT_PUBLISHED, USER_ACTIVITY_LOG_USER_NODE_PUBLISHED - just use COMMENT_PUBLISHED and NODE_PUBLISHED :- i have this because of http://pareview.sh/ suggestions .
Thanks
Comment #30
chanderbhushan commentedComment #31
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxchander1232573995git
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #32
leewillis77 commentedHi - thanks for the quick updates. Some comments below:
This is now double-escaped, and you're using t() where you shouldn't be. So, in
l(t(check_plain($node_title)), $path)t() is incorrect - it should only be called with fixed strings, not variables. It's also not adding anything here. The check_plain() that you've added is also incorrect since you're now using l() to construct the link. l() will sanitise the string for you. So - this should just be:
l($node_title, $path)Not sure what you mean here? COMMENT_PUBLISHED and NODE_PUBLISHED are already defined for you and available for use. Can you clarify why you're redefining your own constants here?
Comment #33
chanderbhushan commented@leewillis77 thanks for your comment
fixed all things that you have mentions.
Comment #34
chanderbhushan commentedComment #35
leewillis77 commentedHi;
Thanks - the module works as expected now. I'm happy with this. Probably needs another set of eyes to move it on.
Comment #36
Chandan Chaudhary commentedHi Chander,
I just found the module simply and useful, but there are some Drupal standard which probably was not taken in account.
1. The 'User Activity Log' block should be implement by using '#theme' so that it can be override in the theme and designed accordingly.
2. There should be check for empty results in user_activity_log_latest_comment_by_user function at line # 93. otherwise it will log notices in the watchdog.
3. Same is recommended for user_activity_log_latest_node_created_by_user function
4. Its not need to fetch the path alias separately as it is handled by l function itself.
5. you have defined $base_url; but have not used anywhere
Apart from this there are some typo errors
1. At line # 97 the Commented on with extra leading space ( May create issue while adding a translation from translate interface)
Comment #37
Chandan Chaudhary commentedComment #38
chanderbhushan commented@chandan.chaudhary thanks for your comment
#theme will implement later, All other issues are fixed.
Comment #39
chanderbhushan commentedComment #40
Sumit kumar commentedTested on local machine code is working fine for me.
Thanks
Comment #41
prashant.c@chander
Please use template file to render block content using hook_theme() to make it helpful for theme developers.
Comment #42
chanderbhushan commentedadded review
Comment #43
chanderbhushan commented#theme will implement later in next release
Comment #44
chanderbhushan commented@Prashant, hook_theme() has been implemented
Comment #45
prashant.c@chander
Now it seems fine.
Comment #46
chanderbhushan commented@Prashant thanks
Comment #47
manjit.singhSome issues found by automated review http://pareview.sh/pareview/httpgitdrupalorgsandboxchander1232573995git . See if it can be resolvable.
Comment #48
chanderbhushan commentedmost of the issues has been resolved
Comment #49
chanderbhushan commentedComment #50
chanderbhushan commentedadded manual review
Comment #51
manjit.singhNot found any application blocker. Assigning it to Klausi for final review.
@Klausi I have found user_activity module. but it has not D7 release. See if it create a duplication issue. Otherwise code looks good to me.
@chander Good work !! Thanks for the contribution.
Comment #52
klausimanual review:
Comment #53
chanderbhushan commentedComment #54
chanderbhushan commented@klausi Thanks for your comments.
1. This block is display only for current login user, project info updated.
2. removed concatenation and added nested array.
3. I have changed the hook_theme, i can't understand which "template accepts are missing" are missing. Please explain more
4. node_access tag added.
Comment #55
Rahul Seth commentedAutomated Review
I ran your code against auto code sniffer at 'http://pareview.sh/pareview/httpgitdrupalorgsandboxchander1232573995git'.
Review of the 7.x-1.x branch (commit 7237f2f):
Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
FILE: /var/www/drupal-7-pareview/pareview_temp/user_activity_log.module
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------
140 | WARNING | Format should be "* Implements hook_foo().", "*
| | Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.",
| | or "* Implements hook_foo_BAR_ID_bar() for
| | xyz-bar.tpl.php.".
---------------------------------------------------------------------------
Time: 90ms; Memory: 6.25Mb
No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.
Note that perfect adherence to Drupal Coding Standard is NOT a reason to block an application, except for total disregard of them. However, modules should follow them as closely as possible.
Manual Review
Heartbeat, Activity Log, please let us know how your module different than other modules
Comment #56
Rahul Seth commentedComment #57
chanderbhushan commented@Rahul Seth thanks for your comments.
This block is display only for current login use.
activity_log its d6 release.
heartbeat not showing count of nodes, comments.
I already mentioned in Readme file. How to use module.
Comment #58
chanderbhushan commentedadded manual review
Comment #59
chanderbhushan commentedadded review
Comment #60
madhavvyas commentedI am also with #55 Automated review should clear and Readme.txt file help lot to understand functionality.
Comment #61
chanderbhushan commented@madhavvyas thanks for your comment, Automated review cleared now.
Comment #62
mukeysh commentedComment #63
klausiRemoving review bonus tag, you have not done all manual reviews, you just posted the output of an automated review tool or made comments about git clone commands. Make sure to read through the source code of the other projects, as requested on the review bonus page.
Comment #64
chanderbhushan commentedComment #65
chanderbhushan commented@klausi, i have added manual reviews, Is anything blocker in my module ?
Comment #66
chanderbhushan commentedComment #67
klausimanual review:
But otherwise looks goos to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning to er.pushpinderrana as he might have time to take a final look at this.
Comment #68
pushpinderchauhan commentedAutomated Review
Best practice issues identified by pareview.sh / drupalcs / coder. None
Review of the 7.x-1.x branch (commit ac4c070):
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
Manual Review
Most of the recommendations are already raised in previous comment, you may observe duplicate in my review but it would help you to make your project better.
Since this was RTBC already and no major blocker jump out to me so...
Thanks for your contribution, chander bhushan!
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.
Comment #70
chanderbhushan commented