Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › WPML problem
This topic contains 10 replies, has 2 voices, and was last updated by splash94 5 years, 10 months ago.
- AuthorPosts
- October 6, 2017 at 10:36 am #15035
Hi, I’ve got a problem with wpml only on mobile view. If you go to italian for example and search “milano” then you click on the first suggested result it opens the driver page in russian. And the same if you do it in english. This happens only from mobile.
Can you help me?
ThanksOctober 6, 2017 at 10:51 am #15036Hi!
Sure! I believe this issue is related to one of the recent WPML versions, but I’m not sure yet what exactly it is. Basically the result link is missing one parameter, so the redirection is not fully correct.
The fix for now is really easy, but it needs a small custom code snippet. Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!
If you need help with this, just add temporary FTP access to the ticket, and I will do it for you.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 6, 2017 at 10:59 am #15037Thank you! I’ve added an if() for the english language too. All is working fine 🙂
October 9, 2017 at 10:09 am #15061Hi, another problem. Now if I write “Roma” on italian language the first suggestion goes 404 because the url is /it/it double time. I tried to delete your script and it’s ok but on mobile the problem exist.
How can you help me? Thanks a lotOctober 9, 2017 at 10:18 am #15062Hi!
What if you tried this variation:
This code checks if the URL is correct first, and fixes only if neccessary.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 9, 2017 at 10:21 am #15063Wonderful! It works, thanks! Will you implement it on your next update?
October 9, 2017 at 10:31 am #15064Unfortunately I don’t know what exactly the problem is, as only 2 people reported this bug, and it works in all other cases. This code I cannot put into the upgrade, but if you leave it in the functions file, it will work with the upcoming updates as well.
I will try to find the source of the problem, it might be a WPML option or some sort of configuration, and make sure to include a different, permanent fix 🙂
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
October 9, 2017 at 10:31 am #15065Fantastic, thanks 😉
November 11, 2017 at 1:56 pm #15466Hi, I get the same problem again.. Try to view the site in english and type “milan” for example, it opens the page in italian. From the smartphone it opens the page in russian.. Still problem with WPML?
ThanksNovember 13, 2017 at 7:46 am #15472Hi!
Could you try this modification?
I think this affects only the non-main language. I will contact the WPML support to see why the permalinks are not correct.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 13, 2017 at 9:05 am #15474Hi, thanks for quick fix. It seems to work now 🙂
- AuthorPosts
You must be logged in to reply to this topic.