Home Forums Basel support forum AJAX/CORS Issue

AJAX/CORS Issue

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

    customesports
    Participant

    Hi,

    We’re getting this error: Access to XMLHttpRequest at ‘https://customesports.com/wp-admin/admin-ajax.php?nocache=427476’ from origin ‘https://www.customesports.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

    This is blocking one of our plugins ( https://codecanyon.net/item/woocommerce-upload-files/11442983 ) from loading the add to basket button.

    We’ve had issues with AJAX before on this theme. The AJAX add to cart doesn’t work properly.

    We’ve tried to add in the CORS header to allow these requests from both the specific non www domain and from all domains. However, this hasn’t worked.

    We’ve contacted the plugin developers and they’ve said it’s not their plugin that’s the issue. We’ve contacted our hosts and they’ve said there’s nothing that could be causing this on their end.

    To replicate the error go to a product page and select a size from the drop down, you’ll have the add to cart button be replaced by Loading text. The website then gets stuck on this. You can see the error come up after the Loading text in the dev tools console.

    Could you let us know how to fix this?

    Thanks,
    Adam

    #112891

    Artem Temos
    Keymaster

    Hello,

    Could you please check how it works with some default WordPress theme like twentysixteen to understand is it our theme issue or not?

    Regards

    #112916

    customesports
    Participant

    It’s still happening on the other theme. What could be causing it?

    #112939

    Artem Temos
    Keymaster

    In most cases, CORS errors should be fixed from the server side. We don’t have other solutions for this.

Tagged: ,

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