8000 New exception pages don't work when WebProfilerBundle is not installed · Issue #22631 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

New exception pages don't work when WebProfilerBundle is not installed #22631

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

Closed
javiereguiluz opened this issue May 4, 2017 · 3 comments
Closed

Comments

@javiereguiluz
Copy link
Member
Q A
Bug report? yes
Feature request? no
BC Break report? no
Symfony version 3.3

I was playing with Symfony Flex when I noticed this:


Create a project with Symfony Flex:

$ composer create-project symfony/skeleton:3.3.x-dev my_project/
$ cd my_project/
$ make serve

Browse http://localhost:8000/

Problem 1: I still see the old exception page design ... because TwigBundle is not installed. I'll propose a solution for this in a separate issue.


Install TwigBundle:

$ composer req twig-bundle

Browse http://localhost:8000/

Problem 2: I can see the new design ... but everything is broken because the JavaScript features are not enabled because we link to src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig and that file does not exist (because WebProfilerBundle is not installed).


Install WebProfilerBundle:

$ composer req profiler

Browse http://localhost:8000/

Now everything works as expected.


TwigBundle is not "a real bundle" because is not standalone. If WebProfilerBundle is not installed too, it doesn't work.

Which solution do you propose? The obvious one would be duplicating the WebProfilerBundle's base_js.html.twig file in TwigBundle too. What do you think?

@linaori
Copy link
Contributor
linaori commented May 4, 2017

Can't we make the profiler bundle a dependency of the twig bundle? Seems like the profiler is required.

@javiereguiluz
Copy link
Member Author
javiereguiluz commented May 4, 2017

The opposite behavior also happens and it's frustrating:

$ composer create-project symfony/skeleton:3.3.x-dev my_project/
$ cd my_project/
$ composer req profiler
$ make serve

But you don't see the debug toolbar or the profiler interface ... because TwigBundle is not available. So you must run this too:

$ composer req TwigBundle

@fabpot
Copy link
Member
fabpot commented May 4, 2017

Duplicate the file.

fabpot added a commit that referenced this issue May 7, 2017
…s not installed (javiereguiluz)

This PR was merged into the 3.3-dev branch.

Discussion
----------

Make the exception pages work when the WebProfilerBundle is not installed

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22631
| License       | MIT
| Doc PR        | -

Commits
-------

98353b0 Make the exception pages work when the WebProfilerBundle is not installed
fabpot added a commit that referenced this issue May 27, 2017
…aviereguiluz)

This PR was squashed before being merged into the 3.3 branch (closes #22838).

Discussion
----------

Make the simple exception pages match the new style

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22631
| License       | MIT
| Doc PR        | -

If you create an application with Symfony Flex and don't install the TwigBundle explicitly, you see the exception pages like this:

![before](https://cloud.githubusercontent.com/assets/73419/26286531/3737f41c-3e68-11e7-8f1f-d9454bbc81f2.png)

This PR updates that page to match the style of the rest of exceptions:

![after](https://cloud.githubusercontent.com/assets/73419/26286534/488a2e4c-3e68-11e7-9d9e-8af8a478ff44.png)

For comparison, this is how the full exception page looks:

![full-exception](https://cloud.githubusercontent.com/assets/73419/26286535/56d69f26-3e68-11e7-8068-8334f045a63d.png)

---

Should I add the small black top header with the Symfony logo too?

Commits
-------

bab4b9c Make the simple exception pages match the new style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0