I cannot create a new module in my shop


#1

Hello.
I am trying to create a new module in my shop. However, I use the generator that automatically creates the module and all the files needed, including the controller itself. The only thing that I have to do is register that controller in the YvesBootstrap.php by inserting "new HelloWorldControllerProvider($isSsl), " in the getControllerProviderStack method, but it doesn’t work. I did everything according to the spryker training video.
The error message contains the following:

YVES Exception

Error - Class ‘SprykerShop\Yves\HelloWorld\Plugin\Provider\HelloWorldControllerProvider’ not found

in /data/shop/development/current/src/Pyz/Yves/ShopApplication/YvesBootstrap.php (196)

Url: /hello-world

Trace:

#0 /data/shop/development/current/src/Pyz/Yves/ShopApplication/YvesBootstrap.php(158): Pyz\Yves\ShopApplication\YvesBootstrap->getControllerProviderStack(false)
#1 /data/shop/development/current/vendor/spryker-shop/shop-application/src/SprykerShop/Yves/ShopApplication/YvesBootstrap.php(38): Pyz\Yves\ShopApplication\YvesBootstrap->registerControllerProviders()
#2 /data/shop/development/current/public/Yves/index.php(21): SprykerShop\Yves\ShopApplication\YvesBootstrap->boot()
#3 {main}


#2

Hello,

It sounds like you might have forgotten to import the ControllerProvider in YvesBootstrap.php.

Did you import it by using the use statement in YvesBootstrap.php?
For example:

use Pyz\Yves\HelloWorld\Plugin\Provider\HelloWorldControllerProvider;

You will need to do so in order to register it.

Greetings,
Patrick


#3

I used the wrong path. I copied the SprykerShop… and forgot that it goes from Pyz. Thank you, you helped a lot