Digital experiences for all disciplines
New Landing › How can we help? › Atelier › Search page defaults to English
New Landing › How can we help? › Atelier › Search page defaults to English
- This topic has 32 replies, 2 voices, and was last updated 8 years by David Martin – Support.
-
Posted in: Atelier
-
November 20, 2016 at 9:51 am #302639
Hi Swiftideas,
I am using full page search on my multilingual site. When I enter a search string, it correctly finds stuff and shows them in the facy way the full page search does. However ….. some people enter a search string and then hit Enter out of habit … next it will always show the English search page usually with no results as it doesn’t find anything for the foreign language string entered. When selecting a different language when on that search page, the results do show up.
Obviously this isn’t very intuitive. The theme should stay in the language it was in when the search string was entered? Can this be fixed? Is there a workaround for this?
November 22, 2016 at 10:48 am #302934Hi,
What search string are you using to replicate this? I’d like to test this further?
Thanks.
November 22, 2016 at 4:07 pm #303023Hi David,
I guess you have the login from other communications right? ๐
Ok if I am in the Spanish language, open full screen search and then use the search term “bolsa” without hitting enter, the results will show in the fullscreen search window as expected. If I now hit ENTER (lots of people do already before the search results show on the fullscreen search), the site goes to
http://luc8k.niophoto.com/?s=bolsa
… which is the search results page in English .. without results of course. If I now switch to language back to Spanish the two results show up again because the url changes.The difference:
http://luc8k.niophoto.com/?s=bolsa
http://luc8k.niophoto.com/?lang=es&s=bolsa
Hope this helps. If not just let me know !
Cheers,
JohanNovember 24, 2016 at 11:35 am #303379Hi Johan,
I think we can patch this for you, please add your FTP details.
Thanks.
November 24, 2016 at 1:18 pm #303422This reply has been marked as private.November 25, 2016 at 6:34 pm #303749Hi johan,
Yes, I have now added the code to your child theme.
Please test this and let me know how it works for you. We can then add this to the core theme for the next update.
Code ref: https://gist.github.com/webadelic/750163d891aa05c607cdf86f59823500
Thanks.
November 25, 2016 at 7:56 pm #303774Hi David,
Just tested it and it doesn’t seem to work yet. When I follow the exact same steps as described above with the “Bolssa” term, I still end up at http://luc8k.niophoto.com/?s=bolsa …
I did assume that the code as found in the link you included was the same as I found in functions.php
Thanks, Johan
November 25, 2016 at 8:06 pm #303777Hi Johan,
Can you confirm it works if pressing the button:
But not if hitting Enter.
November 25, 2016 at 8:20 pm #303781Hi David,
Hah, yes I can confirm that. Now I hope you can also connect it the ENTER ๐
Btw, now I notice another issue on that overview … image thumbs not showing … they to in the base language … is that related?
Thanks,
JohanNovember 28, 2016 at 3:33 pm #303969Hi Johan,
Are those FTP details correct for http://luc8k.niophoto.com/ ?
I an having trouble getting my amended files to update on your server.
November 28, 2016 at 4:57 pm #304015Hi David,
They are. I just tested the details to make sure. http://ftp.niophoto.com will land you in the root of http://www.niophoto.com … the directory you should be looking for from there is /public_html/luc8k/wp-content/themes/atelier-child/
Can you try again?
Thanks,
JohanNovember 30, 2016 at 3:39 pm #304476Hi Johan,
Are you using a caching plugin or service such as CLoudflare? It seems I can make a couple of changes and then I cannot make anymore via FTP?
– David.
November 30, 2016 at 4:48 pm #304501Hi David,
Sorry for the inconvenience. I am not sure what is going on, as I don’t have the issue. No caching is active. The site sits on Bluehost Business Pro Cloud Hosting so things replicate to 4 global locations, but that shouldn’t be an issue for ftp …
As an alternative you could use WP File Manager. Ed installed that for fixing another issue. Alternatively I can include what you want included (assuming it is in functions.php).
I am working in theme options myself at the moment. Could that be the issue?
Let me know,
JohanDecember 1, 2016 at 9:45 pm #304818This reply has been marked as private.December 5, 2016 at 3:40 pm #305153I am not sure why, but using those details I cannot make any file changes. However – I have added the required JS via your theme options to get this sorted for you. Located: Theme Options => Custom JS:
jQuery(".ajax-search-form input[name=s]").keyup(function(e){ var code = e.which; if(code==32||code==13||code==188||code==186){ var url = jQuery(".all-results").attr("href"); if (url) { jQuery(location).attr('href', url); } } });
-
Posted in: Atelier
You must be logged in to reply to this topic.