-
Notifications
You must be signed in to change notification settings - Fork 11k
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
[5.5.3] Please fix hard coded path in ExceptionHandler->renderHttpException() #21144
Comments
Isn't the previous issue enough? It is clearly mentioned that it isn't a bug. Stop creating new duplicates for no reason. |
It's definitely a bug, something that was working < 5.5 and not working in 5.5 this is a bug and is hard coded. Please fix it. Why the path is hard coded and not get from the view paths? Now nobody can create themes because someone decided that the error views must be in the resources folder and nowhere else. |
Sorry, but that is a "breaking change" and not necessarily a "bug". |
Aha it's not a bug it's future. haha Ok, just tell me why the path to errors is hard coded and not get from the view paths? Is this "breaking change" too? |
This PR will read the error views from the paths you define in your configuration file. |
This is not ok. If you set the path dynamicially this will not return all paths will return only config paths:
|
@themsaid please fix it like this: view()->getFinder()->getPaths() not like this config('view.paths') |
If multiple packages are having error views, how do we know which one will be loaded? |
Good question, but in Laravel < 5.5 the paths are extracted from the view finder not from config('view.paths'), and works just fine. Because if you set them dynamically they are not in the config('view.paths'). Maybe you need to discus this with your team. |
The behaviour didn't change between 5.4 and 5.5 |
Ok, but it's wrong. Please fix it. |
So it's not a bug or a breaking change but a feature request, your request is noted. Thanks. |
Ok, Thanks |
quick hack for dynamic set view paths for error pages: |
Description:
Hard coded path in Exception Handler renderHttpException
When additional path is added to view (let's say if we implements themes), the exception handler seeks the 404.blade.php in resources/errors folder, not in the themes folder, and this is hard coded.
Steps To Reproduce:
view()->addLocation(realpath(base_path('resources/views/themes' . '/' . 'mytheme')));
Please fix this:
`protected function renderHttpException(HttpException $e)
{
$status = $e->getStatusCode();
to this:
`protected function renderHttpException(HttpException $e)
{
$status = $e->getStatusCode();
If you don't fix these the all idea about themes is useless.
Overwriting renderHttpException is not a solution if you writing package.
This was working super in versions before 5.5
@themsaid please stop closing this.
The text was updated successfully, but these errors were encountered: