Skip to content

[HttpKernel] Profiler trace gives wrong url with Symfony hosted in a subdirectory #32444

@mechanicalgux

Description

@mechanicalgux

Symfony version(s) affected: 4.3.2

Description
Profiler trace gives wrong url with Symfony hosted in a subdirectory.
Say Symfony is hosted in http://localhost/mysymfonyroot/.
Profiler trace will give links such as http://localhost/mysymfonyroot/mysymfonyroot/_profiler/open?file=public\index.php&line=25#line25, giving twice the subdirectory name.

How to reproduce
Install Symfony in a subdirectory.

Possible Solution
Remove $request->getBasePath() from getFileLinkFormat() method, as it's already generated by generateUrlFormat().
https://github.com/symfony/http-kernel/blob/e042c113409e41fdb38f06ac1d0e78097dfa17d7/Debug/FileLinkFormatter.php#L99

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