1

I have just created a "HelloWord" module and I just tested it on many systems but its not working on a particular system with XAMPP (PHP 5.5, MySQL 5.6.24) and Ubuntu 14.04 LTS running. 5. Here is the package: https://dl.dropboxusercontent.com/u/98186464/Amin.rar

What should I check or config in PHP or Apache or Ubuntu to get it work ? The strange thing is that Magento 2 is running and working in this particular systems but only my simple HelloWorld module is not working properly (it doesn't load the layout in /helloworld/index/index controller, and simply just shows the title "Amin Helloworld", but the layout is not loaded at all)

1

1 Answer 1

1

In your layout app/code/Amin/HelloWorld/view/frontend/layout/helloworld_index_index.xml, Amin\HelloWorld\Block\HelloWorld changes to Amin\HelloWorld\Block\Helloworld (Helloworld has all lower-case letters). And try to rename the view folder app/code/Amin/HelloWorld/view to lower case also.

Remember that Magento loads the name of classes with case sensitivity. If we have some troubles when creating a simple module, please check our file structure, naming (including case sensitivity).

2
  • I have done that also and then hit this command: php -f bin/magento setup:upgrade but still don't see any difference in the output! Commented Apr 25, 2016 at 11:08
  • Try to rename the view folder app/code/Amin/HelloWorld/view to lower case also. Commented Apr 25, 2016 at 11:19

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.