This issue arrised after doing a cron job.
When you do a search in the seach block, you are directed to a clean url page (without ?q=). This site does not exist, and the user gets a 404 error message.
I have no clue, why this happens. You can have a look here: http://www.ok-centrum.at/
Classic search works http://www.ok-centrum.at/?q=search
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | custom-search-path_solved.JPG | 44.38 KB | carolaun |
| #6 | custom-search-path.JPG | 45.2 KB | carolaun |
Comments
Comment #1
carolaun commentedBy using the path option of custom search I could do a work around. Though, I am not realy happy with that. The search does not work right out of the search block.
Hm - this seems to need some more research.
Comment #2
WSeb commentedHello,
I have exactly the same problem. How did you worked it around ? I don't know how to use the path option.
Could you please help me...
Comment #3
jdanthinne commentedCan you both try the latest dev and tell me if the bug is still there (without using the custom path, of course)?
Is this happening with the default search block as well or only with the custom search blocks?
What is the url generated when you're launching a search?
@WSeb : are you also using the ?q= argument in your site (no clean urls)?
Comment #4
inteldesk commentedHave same problem, funny thing is, i just installed this on another site running 6.19 this is running 6.20 I was getting 404 AND an invalid argument foreach[]. I just installed the dev, and the flag is gone, but still gets 404. I am using ?q= argument.
Comment #5
inteldesk commentedI set the search form as an exposed block, and it also heads to 404. I disabled the search in themes config prior to activating the custom_search module
You are welcome to access my site and server to figure this out
Comment #6
carolaun commentedThanks a lot for all of your posts!
custom search path:
You find it here: http://www.yoursite.com/?q=admin/settings/custom_search
I added ?q=, so you get to the search site. This is without the original search keywords, of course, and the user has to search again.
url generated:
http://www.yoursite.com/search/node/vocabulary
As you can see, without custom path, the ?q= is missing.
classic search block & custom search block:
This is funny. I used the classic search block until now. It worked perfectly and you are able to see it, where it should be, with all the custom search settings. I tried now to swith to the custom search block, though, the block stays empty. You do not see any search form.
clean urls:
As this is a multisite, we do not use clean urls.
Monday I am back in company and can test the dev version.
As this problems occured by updating to the new version, I might switch back to the old custom search module.
Comment #7
carolaun commentedI just discovered, I can use the [key] function in custom search.
This is solving the whole problem!
find attached a screenshot, how to configure.
Comment #8
jdanthinne commentedPlease tell me if it's working as soon as you've tried the latest DEV version.
I've made changes to the redirection process since 1.6 (for multilingual sites), and I think there should be no more bugs with those changes.
I've tried myself without the clean urls, and it's working fine without the use of the custom search path.
Comment #9
damas commentedI have the same problem to.
Setting a custom search-path does help, a little , but renders some other errors:
Notice: Undefined index: all in search_config_form_alter() (line 164 of /customers/mysite.com/mysite.com/httpd.www/sites/all/modules/search_config/search_config.module).
Notice: Undefined index: produkt in search_config_form_alter() (line 171 of /customers/mysite.com/mysite.com/httpd.www/sites/all/modules/search_config/search_config.module).
Warning: Illegal offset type in isset or empty in locale() (line 652 of /customers/mysite.com/mysite.com/httpd.www/modules/locale/locale.module).
Recoverable fatal error: Object of class stdClass could not be converted to string in DatabaseStatementBase->execute() (line 2039 of /customers/mysite.com/mysite.com/httpd.www/includes/database/database.inc).
Any clues anyone?
/Tomas
Comment #10
jdanthinne commentedSetting a custom search path could be a workaround, but I'd prefer to find what's causing this bug first...
When you launch a search, what is the url it tries to go (and so leading to a 404)?
CAN you provide simple steps to reproduce the bug?
Comment #11
damas commentedI already tried the search path workaround, but no luck.
This is the url the launched search is trying to reach:
http://foobar.com/search/node/thisismysearchterm%20type:product
I don't know if there's something else causing this problem.
I tried to install Apache Solr search in a few weeks ago, but could'nt get it up and
run, and now I can't remove it..
Thanks for your patience.
Sincerly,
/Tomas
Comment #12
bastiansalmela commentedI'm running latest dev version and having the same 404 problem.
the search box seems to add "fi" on to the url.. this seems to be the language code, i'm running the site in finnish language.
so it tries to go: /fi/search/node/test
but that doesn't exist, correct would be /search/node/test
.b
Comment #13
jdanthinne commented@damas : do you use Clean urls? What should be the correct path?
@bastiansalmela : can you tell me what are your settings in Site configuration / Languages / Configure / Language negociation and in /admin/settings/language/edit/fi ? Multilingual sites are causing me a lot of headaches :-)
Comment #14
bastiansalmela commentedhmm, well, language settings for "fi" are pretty straight forward..
name "finnish", "suomi"
prefix "fi"
and from left to right.
i am not sure what you mean with the other settings.
english is other possible language, both are turned on, but finnish is default for site.
in "detection and selection" i havent touched anything. all the other boxes are turned off, except the lowest one "default".
let me know if there is anything else i can give you.
.b
Comment #15
RmrJmrGrl commentedThis fixed the issue for me. Will this be updated or is this "the fix"?
Comment #16
zuernbernhard commentedsame problem here site running in german, no possibility to fix it apart from deactivation custom_search :(
Comment #17
bastiansalmela commented@paulut:
well, i just commented out the line 399 in custom_search.module.. because we really only need one language and we are not using any prefixes.. so this is evil i know.
//if (count($languages) > 1) $base_redirect .= $GLOBALS['language']->prefix;
.b
Comment #18
Slug commentedThis has been an issue for me since 6.x-1.5, and it was driving me nuts. I thank carolaun for their post above as adding ?q=search/node/[key] into the custom search path has finally fixed my problem.
I am using IIS6 without clean urls.
Comment #19
jdanthinne commentedHi,
I've corrected once more my base url for multilingual and not-multilingual sites,
and pushed changes to DEV, for both 6.x and 7.x.
I've added support for sites without clean urls.
Please test & review.
Comment #20
Slug commentedHello jdanthinne
This latest dev has fixed my issue now. Works here without adding anything in the custom search path.
I'm using D6 on IIS6 without clean url's non multilingual site.
Thanks
Michael
Comment #21
cwyant commentedI'm experiencing this issue. I'm trying to add an external search path: http://wilmington.mvlc.org/opac/en-US/skin/default/xml/rresult.xml?rt=ke...|Library catalog
If I remove the http://, it saves. Otherwise I get this error:
Forbidden
You don't have permission to access /drupal/admin/config/search/custom_search on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I'm using the latest dev (July 11).
The redirect works on my local computer, but not on the server. ?
Comment #22
anouHello,
I've install and tried the custom search DEV version, but the bug still there. It's not fixed for my configuration ( has explained here : http://drupal.org/node/1208630 )
The URL generated is : http://my-domain.frhttp//my-domain.fr/search/node/test
I've got clean url on multilingual site.
The problems occurs only when custom search is enabled.
Comment #23
anouHad to change line 401, in sites/all/modules/custom_search/custom.search.module :
$base_redirect = $GLOBALS['base_root'] . url();by
$base_redirect = $GLOBALS['base_root'];to make it work.
Comment #24
jdanthinne commentedI've just pushed changes to DEV version, with a new way of generating the final URL (with the url() function only, not messing with base_root, etc.).
Please test and review (DEV will be available tomorrow), or use this patch : http://drupalcode.org/project/custom_search.git/patch/d9071f0 (D6) or http://drupalcode.org/project/custom_search.git/patch/c5e8bd6 (D7).
Comment #25
star-szrClosed #1536634: Multilingual site and submit search form as a duplicate of this issue. See also #1208630: Wrong redirect url on multilanguage site with language detection by domain.
Comment #26
heddnThis is an old issue. I'm marking it fixed but if you disagree, please update and provide additional information.