Dominus77 / yii2-advanced-start

Yii2 Start Project Advanced Template
https://dominus77.github.io/yii2-advanced-start/
MIT License
23 stars 12 forks source link

Post Registration View File 404 #31

Closed zmoddynamics closed 4 years ago

zmoddynamics commented 4 years ago

Hello, after registering a user I receive this error message:

The view file does not exist: ../frontend/mail/layouts/html.php

It seems the view file html.php is located in common/mail/layouts/html.php ? Any idea what could be wrong?

zmoddynamics commented 4 years ago

Setting viewPath to '@common/mail' in mailer component config appears to resolve the issue? Curious as to why this isn't the default in your application ? 'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', 'viewPath' => '@common/mail', 'useFileTransport' => false, ... ]

Dominus77 commented 4 years ago

How did you initialize the application?

https://github.com/Dominus77/yii2-advanced-start/blob/master/environments/prod/common/config/main-local.php

https://github.com/Dominus77/yii2-advanced-start/blob/master/environments/dev/common/config/main-local.php

https://github.com/Dominus77/yii2-advanced-start/tree/master/common/mail/layouts

zmoddynamics commented 4 years ago

I initialized it under dev environment. Before doing so, I made my custom additions to /dev/common/config/main-local.php. I believe now that I may have accidentally deleted the ViewPath declaration when pasting. Thank you for your assistance.