This article provides a patch for the known Magento Commerce Cloud 2.2.2 issue related to the failure to load checkout pages caused by uBlock or other ad blockers.
If Google Analytics is enabled for the store, when a customer with installed uBlock or other ad blocker proceeds to checkout, the
trackingCode.js file is blocked from loading and RequireJS breaks the JS execution flow. This causes problems with loading the checkout page.
Steps to reproduce:
Prerequisites: An ad blocker must be installed and active in browser.
- In the Magento Admin, enable and configure the Google Analytics functionality.
- Open a product page on the store front.
- Add products to cart.
- Click the Go to Checkout link.
Checkout page loads and a customer can complete checkout.
Checkout page does not load, the loading spinner never disappears.
The patch is attached to this article. To download it, scroll down to the end of the article and click the file name, or click the following link:
Compatible Magento versions:
The patch was created for:
- Magento Commerce Cloud 2.2.2
The patch is also compatible (but might not solve the issue) with the following Magento versions and editions:
- Magento Commerce Cloud from 2.1.0 to 2.14
- Magento Commerce Cloud 2.2.0
- Magento Commerce Cloud 2.2.1
- Magento Commerce Cloud from 2.2.3 to 2.2.5
- Magento Commerce from 2.1.0 to 2.14
- Magento Commerce 2.2.0
- Magento Commerce 2.2.1
- Magento Commerce from 2.2.3 to 2.2.5
How to apply the patch
We strongly recommend applying and testing the patch on the Integration/Staging environment, before applying it Production. We also recommend to have a recent backup before any manipulations.
How to apply this patch for Magento Commerce Cloud
- If you do not have a directory named
m2-hotfixesin the project root, please create one.
- Copy the
MDVA-9353_EE_2.2.2_v1.composer.patchfile to the
Add, commit, and push your code changes:
git add -A && git commit -m "Apply MDVA-9353_EE_2.2.2_v1.composer.patch patch" && git push origin
How to apply this patch for Magento Commerce
- Upload the patch to your Magento root directory.
- Run the following SSH command:
(If the above command does not work, try using
patch -p1 < MDVA-9353_EE_2.2.2_v1.composer.patch
- For the changes to be reflected, refresh the cache in the Admin under System > Cache Management.