I am stumped by this one. I was writing out instructions on how to use Solr search to make a block of taxonomy terms... however I am experiencing unexpected behaviour.
Based on what I have read in the committed patch #472600: Replace taxonomy/term/XXX node listings with Apache Solr search results I assume I can override the taxonomy term pages with Solr search. However, instead of initiating a search, I am only getting a regular taxonomy term page.
Also reported by other users here:
* "Use Apache Solr for taxonomy links not working?" http://acquia.com/node/1004887
* E.g., "The terms in the view still link to the term page, they do not initiate an Acquia Search." http://acquia.com/node/709716#comment-12486
Where have we gone wrong in these steps?
Steps followed to configure search to override taxonomy terms pages.
Go to Acquia Search configuration page
?q=admin/settings/apachesolr/settings
Tab: Settings
Under Advanced Settings
Use Apache Solr for taxonomy links:
Select: Enabled
Click Save Configuration
Tab: Enabled filters
?q=admin/settings/apachesolr/enabled-filters
Select which filters.
Click Save.
Create a View with a block display of taxonomy terms, named Taxonomy_List
Defaults: Configure field Taxonomy: Term
Select: Link this field to its taxonomy term page
click Update
In Administer > Blocks
?q=admin/build/block/list
Locate the Taxonomy_List: Block and use the pull down menu to select which template region to show your block in.
Save
Comments
Comment #1
Scott Reynolds commentedMoving over to Solr Search Integration, not a views thing
Comment #2
janusman commentedThere was a bug in #562458: Small bug preventing menu_rebuild() when enabling taxonomy hijack which failed to erase the menu cache (a necessary step) when enabling the taxonomy term overrides.
Follow these steps:
* clear the caches manually
* check the vocabulary for the term you are trying is enabled in admin/settings/apachesolr/enabled-filters
* try visiting a taxonomy/term/XXX page (again, make sure the term id is one from the "Enabled Filters" page that is checked)
Comment #3
pwolanin commentedso this is duplicate and already fixed?
Comment #4
matthiassamwald commentedI went through all of the steps in the original post and the comments here and still no effect, there is no facet block showing (it is showing in the normal Solr search results). I also tried upgrading from 6.1-RC2 to RC3, no effect. I also manually patched the file as described in #562458, cleared the cache, still no effect.
Maybe I should just give up and should try doing this with Solr Views instead, but this seems a bit tricky as well.
Comment #5
matthiassamwald commentedI fixed my problem (described in #4)!
I had to manually edit the "menu_router" MySQL table. What I did was search for rows where the path column contained "/taxonomy/term". I found one such row. Interestingly, the value of the "page_callback" field was set to "taxonomy_manager_term_page". I installed the taxonomy manager module some months earlier. In the same row, the "file" field was set to "sites/default/modules/apachesolr/apachesolr.taxonomy.inc". In other words, the row was a mish-mash of values that were set by the taxonomy manager module as well as the Apache Solr module, for some reason. Either the Apache Solr failed to set all the necessary values, or the Taxonomy Manager module actively interfered by reseting some of the values after they were properly set by the Apache Solr module.
I then changed the "page_callback" field manually in phpMyAdmin to "apachesolr_search_taxonomy_term_page". Now I finally can see the taxonomy page generated by Apache Solr, including facets.
Not sure if this is a permanent solution, as the taxonomy manager plugin might reset the value again. In that case, I will document further steps I take in this thread.
Comment #6
pyrello commentedSo, I am not sure what all this means... is Taxonomy Manager incompatible with this setting in Apache Solr Search Integration?
I have been completely unable to get this to work. I have Taxonomy Manager enabled. Should I shut it off?
I am using version 6.x-2.x-dev.
Thanks,
Sean
Comment #7
pyrello commentedTo follow up with this: I did the same thing as @matthiassamwald, looking at the menu_router table. I had already disabled the taxonomy manager module, but also had the Taxonomy Views Integrator module installed. It was referenced in the row for "taxonomy/term/xx". I disabled it as well and checked the menu_router record again. Now it had reverted to page_callback: views_page. I went and looked at views and sure enough, I had a view enabled for this. Finally, I disabled the view and viola... taxonomy is now served up via solr, as expected.
I guess the lesson from this is that if you want to use the "Use Apache Solr for taxonomy links:" setting, you need to make sure that you have nothing else enabled that will try to write the output.
Comment #8
jpmckinney commented