-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[WebProfilerBundle] /_wdt/styles.css
is not found
#59045
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
Comments
On this line:
Replacing So it looks like it's a limitation of the built-in server of PHP. My hypothesis: it tries to find the file |
Possible (ugly) workaround: add this in your template:
|
It looks like it's an edge case, let's see if someone else has the same issue. |
Got this issue too |
Here is a workaround by using the old version to override the new version:
Through CLI: mkdir --parents templates/bundles/WebProfilerBundle/Profiler/
curl https://raw.githubusercontent.com/symfony/symfony/31b6a568850ad260b9d20122667a84ce0665ba7a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig \
--output templates/bundles/WebProfilerBundle/Profiler/toolbar_js.html.twig This will revert this change and inline the CSS instead of loading it through an URL. |
It would be nice to be able to use the "old" way with a parameter of WebProfilerBundle. |
What server do you use? The built-in PHP server too? |
Another workaround: use Symfony CLI to run the server: https://symfony.com/download In the context of PHP in a Docker container, based on an Alpine image:
|
I'm behind docker/nginx. Thanks for your help 👍 |
Issue is (for me) in the nginx vhost:
If I remove css in the regex it's ok. |
Actual solution with PHP's built-in server:- php -S 0.0.0.0:8000 -t public/
+ php -S 0.0.0.0:8000 public/index.php
|
Same issue here, behind NGiNX + PHP-FPM. I get a 404 on Probably caused by
telling NGiNX all |
It works as expected now. @lugosium I didn’t get if you use PHP’s built-in server or something else (like If you use the built-in server, please try the solution on the comment above. Otherwise, please open another issue since it may be related to nginx. |
Adding this to my NGiNX config seems to solve it, though I don't really like having to configure something explicitly for a dev tool.
|
Chaning |
+1 here, suffix |
I reopen this issue so that Symfony's maintainers can study this case. |
This worked for me. Running nginx php-fpm inside Docker. |
I got this issue too, with apache |
Are you all "behind" a proxy and not set |
No proxy for me. |
I encountered this upgrading from 7.1.9 to 7.2.0, the fix from rpkamp worked nicely. |
Another workaroun 8000 d:
I was able to do this in a project, by changing the config instead of the file in
when@dev:
web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt
web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler
+ _wdt_stylesheet:
+ path: /custom_wdt/styles
+ controller: web_profiler.controller.profiler::toolbarStylesheetAction It may require to delete the cache. |
same problem with local WAMP Environment on Win11 with standard Apache (no nGinx). Test-Updated from working 7.1.* to 7.3.*, nothing else changed. |
I had the same issue when updating 7.1 to 7.2 |
Solution by @alexislefebvre works perfectly for me
|
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected
7.2.0
Description
When I browse my local website, the debug toolbar is displayed without any style:
Loading
http://localhost:8000/_wdt/styles.css
in the browser shows:For some reason, it is passed to the PHP built-in server:
How to reproduce
The PHP server runs in Docker through
php -S 0.0.0.0:8000 -t public/
.It looks like it's not the source of the problem since
http://localhost:8000/_wdt/50aa18?XDEBUG_IGNORE=1
works without any issue.Possible Solution
See this workaround to change the path of the path in your project: #59045 (comment)
Additional Context
The debug toolbar has no issues:
Router
config/routes/web_profiler.yaml
debug:router
:Related:
The text was updated successfully, but these errors were encountered: