I have created new module in Magento 2.4.5-p1, the functionality work in the local environment, but when I add the module in the staging environment, I am facing this error in system.log.
CRITICAL: Exception: Warning: include(/var/www/html/app/code/Abc/PoNumber/view/adminhtml/templates/order\create\form\po_number.phtml): Failed to open stream: No such file or directory in /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php on line 71 in /var/www/html/vendor/magento/framework/App/ErrorHandler.php:62
Any idea how to resolve this error, I have already tried setup:upgrade and di compile multiple times, but the error still exists.
1 Answer 1
i can see that it is slash issue, You are missing the slash in you phtml file, please change from
/var/www/html/app/code/Abc/PoNumber/view/adminhtml/templates/order\create\form\po_number.phtml
to
/var/www/html/app/code/Abc/PoNumber/view/adminhtml/templates/order/create/form/po_number.phtml
- 
 1I completely missed that, thank you @Ronak !!! It saves my dayMitul Vadalia– Mitul Vadalia2023年06月30日 05:13:53 +00:00Commented Jun 30, 2023 at 5:13
Explore related questions
See similar questions with these tags.
/var/www/html/app/code/Abc/PoNumber/view/adminhtml/templates/order\create\form\po_number.phtmlfile actually exist on the staging environment ? Also verify the permissions on your module files and directories.