Skip to content
Advertisement

Magento 2 Block template is working locally and doen’t on server

I’m new at Magento I created a new page to list some data that is coming from an API, and I used that a Block base on phtml template and I pass the data loaded from API to the block to list it. this code is working fine locally but when I deploy it to the server it crashes please help me.

here is my code

Constroller/Adminhtml/PickupRequest/Index.php

JavaScript

View/adminhtml/layout/companyshipping_pickuprequest_index.xml

JavaScript

View/adminhtml/templates/pickuprequests.phtml

JavaScript

Advertisement

Answer

Hello guys i found the problem, When i’m using windows it causes no problem cause windows is not key sensitive on the other hand the server is a linux machine that is key sensitive so when i’m using View/adminhtml/templates/pickuprequests.phtml with capital V it doesn’t find the template called and it doesn’t trigger any error.

all i had to do is change View to view and everything worked so well.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement