Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errorTemplatePrefix not being applied #5059

Open
pnpaes opened this issue Oct 6, 2019 · 1 comment

Comments

@pnpaes
Copy link

commented Oct 6, 2019

I added errorTemplatePrefix to the general.php but it is not overwriting the default behavior.

Steps to reproduce

general.php:
'errorTemplatePrefix' => "_tm/errors/",

404.twig location:
/templates/_tm/errors/404.twig

If I access an inexisting url:
HTTP 404 – Not Found – yii\web\NotFoundHttpException
Template not found: dsfsfsdf
1. in /Users/pauloniciolipaes/Documents/WORK/Ticketmaster/DEV/tracking_manager_craft/vendor/craftcms/cms/src/controllers/TemplatesController.phpat line 93

If I move the 404.twig the template root folder (/templates/404.twig) then it works even though errorTemplatePrefix is set to point to a different location

Additional info

PHP version 7.3.9
OS version Darwin 18.6.0
Database driver & version MySQL 5.7.27
Image driver & version GD 7.3.9
Craft edition & version Craft Pro 3.3.7
Yii version 2.0.21
Twig version 2.11.3
Guzzle version 6.3.3
Imagine version 1.2.3-dev

@brandonkelly

This comment has been minimized.

Copy link
Member

commented Oct 8, 2019

Is that the extended error view?

Extended error view that is shown when Dev Mode is enabled

If so, it’s expected that you would see that instead of your custom 404 template, if Dev Mode is enabled (devMode in config/general.php) or if your user account has the Show full exception views when Dev Mode is disabled preference enabled and you’re currently logged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.