Hello all.
I have a problem with search and domain access module. I don't know why when I try to search something from one domain, always redirect me to the default domain before display the results.
I've tried different configurations, but always the same.
Any idea?
Thanks in advance.
Comments
Comment #1
agentrickardAn actual redirect? As in, you go from one.example.com/search to example.com/search?
What module are you using for search?
Comment #2
escuriola commentedI use the optional core search module
Comment #3
agentrickardOk, can you please answer the first question, too.
An actual redirect? As in, you go from one.example.com/search to example.com/search?
Comment #4
teinedraig commentedHi,
I am having this problem too - it does this with search and also with some of the admin functions. I hit save or search and I end up at the root domain and with a 0 search result.
Comment #5
teinedraig commentedI managed to fix this (inelegantly for now - will fix it better later) by adding the following code to search_form_submit()
$domain = domain_get_domain();
$form_state['redirect'] = 'http://'.$domain['subdomain'].'/search/'. $type .'/'. $keys;
Comment #6
agentrickardThat hack should not be necessary and I have never seen this behavior before.
If you turn the strict SEO handling on, DA rewrites the $form['action'] to be from the domain where the form is being submitted. So check to see if that value is correct in the rendered HTML.
Comment #7
nonsieAlso, do you have any other modules enabled that would cause this redirect?
Comment #8
teinedraig commentedOkay,
I checked and strict SEO was on, took out my hack and the html had the following (which is the correct domain):
form action="htt p://elendarhh.ennyn.com/search/node" accept-charset="UTF-8" method="post" id="search-form" class="search-form"
On submit the search result form that appears is ht tp://ennyn.com/search/node/today
I did have Domain Advanced turned on so I unistalled that but the same results. Even the search results end up with the wrong domain link and are unviewable.
Comment #9
agentrickardYou've got something else interfering, then. Other uses of custom_url_rewrite_* ? Other modules that issue redirects? Inactive domains?
Comment #10
teinedraig commentedI uninstalled all modules for my site (so down to bare bones), then slowly built them back up and it all works now. Very odd as something was obviously conflicting at some stage. I was using freelinking and domain access advanced and I have only turned on freeliniking for now.
Could it have been DAA? I will play a bit more and see.
Comment #11
krisd commentedI'm having the same problem.
I searched my installed modules folders, and none of these use custom_url_rewrite.
Comment #12
agentrickard