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.

  • 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
    Jun 29 at 19:53

1 Answer 1


i can see that it is slash issue, You are missing the slash in you phtml file, please change from



  • 1
    I completely missed that, thank you @Ronak !!! It saves my day Jun 30 at 5:13

Your Answer

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

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