Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[WebProfilerBundle] /_wdt/styles.css is not found #59045

Copy link
Copy link
Closed
@alexislefebvre

Description

@alexislefebvre
Issue body actions

Symfony version(s) affected

7.2.0

Description

When I browse my local website, the debug toolbar is displayed without any style:

image

Loading http://localhost:8000/_wdt/styles.css in the browser shows:

The requested resource /_wdt/styles.css was not found on this server.

For some reason, it is passed to the PHP built-in server:

image

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:

image

Router

config/routes/web_profiler.yaml

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

debug:router:

$ bin/console debug:router _wdt_stylesheet
+--------------+--------------------------------------------------------------------------+
| Property     | Value                                                                    |
+--------------+--------------------------------------------------------------------------+
| Route Name   | _wdt_stylesheet                                                          |
| Path         | /_wdt/styles.css                                                         |
| Path Regex   | {^/_wdt/styles\.css$}sDu                                                 |
| Host         | ANY                                                                      |
| Host Regex   |                                                                          |
| Scheme       | ANY                                                                      |
| Method       | ANY                                                                      |
| Requirements | NO CUSTOM                                                                |
| Class        | Symfony\Component\Routing\Route                                          |
| Defaults     | _controller: web_profiler.controller.profiler::toolbarStylesheetAction() |
| Options      | compiler_class: Symfony\Component\Routing\RouteCompiler                  |
|              | utf8: true                                                               |
+--------------+--------------------------------------------------------------------------+

$ bin/console debug:router _wdt
+--------------+----------------------------------------------------------------+
| Property     | Value                                                          |
+--------------+----------------------------------------------------------------+
| Route Name   | _wdt                                                           |
| Path         | /_wdt/{token}                                                  |
| Path Regex   | {^/_wdt/(?P<token>[^/]++)$}sDu                                 |
| Host         | ANY                                                            |
| Host Regex   |                                                                |
| Scheme       | ANY                                                            |
| Method       | ANY                                                            |
| Requirements | NO CUSTOM                                                      |
| Class        | Symfony\Component\Routing\Route                                |
| Defaults     | _controller: web_profiler.controller.profiler::toolbarAction() |
| Options      | compiler_class: Symfony\Component\Routing\RouteCompiler        |
|              | utf8: true                                                     |
+--------------+----------------------------------------------------------------+

Related:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.