modules, where i should place ErrorPresenter?

thcom
Backer | 94
+
0
-

Hi i succesfully use modules in my app

app/Modules/Admin
app/Modules/Front

but have problem with ErrorPresenter

[2021–08–18 10–15–03] Nette\Application\UI\InvalidLinkException: Cannot load presenter ‘Error’, class ‘App\Modules\Presenters\ErrorPresenter’ was not found. in /data/web/virtuals/XXX/virtual/www/domains/XXX.cz/vendor/nette/application/src/Application/UI/Presenter.php:805 caused by Nette\Application\InvalidPresenterException: Cannot load presenter ‘Error’, class ‘App\Modules\Presenters\ErrorPresenter’ was not found. in /data/web/virtuals/XXX/virtual/www/domains/XXX.cz/vendor/nette/application/src/Application/PresenterFactory.php:69 @ https://www.XXX.cz/ @@ exception–2021–08–18–08–55–6b724cc40b.html

may be there is an issue ?

`application:
errorPresenter: Error
mapping:
*: App\Modules*\Presenters*Presenter
# *: App*Module\Presenters*Presenter
`

thank you !

Last edited by thcom (2021-08-28 14:04)

Spectator
Member | 48
+
0
-

Hi,

you can use standard mapping

application:
 errorPresenter: Error
 mapping:
  *: App\Modules\*Module\Presenters\*Presenter

and place ErrorPresenter into app/Modules/Default with namespace App\Modules\Presenters\ErrorPresenter

thcom
Backer | 94
+
0
-

thank you I try rearange may app like you describe

but now i get anotjer error :/

[2021-09-02 15-36-32] Nette\Application\InvalidPresenterException: Cannot load presenter 'Error', class 'App\Modules\Presenters\ErrorPresenter' was not found. in /data/web/virtuals/248874/virtual/www/domains/XXX.cz/vendor/nette/application/src/Application/PresenterFactory.php:69 @ https://XXX.cz/aaa @@ exception--2021-09-02--15-36--0aa10d88de.html