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.

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

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.