How to apply Magento Enterprise Cloud (ECE) patch for Pearl Theme
Before you commit any files to Github please copy the content of 'Patches/Enterprise Cloud Edition (ECE) patch' into the root of your EE Magento installation.
After patch files are copied, on UNIX / MAC OS systems run the pearl_cloud_setups.sh script using this command in the CLI in the root of your project, where your copied the files:
Once ECE script is executed you should receive the message "DONE" in your CLI.
Important: This shell script needs to be executed before you add theme files to your ECE environment.
In order to make sure that patch was successfully applied you can verify that symlinks were created at these locations; 'css' should be a symlink/alias and not a directory:
Pearl Theme code is now ready to be committed to Github and deployed on your ECE environment. Commit the code to your ECE repository. ECE should automatically deploy the code to the environment coresponding to the git repository wherethe code was comitted.
Note: If you still getting the 'path is not writable' errors when saving admin options, it means the ECE patch was not succesfully applied. Make sure you are running the script pearl_cloud_setups.sh on UNIX OS in the root of your project before committing the files to your ECE Github repository.
Details about how this patch works:
In ECE environments a write limitation is encountered when generating theme LESS files based on theme admin options, as ECE environments are read-only we cannot generate dynamic LESS files inside the theme modules. Because of this reason in this patch we changed default location of LESS files from 'app/code/WeltPixel' (read-only) to 'pub/media/css_weltpixel' (read / write).
When the pearl_cloud_setups.sh shell script is executed, it removes the css directories under non writable location 'app/code/WeltPixel/...' and creates symlinks to 'pub/media/css_weltpixel/MODULE_NAME/css directories' (as these are writable on the cloud as well.)
ECE patch also contains the initial module less files for 5 modules where we generate less on the fly. (CategoryPage, CustomHeader, FrontendOptions, ProductPage, QuickCart).
Once patch is applied, you should not encounter any LESS file generation restrictions when saving Pearl Theme options in your ECE environment.
Q: Can I apply the patch after I committed Pearl Theme code to Github?
A: Yes, apply the patch and recommit the code again.