1

I have followed exactly this to create module, but module is redirecting at 404. When I run command php bin/magento module:enable Tutorial_Example

Unknown module(s): 'Tutorial_Example'

This error is shown in terminal, I think this is the reason for 404 redirection.

Can anyone please help.

2
  • which version are u using ? Commented Apr 14, 2016 at 7:07
  • use command php bin/magento setup:upgrade Commented Apr 14, 2016 at 7:15

1 Answer 1

1

The tutorial you have followed is out of date. They introduced a registration.php file that you need to include in the app/code/[Vendor]/[ModuleName]/ directory.

It looks like below code:

<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    '[Vendor]_[ModuleName]',
    __DIR__
);

Here is another tutorial that should help you get the module up and running at least.

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