This article provides a patch for the known Magento Commerce Cloud 2.2.3 issue related to getting the "Area code is not set" error when running the
When running the
bin/magento setup:upgrade command, you get the following error message: "Module 'Magento_AdvancedSalesRule': Installing data...Area code not set: Area code must be set before starting a session" and the command execution is interrupted. The issue appears because area configuration is requested before it is actually set. The patch allows catching the error and not interrupting the upgrade process.
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.3
The patch is also compatible (but might not solve the issue) with the following Magento versions and editions:
- Magento Commerce Cloud, Magento Commerce
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-10439_EE_2.2.3_COMPOSER_v1.patchfile(s) to the
Add, commit, and push your code changes:
git add -A && git commit -m "Apply MDVA-10439_EE_2.2.3_COMPOSER_v1 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-10439_EE_2.2.3_COMPOSER_v1.patch
- For the changes to be reflected, refresh the cache in the Admin under System > Cache Management.