MSM URL paths using auto_path
I am using Low Search with EE MSM. On the results page, if a channel entry from another site is found it is not returning the user to the correct site using auto_path. Is there a specific way this should be handled?
For example on site 2, I search and find an entry from site 1. Within the settings of the channel on site 1, the search results URL is http://site1.example.com. However, the search results on site 2 are rendering the auto_path as htttp://site2.example.com.
Replies
Low 4 Oct 2017 09:28
Per channel in each site that are part of the search results, you should check the "Search results, URL location of search results for this channel." setting. Each of those values should point to the correct domain -- it's what LS (and the native search module) uses to compose those search result URLs.
Kari-Lyn Henkel 4 Oct 2017 12:05
Yes, and I have these setup with the correct URLs but it is still pulling site2 URL, the site the search was conducted on, instead of site1 URL, the site where the entry exists.
Low 5 Oct 2017 07:18
I'll need to take a look myself. Please send SuperAdmin login credentials to hi at gotolow dot com if you can.
Low 10 Oct 2017 09:01
Okay, the search results tag is quite elaborate, so it's easy to overlook things. As far as I can tell, you're using both {url_title_path='group/template'} as {auto_path}.
The former will resolve to the current site, the latter will point to the site the entry belongs to.
So some entries point to the right site at the moment, and some don't, because it uses the {url_title_path=''} variable rather than the {auto_path} one.
If you review the template and make sure the {auto_path} var is used everywhere, and that the Search Results URL in the channel's settings points to the correct URL, template group and template, you should be good.
Kari-Lyn Henkel 10 Oct 2017 20:26
If you look at the grace_downtown site and the template search/results, this entire template uses auto_path as the others are commented out. This is where I have been testing.
Low 10 Oct 2017 20:36
Looking at that same template, the entries belonging to the channels 'news_manager', 'events_manager' and 'sermon_manager' all use {url_title_path} and will point to the active site. I've added a second title to the latter channel, using {auto_path} and the difference is shown there.
Other entries do use the {auto_path} var -- a search for "ministries" on the 'grace' subdomain gives me 1 result back from the 'downtown' site, pointing to the correct domain.
Kari-Lyn Henkel 10 Oct 2017 21:21
This resolves it thank you for your patience.