Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Apr 2016 at 18:08 UTC
Updated:
7 Nov 2016 at 07:58 UTC
Jump to comment: Most recent, Most recent file
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
shuva.15 commentedA notice while checking the term body class occurs. Otherwise the module works perfectly.
Comment #4
SGhosh commentedThank you for testing out the module :)
I have corrected the issue, could you please try replicating the issue and confirm its fixed now?
NOTE: I have changed the module name so it would be better if you did a fresh install.
Comment #5
SGhosh commentedComment #6
SGhosh commentedComment #7
SGhosh commentedComment #8
SGhosh commentedComment #9
th_tushar commentedAutomated Review
[Best practice issues identified by pareview.sh / drupalcs / coder. Please don't copy/paste all of the results unless they are short. If there are a lot, then post a link to the automated review and mention that problems should be addressed.]
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
function taxonomy_field_body_class_form_alter(&$form, &$form_state, $form_id) {function taxonomy_field_body_class_preprocess_html(&$variables) {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 #10
SGhosh commentedThanks for testing the module @th_tushar. Really appreciate it!
I have fixed the issue that you pointed. I had actually changed the module name recently and had missed updating the function names. Fixed now.
I have also made an addition to the module by enabling the term body class for user pages as well. It would be really great if you could test it out once more.
About Code too short
This module is not a very complex module(yet) though in future if we find some limitations in it as per some use cases then I'll be extending the module. But for now, it's fairly simple and generally an add-on module for themers.
So consider this: for somebody -
This module could come handy is such a scenario. Ofcourse, the code they will need to write to do this isn't complex, but for a non-dev any code is difficult to feel confident about. So writing their own code vs. something easily pluggable AND RTBC is definitely something they will feel more secure about.
And hence the module. I hope I am able to justify why this module has a place on DO :)
And thanks a lot again :)
Comment #11
SGhosh commentedComment #12
evucan commentedAutomated Review
Passed
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.
This review uses the Project Application Review Template.
Comment #13
SGhosh commentedThanks for the review @evucan. Appreciate! :)
Could you give me more details on the below -
Currently, I don't have plans of adding anything else to the module but I am open to suggestions. I don't think it would be a good ides to extend it just for the sake of going for 150 lines of code as per guidelines. If there is anything additional the community feels that should be there before going live I would love to work on it.
Comment #14
evucan commentedI recently came across a case where I needed to add additionaly body classes on a node basis - also possible to do using context module tho. Thinking about it, making this module for just taxonomy is probably a nice way to package it.
Re the documentation, I actually meant that for this project page (not documentation), simply follow the guidelines, they display nicely and all the usual useful headings are there.
Comment #15
SGhosh commentedHi @evucan. Thanks for that. I have updated my project page with the relevant headers from the project page template.
The updates page here - https://www.drupal.org/sandbox/sghosh/2409019.
Comment #16
califken commentedWas able to checkout via the clone command on the project page.
Comment #17
califken commentedComment #18
califken commentedFirst, let me say great module. Well done. It worked exactly as intended. However, I did find an issue, as documented below in the review template.
Automated Review
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
* If a user tags content with a term that already exists as a system, module or theme's CSS class name, then the page will receive that class's styling. Only in instances where the CSS class declaration exists on it's own with no preceding elements, classes or IDs preceding it (unless that element is body), and no elements or IDs directly chained to it as part of the declaration (
.thisclass, but notdiv.thatclass) (again, unless it isbody.thaaaatclass).As a result, for example,
I tagged a node with "overlay", hence the body got the class "overlay". In Bartik's style.css line 1576, there is a declaration "
.overlay #header" todisplay: none;. Hence, for having tagged the node with overlay, I've lost the administration menu.There are a few ways I can think of to remedy this. You might consider prefixing any classes added by Term Body Class with a unique identifier, such as tbc-termnamehere, so as to avoid these collisions.
You might implement a blacklist, and either provide a warning to users that their term name collides with a system CSS class, perhaps only prefix that specific term, allow overriding of that displayed term name with a custom term alias for the body class string that will be inserted (for example:
mytermthatcollides {bodyclassversionofmyterm}.I would probably recommend the simple prefixing, though the other methods would be more likely to push your number of lines of code past 120! :)
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 #19
SGhosh commented@califken thanks so much for the prefix tip, totally agree with it. I have updated the module with the same - tbc-[term name].
I have fixed the spelling mistake as well.
However, I am using sublime text and could not replicate the below issue -
Any hints on how to resolve this?
Thanks again :)
Comment #20
remkor commentedIn Sublime Text change line endings from Windows to Unix.
Comment #21
th_tushar commentedHi remkor,
This is not a blocker though. Apart from this, are there any issues or it can be RTBC?
Comment #22
SGhosh commentedHey @remkor, I did check in my sublime and the line ending is selected for UNIX so couldn't replicate the issue. I looked up a few places online as well to check whether i can replace it but found nothing successfully.
But probably that's not a blocker for RTBC @th_tushar, @remkor?
Comment #23
remkor commentedIf you are using Windows the try this:
git config --global core.autocrlf falseThis is not a blocker.
Comment #24
ashwinshAutomated Review
Pareview.sh has found One Git errors.
http://pareview.sh/pareview/httpsgitdrupalorgsandboxsghosh2409019git
Git errors: Git default branch is not set, see the documentation on setting a default branch.
Thanks,
Comment #25
bapi_22 commentedManual Review
Use direct function drupal_html_class('tbc-'. $machine_readable))
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.
Comment #26
bapi_22 commentedChanged Status.
Comment #27
asiby commentedThanks for your review Bapi
The README guideline is not respected. No template was used. And it one was used, it would have allowed @SGhosh to clearly outline the module's limitations. In this case, the limitation/know issues would have been that the current version of the module only supports node and user entities.
@SGhosh, if you adjust your README file, that may solve the issue 1. pointed out by Bapi.
For 2. and 3., they need to be fixed IMHO.
Comment #28
bapi_22 commentedHi SGhosh,
Good point by Asiby. Please mention it on README file that it supports only 2 entities(node & user).
In the next version you can try to implement it.
Comment #29
SGhosh commentedThanks @remkor, but I am on Mac and on my sublime text 2 line endings are set to Unix. Yet I cannot figure out how to fix this. Will continue to figure out a solution but I guess it's not a blocker for go live :)
Comment #30
SGhosh commentedThanks for the review @ashwin.shaharkar. I have set the default branch now.
Comment #31
SGhosh commentedThanks a lot for the review @bapi_22. I have added my replies inline -
Currently, this module only supports node and user and I have updated the same in the README file. Most reviewers have given a go ahead so I would like to go ahead with my initial plan extend the functionality in future after release.
I have updated the code with this.
Thanks a lot for this tip. I have removed preg_replace and used this function directly after converting the title to lowercase.
Again thanks a lot for the review. Look ahead for your replies again. :)
Comment #32
SGhosh commentedThank you so much for the review @asiby.
As per your suggestion I have updated the README file as per the suggested template and also mentioned it's current limitations. I will be planning the extension in the next release :)
#2 and #3 have been fixed.
Comment #33
SGhosh commentedComment #34
gaurav.goyal commentedHey SGhosh,
Thanks for your efforts. I think its a very handy module.
Looks like RTBC to me.
Comment #35
arun ak commentedHi,
I reviewed this module and looks like a short module but giving a good feature, more helpful for theming. Code looks clean and fixed all the issues mentioned in previous comments. Couldn't see more application blockers.
@SGhosh, meanwhile as per review bonus program you can review three more other application from the queue to prioritize your own application.
Thanks,
ARUN AK
Comment #36
SGhosh commentedThank you so much Arun for reviewing my module and the suggestions.
Will review a few more to roll my application to the top again :)
Comment #37
arun ak commentedNo objections for more than a month, so ...
I have promoted the project for you. Now you can create the release of the project.
Thanks for your contribution, SGhosh!
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 #39
SGhosh commentedThank you Arun. It's great to see my module finally live :)