In our site the block_search is redirecting bad cause the path is incomplete cleaned. For example:
We got example.com/mydrupal as base path drupal installation, then our "core search" is "search/apachesolr_search" the result for a normal search will be:
exmaple.com/mydrupal/search/apachesolr_search/
But it's not our case. The redirect it's doing a wrong path,
exmaple.com/mydrupal/mydrupal/search/apachesolr_search/.
This happen because for our site the "base_path" it's not "/" is "/mydrupal/".
I figure out that some fix can be recodding this line.
($path{0} == "/" ) ? $path = substr($path, 1) : '';
Comments
Comment #1
killua99 commentedThis is a fix for my case, but need review to see if it correct.
Comment #2
nick_vhCould you write down a small tutorial how we can replicate this? I'd like to add some simpletests for this case as it is a sensitive thing
Comment #3
pwolanin commentedI don't think you can have a test install in a subdir?
Also, our function looks rather different from: http://api.drupal.org/api/drupal/modules%21search%21search.module/functi...
maybe worth digging into what's going on in more depth?
Comment #4
pwolanin commentedcommitting the patch in #1 above since this is an annoying bug, but I think we need to revisit for a more robust solution.
Comment #5
killua99 commentedAnd this commit is under my name? ^_^ just to know.
Actually I'll try to dig in and see if this is right? solution.
Comment #6
nick_vhpostponed until we decide to revisit this or until someone wants to take a crack to this problem
Comment #7
nick_vhRevisited this a little bit and added some more commenting to make it clear what it does exactly. Committing and closing this issue. I think the approach you chose was quite ok. I could rewrite it to be less cryptic but I don't see why.
Comment #8
nick_vhComment #9
nick_vhClosing to clean the issue queue a bit