Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #300853

    I can get ajax results in my main language http://fiberreed.de/ but nothing with my second language http://fiberreed.com/

    #300932

    Hey maratino!

    Thank you for using Enfold.

    I was able to do a search on the english version of the site. I type in “sax” on the search field and the first result is “Fiberreed HEMP Soprano Saxophone”. I tried it again on the deutsche version using the same search characters, the first result is “Fiberreed HEMP Sopransaxophon”.

    Best regards,
    Ismael

    #300973

    This seems to happen in Chrome only and now i see an error:
    XMLHttpRequest cannot load https://fiberreed.de/wp-admin/admin-ajax.php?lang=en. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://fiberreed.com’ is therefore not allowed access.

    #301762

    Hi!

    Yes, unfortunately ajax requests are not allowed across different domains (i.e. from http://fiberreed.de/ to http://fiberreed.com/ or vice versa). Afaik you can solve this with CORS: http://www.d-mueller.de/blog/cross-domain-ajax-guide/ but implementing such a solution is beyond the scope of our support forum. You can try to contact the WPML support staff – maybe they can provide a solution. Otherwise I recommend to deactivate the ajax search feature on the website with following code (insert it into the functions.php file):

    
    add_filter('avf_frontend_search_form_param', 'avia_deactivate_ajax_search',10,1);
    function avia_deactivate_ajax_search($params)
    {
    	$params['ajax_disable'] = true;
    	return $params;
    }
    

    You could also change the url of the English website from http://fiberreed.com/ to http://fiberreed.de/en/ which would also solve the problem because the domain ( http://fiberreed.de/ ) is the same.

    Best regards,
    Peter

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.