WPML problem

This topic contains 10 replies, has 2 voices, and was last updated by splash94 splash94 5 years, 10 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #15035
    splash94
    splash94
    Participant

    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?
    Thanks

    #15036
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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 :)


    #15037
    splash94
    splash94
    Participant

    Thank you! I’ve added an if() for the english language too. All is working fine 🙂

    #15061
    splash94
    splash94
    Participant

    Hi, 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 lot

    #15062
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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 :)


    #15063
    splash94
    splash94
    Participant

    Wonderful! It works, thanks! Will you implement it on your next update?

    #15064
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Unfortunately 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 :)


    #15065
    splash94
    splash94
    Participant

    Fantastic, thanks 😉

    #15466
    splash94
    splash94
    Participant

    Hi, 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?
    Thanks

    #15472
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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 :)


    #15474
    splash94
    splash94
    Participant

    Hi, thanks for quick fix. It seems to work now 🙂

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.