0

I had created a custom theme and copied the attribute.phtml from the vendor to my custom theme. I am getting an error like this?

Exception #0 (Exception): Warning: include(/var/www/html/vendor/magento/module-catalog/view/frontend/templates/product/view/attribute.phtml): failed to open stream: Permission denied in /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php on line 71

Can anyone help me to solve this?

1 Answer 1

0

I can help you how to edit this core file in your theme, it might be possible that you have made some mistakes while overriding the file path. I tried this thing and it is working well for me, steps are as below ::

step 1:: add your custome theme in the app/design folder

step 2 :: in your theme (Package/Theme) add Magento_Catalog/templates/product/view/attribute.phtml

step 3:: copy the core file attribute.phtml in your theme and then you can add changes that you want in that file

step 4:: assign that theme from the admin panel (content>Configuration) to your website

and then changes will be reflected in your storefront!

-->>>>if you get your answer or any help, so please mark or make usefull this answer, if you can that would be helpful for me, thank you :)

5
  • Hello, After copying attribute.phtml from the vendor directory to theme directory. This problem occurs for me. Exception #0 (Exception): Warning: include(/var/www/html/vendor/magento/module-catalog/view/frontend/templates/product/view/attribute.phtml): failed to open stream: Permission denied in /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php on line 71 Nov 9, 2021 at 16:49
  • have you run the permission command :: sudo chmod -R 777 var/ pub/ generated/ Nov 10, 2021 at 4:11
  • No I didn't..because chmod 777 was not recommended to use right? Nov 11, 2021 at 9:18
  • the error show permission denied that's why! Nov 11, 2021 at 10:57
  • I tried this command also.. sudo chmod -R 777 var/ pub/ generated/! Not working Nov 11, 2021 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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