Taxonomy Tools contains several taxonomy management tools. One of those is Taxonomy Publisher which adds status "Published" to taxonomy terms and provides scheduler for publishing/unpublishing of taxonomy terms. Another one is Taxonomy Role Access which controls access to taxonomy terms for user roles; it differs from similar modules with the fact that access is controlled for each separate taxonomy term.
http://drupal.org/sandbox/martins.bertins/1406398
git clone --branch 7.x-1.x martins.bertins@git.drupal.org:sandbox/martins.bertins/1406398.git taxonomy_tools
Drupal 7

Reviewed by me:

CommentFileSizeAuthor
#19 drupalcs-result.txt10.75 KBklausi
#15 automated2.txt1.19 KBdark-o

Comments

vaibhavjain’s picture

Status: Needs review » Needs work

This is the result from the automated testing tool - http://ventral.org/pareview/httpgitdrupalorgsandboxmartinsbertins1406398git. You can use this link for future reviews too.

martins.bertins’s picture

Status: Needs work » Needs review

Took care of all the PAReview notices.

tyler.frankenstein’s picture

Status: Needs review » Needs work

Hello, I am a fellow applicant doing a review of your project application.

Automated Review

http://ventral.org/pareview/httpgitdrupalorgsandboxmartinsbertins1406398git

Came back clean.

Manual Review

I cloned the D7 branch into a fresh Drupal 7 localhost install and used drush to enable taxonomy_tools and taxonomy_tools_role_access. I used devel generate to make a bunch of dummy terms in the tags vocabulary. I then configured Taxonomy Role Access to be setup on the Tags vocabulary and control the anonymous and authenticated user roles. At this point it took me a while to catch on that I needed to go to the 'Overview' tab on the Tags vocabulary edit form. I kept looking inside the edit form for individual terms/tags (this is where I expected the controls to be).

From here I ran into a problem. When I clicked on the enable/disable ajax controls the images wouldn't render properly. My localhost install is running at http://localhost/drupal-7.12 and all of the icon images on the 'Overview' tab are looking for their image source in http://localhost. I took a look inside your code and I see a few spots where you are building a path to an image by using '/' instead of base_path(), please call the base_path() so the image source will render properly no matter where the drupal install lives. (line 120 in taxonomy_tools_role_access.module, 92, 104, 117 and 171 in taxonomy_tools.admin.inc should use base_path() instead of '/').

After making those changes in the code, I was able to get the enable/disable ajax buttons/icons to work. However, the anonymous user column gets stuck on disabled and I am not able to get the enabled icon back.

At this point I was able to test 'access for authenitcated user' on a few terms (tags). Visiting one of those term's pages directly as an authenticated user, it responded as expected when the permission was enabled/disabled. The access denied page appeared when it was supposed to, and the ability to view the term page worked when it was needed. I didn't test the anonymous user permissions because the enable/disable is broken for that role. I did however watch the 'Network' tab in Firebug to see if I could watch the ajax call/response and see if anything was going on. I couldn't notice anything unusual as to why the 'access for anonymous user' ajax enable/disable buttons aren't working.

Next I tried disabling access to a particular term for authenticated users (like before), but this time I removed 'authenticated user' from the 'select user roles which will be controlled by Taxonomy Role Access'. When visiting the term page, it behaved as expected and the authenticated user was able to view the page.

To be able to test any further it seems necessary that the 'access for anonymous user permission' column bug would need be fixed up. This module is quite far a long for a sandbox project, keep up the good work!

martins.bertins’s picture

Status: Needs work » Needs review

Thanks tyler.frankenstein for your review.
I updated readme file with explanation where to find the Overview page. Also fixed the bug with changing access for anonymous user. Made the changes so that base_path() is used when creating paths to images.

chris.leversuch’s picture

Status: Needs review » Needs work

- In hook_menu, wrap your descriptions in t()
- I think it's recommended that you create your own permission instead of using 'access administration pages'
- PAreview has more errors - http://ventral.org/pareview/httpgitdrupalorgsandboxmartinsbertins1406398git

martins.bertins’s picture

Status: Needs work » Needs review

Thanks to chris.leversuch for looking into my work.
1. Descriptions of menu items in hook_menu are considered as translatable, so I think that t() function is not needed in this situation. Please, correct if I am wrong.
2. Created module specific permissions for accessing module configuration pages.
3. Took care of PAreview notices. Ignore the thing about translation file, because as it is not yet a contrib module I can not put the translations in localize.drupal.org, but I need the translations for a project this module is used in.

martins.bertins’s picture

Sorry, had an connection glitch and made a double post.

Thanks to chris.leversuch for looking into my work.
1. Descriptions of menu items in hook_menu are considered as translatable, so I think that t() function is not needed in this situation. Please, correct if I am wrong.
2. Created module specific permissions for accessing module configuration pages.
3. Took care of PAreview notices. Ignore the thing about translation file, because as it is not yet a contrib module I can not put the translations in localize.drupal.org, but I need the translations for a project this module is used in.

mikgreen’s picture

Status: Needs review » Needs work

Here's a quick review regarding functionality:
1. If module is setup after terms have been created, if shows that all terms are published, when in fact thei are not.
2. If Taxonomy Tools module alone is enabled, it could provide it's features (reordering, deleting) for all Vocabularies in Overview tab. Also there should a short description in readme about these features.

martins.bertins’s picture

Status: Needs work » Needs review

Thanks mikgreen for pointing out these things:

Here's a quick review regarding functionality:
1. If module is setup after terms have been created, if shows that all terms are published, when in fact thei are not.
2. If Taxonomy Tools module alone is enabled, it could provide it's features (reordering, deleting) for all Vocabularies in Overview tab. Also there should a short description in readme about these features.

1. Yes, the status field will be missing the values if the Taxonomy Publisher is enabled after the terms have been created, but I have already considered that. When checking for the term status, it is considered as published if the value is set to "published" or if there is no value for the status field.
2. I have made the changes so that Taxonomy Tools overview page is available for all vocabularies without any dependencies. Also updated the README.txt file with a short description about the basic functionality that is provided by Taxonomy Tools module.

pgogy’s picture

Status: Needs work » Needs review
  1. Code Review reports

    taxonomy_tools.admin.inc

    Line 295: String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
    $link = 'taxonomy-role-access/nojs/' . $vocabulary->machine_name . '/' . $term->tid . '/' . $rid . '/' . $opposite;

    and

    taxonomy_tools_role_access.module

    Line 158: String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
    $link = 'taxonomy-role-access/nojs/' . $vocabulary->machine_name . '/' . $tid . '/' . $rid . '/' . $opposite;
    Line 191: String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms
    $link = 'taxonomy-role-access/nojs/' . $vocabulary->machine_name . '/' . $tid . '/' . $derived->rid . '/' . $opposite;

  2. Should the number of redirect links be limited to 1? (lines 86-95 of taxonomy_tools_redirect.admin.inc)
  3. This taxonomy term is set to redirect to: taxonomy/term/294
    Updated term 1100-1500.
    This taxonomy term is set to redirect to: localhost

    Seems to be a leftover message? Only one redirect can be true?

  4. One term can redirect to a term which can redirect itself back i.e. a circular loop. I'd happily say this is "user error", but was wondering if this could be trapped?

I'm not a great coder, just trying to help.
Hope this helps, I really like this module. We have a site full of terms and a tool to redirect typos would be really handy.

martins.bertins’s picture

Status: Needs review » Needs work
martins.bertins’s picture

Thanks pgogy for looking into this.
1. Took care of those reports. Strange that those didn't show up in automated review.
2. You can enter only one link, and you can't add another term redirect link field.
3. Got rid of misplaced messages about term redirect.
4. To avoid redirect loops I added a new rule for term redirect link validation. Now it is not possible to set redirect to another taxonomy term that already redirects somewhere. That seemed the most logical solution, because redirect loops could be made out of multiple terms and that is very hard to determine.

dark-o’s picture

Assigned: Unassigned » dark-o

reviewing....

dark-o’s picture

Assigned: dark-o » Unassigned
Status: Needs review » Needs work

Autmatic review:

see attached file bellow

Manual Review:

1. I like multi delete option, will be definitely appreciated by anybody who need to delete more than couple of terms at once.

There is a small usability issue with multi hierarhical taxonomies, user may not be aware that there may be sub terms just by looking at overview page, so some explanation at the top and + sign or similar would be good to indicate that there are sub terms. Also, if you drill down in to sub terms there is no obvious way to go back up.

2 TAXONOMY PUBLISHER
Please add to Readme files where to configure it, it is not obvious that you need enable it for each vocabulary in
admin/config/taxonomy-tools/publisher

However when I did enable if for my taxonomies, I could than not see publish option anywhere, I expected it to be in edit term page.

3. Taxonomy redirect, same as above, please update readme

Redirect did work normal user, but for admin did not , instead I got this message at the top of taxonomy page:

"This taxonomy term is set to redirect to: node/23"

If this is a feature please document it

4. Taxonomy role access
Please document how to change access, i.e click on green icon in Overview peae, it is not obvious at first
Restriction did work.

This is much needed module for any site that makes serious use of taxonomies, so hurry up :)

dark-o’s picture

StatusFileSize
new1.19 KB

automated review

martins.bertins’s picture

Status: Needs work » Needs review

Thanks to Darko Kantic for a nice review.

Finally had some time to look into this.
First of all took care of the automated review.
1. Now the child count is visible next to term name. Also if the user is deeper than the root level, the first row of the table in the overview page holds a link that leads one level up in the hierarchy. Added informative text after the table.
2. Updated readme.txt with instructions. The options you were looking are in a fieldset called "Publishing settings", it is collapsed by default, maybe that is why you did not see it.
3. Updated readme.txt with instructions.
4. Updated readme.txt with instructions.

avpaderno’s picture

Priority: Normal » Critical
martins.bertins’s picture

Issue summary: View changes

Added review made by me

martins.bertins’s picture

Issue summary: View changes

Added review #2 done by me

martins.bertins’s picture

Issue tags: +PAreview: review bonus

Adding review bonus tag

klausi’s picture

Priority: Critical » Normal
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus
StatusFileSize
new10.75 KB

There is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 . Then remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732
Review of the 7.x-1.x branch:

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:

  1. taxonomy_tools_enable(): do not juggle with module weights. If you want any specific hook to run before/after another module use hook_module_implements_alter() to change the order.
  2. taxonomy_tools_menu_alter(): you don't need $break, just use "break 2;". See http://php.net/manual/en/control-structures.break.php
  3. "drupal_alter('term_copy', $term);": all hooks that your module provides should be prefixed with your module's name to avoid name collisions.
  4. "$form['field_taxonomy_term_status']['und']['#default_value'] = 1;": do not use "und", use LANGUAGE_NONE. Also elsewhere.

But that are just minor issues, otherwise I think this is RTBC. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

martins.bertins’s picture

First of all thanks to klausi for looking into my work.
Did final cleanup so that PAReview shows nothing. Removed master branch and translation files. Also thanks for the CodeSniffer output, because i don't have it set up on my computer.
Also corrected my code according to klausi manual review. Maybe those were minor things, but some of those were definitely great advice.

mitchell’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution, martins.bertins!

I updated your account to let you 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 again, and good luck! :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Added review #3 done by me