ludofleury / GuzzleBundle

Debug your API Calls with a Symfony web profiler for guzzle
http://ludofleury.github.io/GuzzleBundle/
MIT License
82 stars 21 forks source link

[CRITICAL] Assets can not be retrieved when site is not in domain root #28

Open SoboLAN opened 8 years ago

SoboLAN commented 8 years ago

First of all, I want to say that this bundle is really cool, I'm using it on a multitude of Symfony applications and it works great.

Recently I tried installing it on an application that does not live under a URL like http://domain.com/, but instead lives under a URL like http://domain.com/myapp/.

When installing the bundle, all the CSS, Javascript, image files etc. are copied in:

/public_html/myapp/web/bundles/playbloomguzzle

When you access the Profiler of myapp, the HTTP requests that should get the resources for this bundle look like this (example):

GET /bundles/playbloomguzzle/css/profiler.min.css

This however results in a HTTP 404 error (for all resources, not just the one specified above).

The correct URL should be:

GET /myapp/bundles/playbloomguzzle/css/profiler.min.css

Notice the myapp folder in the request. Since the application lives under http://domain.com/myapp/, that folder should appear in the request, but it doesn't.

Screenshot that shows the problem:

playbloom bug 404

Since the resources can not be retrieved, this is how the Guzzle tab looks like:

playbloom bug

So the information is there but... it's not really OK.


I don't how to solve this problem elegantly. Maybe determine the correct URL of the site and use that in the asset() call in the templates found in Resources/views/Profiler.

However I have no idea how to do that or if it's even possible, since I've never worked with Twig before.

Ideas ?


EDIT: This could be a Symfony bug ... some investigations necessary.

ludofleury commented 8 years ago

Hey, this bundle is not actively maintained since Guzzle is now at version 6.

For your issue something is strange, because it relies on the asset()method in the twig view. I would dig into this asset method to check if everything behave properly ?

SoboLAN commented 8 years ago

OK so, if it won't be fixed, do you recommend another library that does the same thing ? Something that will work with PHP 5.3 and Guzzle 3.*

EDIT: I'll try this one, hopefully it will work :) .

ludofleury commented 8 years ago

Well, it's just a path for about CSS and JS. You can actually try to fix it ? Check the views, check the assets() methods, figure what happened. If you find a fix, submit a PR. Otherwise I have no idea.

On Thu, 26 Nov 2015 at 09:02, Radu Murzea notifications@github.com wrote:

OK so, if it won't be fixed, do you recommend another library that does the same thing ? Something that will work with PHP 5.3 and Guzzle 3.*

— Reply to this email directly or view it on GitHub https://github.com/ludofleury/GuzzleBundle/issues/28#issuecomment-159841481 .

csarrazi commented 8 years ago

Hey @ludofleury if this bundle, could you mark your package as abandoned on packagist and redirect to another bundle (misd, if speaking about guzzle 3) ?

We still have an issue with having tons of guzzle bundles available. See #9

ludofleury commented 8 years ago

Well, I would like, see the PR 29 on MISD... This was a long long story back in the days. We all tried to merge into one bundle behind the official namespace. Open source life. On Thu, 26 Nov 2015 at 10:57, Charles Sarrazin notifications@github.com wrote:

Hey @ludofleury https://github.com/ludofleury if this bundle, could you mark your package as abandoned on packagist and redirect to another bundle (misd, if speaking about guzzle 3) ?

We still have an issue with having tons of guzzle bundles available. See

9 https://github.com/ludofleury/GuzzleBundle/issues/9

— Reply to this email directly or view it on GitHub https://github.com/ludofleury/GuzzleBundle/issues/28#issuecomment-159864384 .