0

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
  • Can you double check if the /var/www/html/app/code/Abc/PoNumber/view/adminhtml/templates/order\create\form\po_number.phtml file actually exist on the staging environment ? Also verify the permissions on your module files and directories.
    – Cladiuss
    Commented Jun 29, 2023 at 19:53

1 Answer 1

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
1
  • 1
    I completely missed that, thank you @Ronak !!! It saves my day Commented Jun 30, 2023 at 5:13

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.