2

I am getting this error on my live site as production mode and I uploaded only two custom module and js and css and two overwrite file in our theme.Below share error as warning showing I apply all command upgrad ,deploy,flush,reindex.

"Warning: include(/home/andrew/public_html/XXXXX.co.uk/var/view_preprocessed/pub/static/vendor/magento/module-theme/view/base/templates/root.phtml): failed to open stream: No such file or directory in /home/andrew/public_html/XXXXX.co.uk/vendor/magento/framework/View/Result/Page.php on line 327"

1

Please try by giving 777 permission to generated and var folder

Try after Removing generated folder and var/cahe var/di and var/page_cache and var/view_processed and try it .

Will be better if you try on local first instead of directly on live.

  • Thanks for reply but some changes uploading on live site so getting this error . – Rv Singh May 15 at 7:28
  • Hmm you may check there or may take a complete dump on local and generate there, or may on a staging if u have – Narendra Vyas May 15 at 7:36
1

Please follow these steps.

  1. Change to your Magento Directory

  2. find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +

  3. find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +

  4. sudo chown -R <Magento User>:<web server group> .

  5. chmod u+x bin/magento

  6. Once permission is set deploy your files as Magento user, as this will create the static files without any issue.

    php bin/magento setup:static-content:deploy

Hope this will solve your problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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