OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce Unable to find template on Azure

This topic contains 6 replies, has 4 voices, and was last updated by  Ayman Hussein 6 years, 5 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #32226

    Ayman Hussein
    Participant

    I have oro application on my localhost and it’s working well, but when I deployed it to Azure I got the following error even I am sure 100% the file in correct path I can confirm it’s there:

    Unable to find template “D:/home/site/wwwroot/vendor/oro/commerce/src/Oro/Bundle/ProductBundle/Resources/views/layouts/default/imports/oro_product_list/oro_product_list.html.twig” (looked into: D:\home\site\wwwroot\app/Resources/views, D:\home\site\wwwroot\vendor\symfony\symfony\src\Symfony\Bridge\Twig/Resources/views/Form, D:\home\site\wwwroot\vendor\knplabs\knp-menu\src\Knp\Menu/Resources/views).

    Could you please help me to fix this issue?

    Thanks.


    arh922

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #32227

    mmiasnikov
    Participant

    For the others, who, maybe stuck with the same case in Azure: @arh922 solved the problem by solved by deleting composer extension it seems made vendor folder access denied.

    #32228

    Ayman Hussein
    Participant

    Hi, Actually I encountered the issue again although I have deleted the composer.

    Unable to find template “D:/home/site/wwwroot/vendor/oro/commerce/src/Oro/Bundle/ProductBundle/Resources/views/layouts/default/imports/oro_product_list/oro_product_list.html.twig” (looked into: D:\home\site\wwwroot\app/Resources/views, D:\home\site\wwwroot\vendor\symfony\symfony\src\Symfony\Bridge\Twig/Resources/views/Form, D:\home\site\wwwroot\vendor\knplabs\knp-menu\src\Knp\Menu/Resources/views)

    Please advise!


    arh922

    #32229

    mlukaszewicz
    Participant

    Hi arh922,

    We are checking it, I’ll get back to you when we have answer.

    #32230

    dnahrebecki
    Moderator

    Hello arh922,

    could you please debug your application in following steps:
    – access dev mode
    – add breakpoint here https://github.com/twigphp/Twig/blob/2.x/lib/Twig/Loader/Filesystem.php#L196 with condition

    – you should see that Exception https://github.com/twigphp/Twig/blob/2.x/lib/Twig/Loader/Filesystem.php#L226 has been thrown (on my local env it also occurs)
    – Exception had been catched here https://github.com/symfony/twig-bundle/blob/2.8/Loader/FilesystemLoader.php#L79
    – parser and locator should find template and return it (on my local env it locates template properly)

    In your case last step doesn’t work, either parser didn’t parse path properly or locator couldn’t find it for some reason. Hard to say exactly why – keep in mind that also some cache related issues may occur (look at classes.php) or slashes/backslashes mismatch issue occurs.

    Regards,
    Daniel Nahrebecki

    #32231

    Ayman Hussein
    Participant

    Hi dnahrebecki.

    You are right the last step is not working well and it seems the issue in locator because the parser return it but the locator return null.

    So, what is the issue in locator?

    Thanks
    Ayman


    arh922

    #32232

    Ayman Hussein
    Participant

    Finally I fixed it,

    I found a critical bug in oro I think you should fixed it to run oro in windows not just in linux OSs

    in locator function when i print file_exists($name) in localhost returned 1 but in Azure (windows) returned 0(false)
    $name like this: D:home/site/wwwroot/vendor/oro/commerce/src/Oro/Bundle/ProductBundle/Resources/views/layouts/default/imports/oro_product_list/oro_product_list.html.twig you can notice no slash after ‘D:’ so the linux env. can handle it but windows can not handle it, I fixed it but add this line at top of function $name = str_replace(‘D:’, ‘D:/’, $name); but it think it is not correct way due to any update in vendors the fixed will go out.


    arh922

Viewing 6 replies - 1 through 6 (of 6 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

Back to top