ajax search pro and weglot

Home Forums Product Support Forums Ajax Search Pro for WordPress Support ajax search pro and weglot

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 1 year, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #41802
    ChrisOrtiz
    ChrisOrtiz
    Participant

    I have a problem with the ajax search pro plugin and weglot because in the home page when I change the language, for example to spanish, I do a search and the result is still shown in english, and I have a new page with the same section and there it translates everything in any language.

    #41824
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thanks for the details. I must note that officially only WPML and Polylang are supported, but in this case I believe Weglot could work, as the issue is probably not related to it.

    There seems to be a server side mod_rewrite redirection which removes the translate tag from the URL completely, whenever the plugin makes a request. The request is automatically redirected to the wrong URL.

    For example, if you try this URL:

    https://americanos.ca/pt/?asp_ls=&asp_active=1&asp_force_reset_pagination=1&p_asid=3&p_asp_data=1&termset[product_cat][]=26&aspf[region-cat__2]=Alberta&filters_initial=0&filters_changed=0&qtranslate_lang=0&woo_currency=CAD&current_page_id=8

    ..it is redirected to this:

    https://americanos.ca/?asp_ls&asp_active=1&asp_force_reset_pagination=1&p_asid=3&p_asp_data=1&termset%5Bproduct_cat%5D%5B0%5D=26&aspf%5Bregion-cat__2%5D=Alberta&filters_initial=0&filters_changed=0&qtranslate_lang=0&woo_currency=CAD&current_page_id=8

    And this is sort of an encoded version, but it has the /pt/ language tag removed as well.
    The issue is caused by this 301 redirect rule with URL encoding. I suggest checking your .htaccess file to see if there is a redirect rule in relation with these types of URLs.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #41930
    ChrisOrtiz
    ChrisOrtiz
    Participant

    Checking my htaccess I don’t have any rule to remove the translation of that section, any solution?

    #41938
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I did not mean removing the translation. I mean, that the server redirects back automatically to the english version, whenever you visit the page with any query arguments, like so.
    Try visting https://americanos.ca/pt/?xy=
    it will automatically redirect to the english version: https://americanos.ca/?xy=
    The server removes the “/pt/” URL part. That is either done via htaccess mod_rewrite, or via custom rewrite rules somewhere in a custom code.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

You must be logged in to reply to this topic.