Magento Cloudflare Checkout Buttons Broken

I recently configured Cloudflare for a client and the performance results were indeed promising. On a very first view, it looks like a well developed product with interesting features. We came across a major checkout issue though. In some browsers, the buttons in the checkout did not work – hence, many people could not order. It was hard to debug as I could not reproduce the issue in the first place, but I finally managed to find the root cause.

The issue was basically a JavaScript compatibility issue between Cloudflare’s beta Rocket Loader and BillPay. Cloudflare’s Rocket Loader IS marked as beta, so issues are acceptable. The Rocket Loader basically improves the JavaScript performance by loading JS asynchronously and caching scripts locally. The asynchronous loading is a require-js-ish approach and is basically incompatible with require.js. However, BillPay uses require.js in the checkout. Hence, the scripts interfere with each other and somehow break the checkout.

My solution was simply to create a page rule in Cloudflare and disable the Rocket Loader for all pages like https://www.domain.tld/checkout/onepage/*. This is probably a good idea anyway since it disables a beta feature on the very critical checkout pages.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.