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

agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)

An actual redirect? As in, you go from one.example.com/search to example.com/search?

What module are you using for search?

escuriola’s picture

I use the optional core search module

agentrickard’s picture

Ok, can you please answer the first question, too.

An actual redirect? As in, you go from one.example.com/search to example.com/search?

teinedraig’s picture

Hi,

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.

teinedraig’s picture

I 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;

agentrickard’s picture

That 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.

nonsie’s picture

Also, do you have any other modules enabled that would cause this redirect?

teinedraig’s picture

Okay,

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.

agentrickard’s picture

You've got something else interfering, then. Other uses of custom_url_rewrite_* ? Other modules that issue redirects? Inactive domains?

teinedraig’s picture

I 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.

krisd’s picture

I'm having the same problem.
I searched my installed modules folders, and none of these use custom_url_rewrite.

agentrickard’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)