Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have configures a custom search block for which i have allowed search on a single type of content only.
Now I needed a custom search path for this custom block so that i could theme this search path individually.
I configured custom search path with the "CUSTOM SEARCH PATHS" settings tab..
Now after I hit search the page is redirected to the URL i configured but no content is visible there.
What is possibly wrong here ?
The same search works absolutely fine if i just remove the path in "CUSTOM SEARCH PATHS" settings
Comment | File | Size | Author |
---|---|---|---|
#8 | Custom-Path.png | 15.75 KB | mahimajulka |
Comments
Comment #1
thelynge CreditAttribution: thelynge commentedDid you clear all caches after setting the new path?
Comment #2
mahimajulka CreditAttribution: mahimajulka commentedThe cache must have been cleared as the search submit button is getting directed to the new URL only
Comment #3
thelynge CreditAttribution: thelynge commentedTry clearing it again, just in case.
Do you have any search related modules installed other than the default search module?
Comment #4
thelynge CreditAttribution: thelynge commentedoh, and please check your error log :)
Comment #5
mahimajulka CreditAttribution: mahimajulka commentedI have Custom Search 7.x-1.13 and Custom Search Blocks 7.x-1.13 enabled
I have tried with cache clearing as well no success ..
Comment #6
thelynge CreditAttribution: thelynge commentedThe Custom Search module has a built-in custom searchpath functionality. Check out the section "Custom Search Paths" under admin/config/search/custom_search. In this case you should that instead of the Custom searchpath module.
Comment #7
thelynge CreditAttribution: thelynge commentedI will take a look at trying to get the module working with Custom Search sometime soon. Currently it only works with the Search module and Apache Solr.
If you don't really need the Custom Search module for anything special right now, you could disable it and just use the default Search module. The Custom searchpath module works well in that case.
Comment #8
mahimajulka CreditAttribution: mahimajulka commentedI have attached the settings where I have put the path of the custom search.
This setting comes while editing the custom search block.
AFter clicking on search in my custom search block i am redirected to this link but no search results appear.
If i just change the path and make this field empty my search is directed to search/node/[key] and results appear ..
Isn't this a bug ?
or am i doing something wrong here ?
Comment #9
mahimajulka CreditAttribution: mahimajulka commentedOk thelynge there is some misunderstanding i think i have tagged a module that i am not using.
I am using Search, Custom Search 7.x-1.13 and Custom Search Blocks 7.x-1.13
I am not using Custom searchpath module
Comment #10
thelynge CreditAttribution: thelynge commentedOk, then ask your question here: https://drupal.org/project/custom_search
Comment #11
thelynge CreditAttribution: thelynge commentedIf I understand the Custom Search module correctly, setting the Custom Search Path in the block will just be a frontend change. To display the results you have to setup the results page elsewhere. Maybe using the views module. But asking in the project forum to which I linked above might still be a good idea.
Comment #12
mahimajulka CreditAttribution: mahimajulka commentedChanged the project to Custom Search
Comment #13
mahimajulka CreditAttribution: mahimajulka commentedusing views to create a search block works as a charm..
though i still wonder why this way is not working ..
Comment #14
thelynge CreditAttribution: thelynge commentedLike I mentioned, I think the "Custom Search Paths" setting is only a frontend setting, changing the form action - no result page will be added nor changed to match it. That you have to do another way.
I just tested the Custom Search module with my Custom Searchpath module and that will work too. Just set the same path in both modules.
Comment #15
jdanthinne CreditAttribution: jdanthinne commented@thelynge is right, the Custom Search Path is used to redirect the search to a custom search page (to be built by Views, another search module, or even to an external website), and NOT to alias the search path.