screenshot
Taxonomy to apachesolr link is a lightweight module that allows users to link a specific taxonomy link to the apache solr facet search result for cherrypicked taxonomy fields.

It gives the user the choice to select a target and a specific path. (http://solr instead of http://search for example).

Drupal Version
Drupal 7
Sandbox repository
http://git.drupal.org/sandbox/cristobal.wetzig/1928086.git
Sandbox url
http://drupal.org/sandbox/cristobal.wetzig/1928086
Similar modules in Drupal 6 (not 7)
http://drupal.org/project/taxonomy_redirect

Manual reviews of other projects

Comments

Seppe Magiels’s picture

Automated review

The automated review indicates serveral problems, these problems should be fixed.

Manual review

The code looks very good, however I do have a few remarks.

1) For comments, like the one below, you should follow the documentation and comment guidelines.

/**
 * Alter an apache taxonomy link to your liking.
 * $link - The link to display
 * $term - The term taxonomy object
 * $field_name - The current field
 * $search_path - The search path
 * @example 
 * 
 * $link = urldecode($base_url . '/' . $search_path . '/' . $term->name . '?f[0]=im_' . $field_name . ':' . $term->tid);
 */

2) Custom hooks should start with your module name. hook_apachesolr_taxonomy_link_alter should be e.g. hook_taxonomy_to_apachesolr_link_link_alter.

Further you should add a link to your sandbox page to the issue above.

Good job so far, keep it up! ;)

PA robot’s picture

We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and put yourself on the PAReview: review bonus high priority list. Then I'll take a look at your project right away :-)

I'm a robot and this is an automated message from Project Applications Scraper.

Cristobal Wetzig’s picture

Thank you for your patiance Seppe!

Comments
Thank you! should be sorted.

/**
 * Alter an apache taxonomy link to your liking.
 * $link - The link to display
 * $term - The term taxonomy object
 * $field_name - The current field
 * $search_path - The search path
 * @example 
 * 
 * $link = urldecode($base_url . '/' . $search_path . '/' . $term->name . '?f[0]=im_' . $field_name . ':' . $term->tid);
 */

is now:


/**
 * Alter a taxonomy link construction.
 * 
 * @param string $link
 *   The end result
 *
 * @param stdobject $term
 *   The taxonomy term object to generate a link from
 * 
 * @param string $field_name
 *   The current field (term reference)
 * 
 * @param string $search_path
 *   The search path given by the user
 */

Automated review
I reviewed and fixed!
http://ventral.org/pareview/httpgitdrupalorgsandboxcristobalwetzig192808...

Sanbox url
I misunderstood the link to the sandbox, for some reason I thought it was the sandbox-repo url.
I added the sandbox url. Sorry about that. It was pretty clear in the guideline.

musicalvegan0’s picture

Hi there,

Good job so far. A couple more things to look at:

  • Your README.txt should contain more detailed information as per the in-project documentation guidelines.
  • You don't really need double quotes in the module's .info file. This is really minor, though.
  • Your @file documentation for your .module file should be more detailed. What kind of module is this (block, theme, media, etc...)?

Other than these minor issues, everything looks good to me. Good luck!

musicalvegan0’s picture

Status: Needs review » Needs work

Forgot to change the application status to "needs work."

Cristobal Wetzig’s picture

Status: Needs work » Needs review

fixed

kscheirer’s picture

Status: Needs review » Reviewed & tested by the community

Why do the README instructions start with 2? The search path should probably be a site-wide setting instead of a per-field setting, since it would always remain the same. Or even better just grab the value from the solr module directly. I don't see where you're using $settings['target'], taxonomy_to_apachesolr_link_field_formatter_view() doesn't seem to make use of it? Are taxonomy fields guaranteed to be im_* in solr?

No major issues though, this looks like a handy module.

----
Top Shelf Modules - Enterprise modules from the community for the community.

Cristobal Wetzig’s picture

Why do the README instructions start with 2?

Good catch! fixed.

The search path should probably be a site-wide setting instead of a per-field setting, since it would always remain the same. Or even better just grab the value from the solr module directly.

I disagree, for example, you might want to use a certain path for lets say a custom solr search experience for lets say users.

I don't see where you're using $settings['target'], taxonomy_to_apachesolr_link_field_formatter_view() doesn't seem to make use of it?
Correct, thats embarrassing. Fixed. Thanks!

Are taxonomy fields guaranteed to be im_* in solr?
No, but drupal standard, and 99.9% user case? There is a drupal_alter function available to change the output for any other case.

Cristobal Wetzig’s picture

Issue summary: View changes

Added a sandbox link

Cristobal Wetzig’s picture

Issue summary: View changes

added one review

Cristobal Wetzig’s picture

Issue summary: View changes

added review link

Cristobal Wetzig’s picture

Issue summary: View changes

link had no href

Cristobal Wetzig’s picture

Issue summary: View changes

added review link

Cristobal Wetzig’s picture

Issue tags: +PAreview: review bonus

Applying to PAReview: review bonus

Cristobal Wetzig’s picture

Issue summary: View changes

added review

kscheirer’s picture

Title: Taxonomy to apachesolr link » [D7] Taxonomy to Apachesolr Link

Thanks for making those fixes, +1 from me.

Cristobal Wetzig’s picture

Hi Kscheirer, thank you!

Btw!

I revised your point about

"The search path should probably be a site-wide setting instead of a per-field setting, since it would always remain the same. Or even better just grab the value from the solr module directly."

And you are right! Although you want to change it on field basis, you should be able to change the default value for all fields. I added a simple admin.page.inc to enable users to do so. Cheers for pointing that out.

Cristobal Wetzig’s picture

Issue summary: View changes

edit

klausi’s picture

Status: Reviewed & tested by the community » Fixed

manual review:

  1. taxonomy_to_apachesolr_link.info: dependency to some solr module missing?
  2. taxonomy_to_apachesolr_link.info: "configure" property to the settings page is missing
  3. Not sure this module uses the right approach - I would just build a solr view to replace the taxonomy term pages.
  4. "drupal_alter('apachesolr_taxonomy_link', $link, $term, $field_name, $search_path);": drupal_alter() should only have 4 arguments, see https://api.drupal.org/api/drupal/includes!module.inc/function/drupal_al... (if you need more you need to wrap them in a context array).

But that are not blockers, so ...

Thanks for your contribution, Cristobal Wetzig!

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 get 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.

Cristobal Wetzig’s picture

Cool! I will crack open a beer!

taxonomy_to_apachesolr_link.info: dependency to some solr module missing?

In theory this module could be used without apachesolr installed, (it could be using another drupal solr search).

taxonomy_to_apachesolr_link.info: "configure" property to the settings page is missing

Dammit! thanks.

Not sure this module uses the right approach - I would just build a solr view to replace the taxonomy term pages.

This is really for nodes, and users. for example you have a tag on a usernode. When you click on the tag on the user or node teaser, you want to be directoed to the taxonomy term search (filtered) served by apache.)

"drupal_alter('apachesolr_taxonomy_link', $link, $term, $field_name, $search_path);": drupal_alter() should only have 4 arguments, see https://api.drupal.org/api/drupal/includes!module.inc/function/drupal_al... (if you need more you need to wrap them in a context array).

Sloppy, thanks!

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

Anonymous’s picture

Issue summary: View changes

removed automated review