This module is designed to allow users to add classes to any page through the an interface.
The interface has options to select multiple user roles as well as pages where the class can be rendered.
Project page
https://www.drupal.org/sandbox/sanjaysingh/2771679
Git URL
git clone --branch 7.x-1.x https://git.drupal.org/sandbox/sanjaysingh/2771679.git common_body_class
| Comment | File | Size | Author |
|---|---|---|---|
| #36 | cbc_list.PNG | 9.28 KB | sanjay chauhan |
| #36 | cbc_front.PNG | 29.66 KB | sanjay chauhan |
Comments
Comment #2
nisith commentedPlease review and fix the errors/warnings found at:
http://pareview.sh/pareview/httpgitdrupalorgsandboxsanjaysingh2771679git.
Comment #3
nisith commentedComment #4
hiramanpatilHi @Sanjay Chauhan,
Please change git URL in this post. so that community members can clone and review your project.
It should be -
Thanks
Comment #5
sanjay chauhan commentedComment #6
hiramanpatilHi @Sanjay Chauhan,
As a part of module review on drupal.org you need to do some manual reviews of projects posted by community members at https://www.drupal.org/project/issues/projectapplications
Once you reviewed some projects, you need to add URLs of reviews in this post as part of review bonus system.
For more information please check How it works and Summary section at below URL -
https://www.drupal.org/node/1975228
Thanks
Comment #7
hiramanpatilHi @Sanjay Chauhan,
For this post/issue you have selected your own project which is wrong.
Below is the URL where we can view all the projects which are posted for the review. Updating the project for this post to Drupal.org Project applications so that all the reviewers can see your project and review it.
URL - https://www.drupal.org/project/issues/projectapplications
Thanks
Comment #8
sanjay chauhan commentedComment #9
sanjay chauhan commentedThank you for your help.
@Nisith I have fixed the php warning of http://pareview.sh/pareview/httpgitdrupalorgsandboxsanjaysingh2771679git
Comment #10
PA robot commentedFixed the git clone URL in the issue summary for non-maintainer users.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #11
ashwinshHello @Sanjay Chauhan,
Please check following warnings:
Comment #12
sanjay chauhan commentedHi @ashwin.shaharkar,
I have checked my code through coder module as well from "http://pareview.sh" and found no errors.
Could you please let me know the tool through which you have generated this warning messages?
Thanks,
Sanjay Chauhan
Comment #13
ashwinshHello @Sanjay Chauhan,
I used the command line version of Coder which is slightly more up to date than pareview.sh.
Thank you,
Comment #14
sanjay chauhan commentedComment #15
sanjay chauhan commentedComment #16
arun ak commentedHi Sanjay Chauhan,
I manually reviewed your module and please see my comments below.
common_body_class_add_class_form_submit(): In submit handler you are checking form has any error usingform_get_errors(). You can validate and set errors incommon_body_class_add_class_form_validate()function. According to drupal form api, submit handlers only execute when validation did not fail. Also you are setting success message after the if conduction, so it is not relevant the use ofform_get_errors()function in this area.common_body_class_admin_class_configure_submit(): You are callingcache_clear_all()function after every create, update and delete class configuration.But it is not a good practice implicitly clear cache after each time when admin made a change in admin configuration. It will have impact on high traffic sites. Instead of that, you can show a warning/markup message to clear cache to affect class changes in front-end.
Refer:
https://www.lullabot.com/articles/a-beginners-guide-to-caching-data-in-d...
http://www.pixelite.co.nz/article/debugging-drupal-performance-with-cach...
common_body_class_admin_class_configure(): foundI think you are trying to use field 'hidden'. If not using this, remove it.
Refer:
https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.h...
Thanks,
ARUN AK
Comment #17
sanjay chauhan commentedHi Arun,
Thanks for reviewing the module.
I have followed Drupal standard in coding and functions.
1. common_body_class_add_class_form_submit(): I am not validating anything on submit handler. I have already declared _validate function. In submit handler i am only confirming that there are no error on submit.
2. Calling cache clear: If we will display any message and suppose page getting reloaded then user will not be able to understand what he/she need to do. For that reason i have used cleared cache on submit and delete.
3. I have followed Drupal coding standard and standard form API. Please again check.
https://api.drupal.org/api/drupal/developer%21topics%21forms_api_referen...
There are special element that we can use on form.
I have attached a screenshot for form API.
Comment #18
sanjay chauhan commentedComment #19
anas_maw commentedAutomated Review
Please fix the some basic issues suggested by paraview:
http://pareview.sh/pareview/httpsgitdrupalorgsandboxsanjaysingh2771679git
Manual Review
Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
[List of identified issues in no particular order. Use (*) and (+) to indicate an issue importance. Replace the text below by the issues themselves:
1- (*) hook_uninstall is not necessary. A table created by hook_schema is automatically dropped when the module is disabled.
Thanks.
Comment #20
sanjay chauhan commentedHi @Anas_maw,
I have fixed the issues as per your comments. Please verify.
Thanks,
Sanjay Chauhan
Comment #21
sanjay chauhan commentedComment #22
sanjay chauhan commentedComment #23
sanjay chauhan commentedComment #24
anas_maw commentedHi @Sanjay Chauhan
Please fix errors and warnings mentioned in pareview.
http://pareview.sh/pareview/httpsgitdrupalorgsandboxsanjaysingh2771679git
Thanks.
Comment #25
sanjay chauhan commentedComment #26
sanjay chauhan commentedHi @Anas_maw
Most of the things i have resolved and rest of them i don't find them critical.
Please review.
Thanks,
Sanjay
Comment #27
imyaro commentedHello,
I'd made a little code review.
1) Dublicate attributes key
2) Seems there is some problems with a line indents.
3) I don't see the reasons to add colgroups and caption elements - it will be defined automatically with the same values
line
It will not reach submit function if there will be a form errors. This checking is not necessary.
The same thing is for common_body_class_admin_class_configure_submit
Thanks for attention.
Comment #28
imyaro commentedComment #29
sanjay chauhan commentedHi @zvse,
Thank you. your notes has been resolved. Please verify.
Thanks again for your time.
Thanks,
Sanjay Chauhan
Comment #30
sanjay chauhan commentedComment #31
akhilsoni commentedNice module And very helpfull
Comment #32
visabhishek commentedComment #33
sanjay chauhan commentedComment #34
akhilsoni commentedHello i have checked
when more than one class will add on the same table like display in the Screenshot then only the last class will add on the body tag.
Comment #35
akhilsoni commentedComment #36
sanjay chauhan commentedHi @akhilsoni1992,
When there are common pages in the table with multiple classes then all the classed will be added to the page.
Please find the attached screenshot.
Thanks,
Sanjay Chauhan
Comment #37
akhilsoni commented@sanjay Chauhan
Yes you are right
it is my bad reviewing that.
Comment #38
PA robot commentedProject 1: https://www.drupal.org/node/2771959
Project 2: https://www.drupal.org/node/2829650
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 #39
sanjay chauhan commentedComment #40
sanjay chauhan commentedComment #41
visabhishek commentedHi Sanjay Chauhan,
Your account already granted as '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.
So You can directly promote your sandbox project.
Comment #42
sanjay chauhan commentedComment #43
sanjay chauhan commentedComment #44
sanjay chauhan commented