Skip to content
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

[WebProfilerBundle] fix wrong url when base path is the index #28183

Merged
merged 1 commit into from Sep 4, 2018

Conversation

Projects
None yet
4 participants
@ismail1432
Copy link
Contributor

commented Aug 9, 2018

Q A
Branch? >= 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #27846
License MIT

The FileLinkFormatter create a wrong url because it's using getBaseUrl that render the script filename, the problem is that in this class it's used twice, first time with the getBaseUrl method and another time with the generate method. Just switch to getBasePath solve the issue.
WDYT ?

@ismail1432 ismail1432 changed the title [WebProfiler] Wrong URL file [WebProfilerBundle] fix wrong url when base path is the index Aug 11, 2018

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Aug 19, 2018

@nicolas-grekas nicolas-grekas changed the base branch from master to 3.4 Aug 19, 2018

@nicolas-grekas nicolas-grekas changed the base branch from 3.4 to master Aug 19, 2018

@nicolas-grekas

This comment has been minimized.

Copy link
Member

commented Aug 19, 2018

If this is for 3.4, can you rebase + retarget 3.4 please?

@ismail1432 ismail1432 changed the base branch from master to 3.4 Aug 26, 2018

@ismail1432 ismail1432 changed the base branch from 3.4 to master Aug 26, 2018

@fabpot

fabpot approved these changes Sep 4, 2018

Copy link
Member

left a comment

for 3.4

@fabpot fabpot changed the base branch from master to 3.4 Sep 4, 2018

@fabpot fabpot force-pushed the ismail1432:webprofiler-wrong-url branch from 99e1656 to 897615e Sep 4, 2018

@fabpot

This comment has been minimized.

Copy link
Member

commented Sep 4, 2018

Thank you @ismail1432.

@fabpot fabpot merged commit 897615e into symfony:3.4 Sep 4, 2018

1 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Sep 4, 2018

bug #28183 [WebProfilerBundle] fix wrong url when base path is the in…
…dex (ismail1432)

This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #28183).

Discussion
----------

[WebProfilerBundle] fix wrong url when base path is the index

| Q             | A
| ------------- | ---
| Branch?       | >= 3.4
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #27846   <!-- #-prefixed issue number(s), if any -->
| License       | MIT

The `FileLinkFormatter` create a wrong url because it's using [getBaseUrl](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Request.php#L870) that render the script filename, the problem is that in this class it's used twice, first time with the [getBaseUrl method](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php#L99) and another time with the [generate method](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Debug/FileLinkFormatter.php#L77). Just switch to `getBasePath` solve the issue.
WDYT ?

Commits
-------

897615e change baseUrl to basePath to fix wrong profiler url

This was referenced Sep 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.