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
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 :)
-
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 71Premkumar Suresh– Premkumar Suresh2021年11月09日 16:49:45 +00:00Commented Nov 9, 2021 at 16:49
-
have you run the permission command :: sudo chmod -R 777 var/ pub/ generated/Ekta Rathod– Ekta Rathod2021年11月10日 04:11:34 +00:00Commented Nov 10, 2021 at 4:11
-
No I didn't..because chmod 777 was not recommended to use right?Premkumar Suresh– Premkumar Suresh2021年11月11日 09:18:37 +00:00Commented Nov 11, 2021 at 9:18
-
the error show permission denied that's why!Ekta Rathod– Ekta Rathod2021年11月11日 10:57:29 +00:00Commented Nov 11, 2021 at 10:57
-
I tried this command also.. sudo chmod -R 777 var/ pub/ generated/! Not workingPremkumar Suresh– Premkumar Suresh2021年11月11日 11:31:52 +00:00Commented Nov 11, 2021 at 11:31