1. SP Page Builder 3.x
  2. Friday, 08 March 2019
Hi chaps - I really hope you can assist me with this because I've been all over the place to try and find a solution.

To cut a long story short, I am trying to embed a number of 3rd party booking calendars into a new site that I'm building.

The calendars work fine when embedded within an article. However, when I add it to SP Page Builder either as RAW HTML code or via a custom module I am getting the following error:

Access to XMLHttpRequest at 'https://westlakesadventure.anytimebooking.eu/category/listAllActive/1/NaN/?_=1552041970711' from origin 'http://www.tourismweb.co.uk' has been blocked by CORS policy: Request header field x-csrf-token is not allowed by Access-Control-Allow-Headers in preflight response.

Here is the broken calendar with Page Builder:
Titlehttp://www.tourismweb.co.uk/WLA/book-now


Here is the calendar working in an article in Joomla:
Titlehttp://www.tourismweb.co.uk/WLA/accommodation/group-accommodation

The problem is that I need to include the calendars within varying places within Page Builder pages so the article solution isn't going to work for me.

I've added the following to my .htaccess

<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>

I've been in touch with the hosts and also the booking calendar developers and they are telling me the preflight request is not a feature of their widget and the xcsrf token is not their token. They also said it looks as if your CMS is adding this to the request as well as appending a query (timestamp) to the end of the Url which again is not something in our making.

In terms of settings:
SP Page Builder Pro 3.4.4
Joomla 3.9.3
PHP 7.2

I really hope you will be able to find a workaround for me? I can happily PM access details to the administator and FTP.

Cheers,
Mike
Accepted Answer
Responses (8)
Hi Guys,

Solution is to comment out the code that cause the error. You should comment out the following lines in the following files:

/components/com_sppagebuilder/sppagebuilder.php: line 23
/components/com_sppagebuilder/controllers/page.php: line 24
/components/com_sppagebuilder/addons/ajax_contact/site.php: line 17
/components/com_sppagebuilder/addons/form_builder/site.php: line 18

This will stop the issue. Mark that with every update to a newer version you will have to do the same.

Best regards,
Peter
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 1
Do we have an answer to this issue yet? I have the same problem with a 3rd party form which does not work in any pagebuilder page but works fine on all the other pages of my website. I have the same error as above. Please respond.


The only work-around till now is to downgrade to SP Pagebuilder 3.1.1. (In my case).

Best regards,
Peter
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 2
I am also waiting for a solution to this issue
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 3
Any news on this very long lasting issue please?

Thank you.

Kind regards,
Peter
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 4
I have same problem also, for long time. Still not solved. You will not have the problem using SPPB (pro) 3.1.1. All the versions later then this will throw the problem. (in my case). So, until now I am stuck with SPPPBpro 3.1.1. on my clients website, which is not good. :(

Peter
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 5
Do we have an answer to this issue yet? I have the same problem with a 3rd party form which does not work in any pagebuilder page but works fine on all the other pages of my website. I have the same error as above. Please respond.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 6
Just a quick follow up from the booking calendar developers.

They said their apache2 vhosts already have Header set Access-Control-Allow-Origin set which accepts from any other domain elsewhere on the web using the verbs GET or POST.

The issue is the preflight being created which contains the options verb which they don't support.

I'm really hoping we can find a workaround for this preflight issue.
  1. more than a month ago
  2. SP Page Builder 3.x
  3. # 7


There are no replies made for this post yet.
Be one of the first to reply to this post!


This forum is archived

This forum has been archived. Please use JoomShaper official support system.