Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Vanilys’s picture

Subscribing

prathK’s picture

I found that in the basic search form of D6 Categories come by default.
But in case of D7 categories are not coming under the advanced search.
It seems some problem for building the search_form itself without categories.
I guess using the form_alter we have to add the fields which are configured in the
custom_search_taxonomy by fetching the whole taxonomy.
Looking into it and will update the patch for the same.

regards,
PrathK

prathK’s picture

Hi Vanilys,

It seems that there was form_alter present in node.module itself in D6 which was adding taxonomy.
But in D7 it was removed for some purpose and again it might be added in D8.
You can see the following post for the reference.
Optional Exclusion of Taxonomy Vocabulary from Advanced Search

This will be fixed in D8 core node.module automatically.
Also you can check the patch given on the same link for D7.

prathK
extrimity.in

Ambient.Impact’s picture

Status: Active » Postponed

I'm also having this problem with 7x-1.11, but only on the results page - the blocks work fine. Has anyone encountered this variation?

Ambient.Impact’s picture

If anyone is looking for a quick for this in Drupal 7, I've attached a simple module I slapped together to re-add the taxonomy select box, based on the Custom Search settings for each vocab. Enjoy.

jdanthinne’s picture

Status: Postponed » Needs review

@Ambient.Impact: Can you provide a patch instead? It would be easier for the other users to try your solution…

Ambient.Impact’s picture

Fair enough. I'm not as familiar with generating patches as I'd like to be, so let me know if there's anything I've done wrong and I'll re-upload it.

sonictruth’s picture

#7 is a good start however it doesn't respect any of the settings on the admin/config/search/custom_search/taxonomy page.

I've made a start with the field type however to get this fully working it would need to incorporate the label, label visibility, depth and 'all' string.

I'll keep going with the rest if time permits but this should be a help to some.

akosipax’s picture

The patch above does not take into account multiple taxonomies. (or maybe it does but it just doesn't work)
... removing the reset function solved it. the reset function returns the first element, that's why only the first vocabulary gets to be the option.

Proteo’s picture

Hi, I'm having this issue too. I tried the patch at #8 but it won't apply to the latest dev version (7.x-1.13+7-dev, error is: "Hunk #1 FAILED at 115"). Any chance to get a revised patch?

internets’s picture

Issue summary: View changes

Patch also failed for me against 7.x-1.13+7-dev. I'm trying to make a fix but haven't had success yet...

golddragon007’s picture

Huh, finally I did it. That patch was for the 20144e64494c83a448067d587e59df5d7e4780bb commit. But it seems that doesn't meter, because there was a lot of changes which caused than a lot of bugs... So basically I rewrote the patch.
You can set if you want to display in the advanced search box the taxonomies, at the admin/config/search/custom_search/results page. This is in default true.
Set taxonomy display
But it won't display, if you don't choose 'selector type' at the admin/config/search/custom_search/taxonomy page.

Result:
Advanced search result page

Note 1: I copied the custom search block's taxonomy code for advanced search.
Note 2: I changed the advanced search's form submit target to custom_search_submit function, which maybe can cause some bugs. If somebody is more familiar with this code part, please check it. (it seems it works correctly, but who knows?)

Tested/Test results:
Selector type: drop-down list, drop-down list with multiple choices, radio buttons, checkboxes
Checkbox js works
Doesn't show terms in searchbox (at content)
Automatically selected the correct options in the advanced panels at advanced result page after search
Correctly select 'any' option (and any other option)
Doesn't multiply same tags at research
Tested with multiple tags. (show only at advanced result page in the box, the results wasn't tested at multiple vocabulary tags)
Hide at result page the taxonomy if uncheck the checkbox at admin/config/search/custom_search/results OR if you select 'Disabled' at admin/config/search/custom_search/taxonomy .

HannahMR’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

**removed**

Mario Steinitz’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev