How to override pub/error folder in my module for magento 2 cloud ?

I want override pub/errors folders in my module for magento 2 cloud enterprise edition.

I tried following method

  1. Copy pub/errors/local.xml.sample to pub/errors/local.xml

  2. Then made a copy of pub/errors/default (let's say pub/errors/custom).

Changed the skin value of the pub/errors/local.xml to the newly created errors skin:

<config>
    <skin>custom</skin>
    ....

But cloud is not allowing me to mkdir create directory over there.

Any solution for cloud enterprise edition ?

up vote 1 down vote accepted

You can copy your files on build phase during composer install from your module to some destination.

Just create a mapping in composer.json of your module.

More information https://github.com/magento/magento-composer-installer

  • Thanks for the answer +1 for that, but this issue is regarding Magento cloud enterprise edition. – Aditya Shah Oct 8 at 13:53
  • @AdityaShah on the build phase FS is writable and this approach helps you. on the deploy phase FS is read-only, and you can write only into app/etc, pub/static, pub/media, var As an option, you can add the directory pub/errors to git – BaDos Oct 10 at 6:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.