Development

#4929 (PATCH: Fix web location close.png of web debug decoration of partials)

You must first sign up to be able to contribute.

Ticket #4929 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

PATCH: Fix web location close.png of web debug decoration of partials

Reported by: Dennis.Verspuij Assigned to: fabien
Priority: minor Milestone: 1.3.0 alpha1
Component: view Version:
Keywords: debug Cc:
Qualification: Unreviewed

Description

The url of the close.png is still prefixed with /images/ while as far as I know is not valid anymore since SF 1.1. Attached is a patch to fix this by calculating the image_root_path like sfWebDebugLogger does. Also included alt attribute to be xhtml valid.

Attachments

sfViewCacheManager.class.php.patch (1.9 kB) - added by Dennis.Verspuij on 11/13/08 18:46:21.
sfWebDebugLogger.class.php.patch (0.8 kB) - added by Dennis.Verspuij on 08/05/09 15:25:19.
sfWebDebugLogger.class.php.path

Change History

11/13/08 18:46:21 changed by Dennis.Verspuij

  • attachment sfViewCacheManager.class.php.patch added.

11/27/08 13:27:03 changed by fabien

(In [13412]) [1.2] fixed missing alt tag in cache debugging information (refs #4929)

11/27/08 13:27:18 changed by fabien

  • status changed from new to closed.
  • resolution set to invalid.

The image_tag() helper is taking care of that. Or am I missing something here?

11/28/08 12:14:51 changed by Dennis.Verspuij

  • status changed from closed to reopened.
  • resolution deleted.

Please have a try with a cached partial and web_debug on. The image_tag helper forces /images/ in the web path, so the location of close.png in the output html is:

.../images/sf/sf_web_debug/images/close.png

while it should be:

.../sf/sf_web_debug/images/close.png

My patch fixes this like sfWebDebugLogger does

11/28/08 14:50:14 changed by fabien

  • status changed from reopened to closed.
  • resolution set to worksforme.

I have just tested and it works, even if the website is not under the web server root directory.

08/05/09 15:24:54 changed by Dennis.Verspuij

  • keywords set to debug.
  • status changed from closed to reopened.
  • version deleted.
  • resolution deleted.
  • milestone changed from 1.2.0 to 1.3.0.

I am still having this issue, as well as that the web debug panel images do not load due to the wrong web path being calculated.

The latter only works when serving the Symfony application in the / root of the web server, not within a subdirectory. This is because sfWebDebugLogger::listenForLoadFactories, where the image_root_path is calculated, expects sfWebRequest::getRelativeUrlRoot() to return a path with a trailing slash. With my attached patch the web debug panel images show correctly in an application served at / as well as /some/subdirectory/.

The close buttons for partial cache indicators however still do not load because it expects close.png in .../images/sf/sf_web_debug/images/close.png instead of /sf/sf_web_debug/images/close.png. I really do not understand why nobody else has this problem.

By the way, I am working with Sf 1.3 dev, I cannot select that in the Version dropdown in this tocket, that's why I set the milestone to 1.3.0, which I know you don;t want me to do.

Greetings Dennis

08/05/09 15:25:19 changed by Dennis.Verspuij

  • attachment sfWebDebugLogger.class.php.patch added.

sfWebDebugLogger.class.php.path

09/11/09 11:04:37 changed by fabien

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [21891]) [1.3] fixed location of images of the web debug toolbar when a relative root url has been defined (closes #4929)

09/11/09 13:52:58 changed by francois

  • status changed from closed to reopened.
  • resolution deleted.

r21891 breaks the web debug toolbar images for me. I have defined nothing special, and all the image embeds in the toolbar now start with "//sf/...", so they doon't show up.

09/11/09 14:03:42 changed by fabien

Definitely works for me. The browser nor the web server care about the double /, does it on your configuration? Do you use Windows?

09/11/09 21:55:34 changed by webPragmatist

Hey fabien, I can confirm this isn't working properly on Windows.

I end up with the double /:

<img src="//sf/sf_web_debug/images/sf.png" alt="Debug toolbar" />

Let me know how I can help debug.

(follow-up: ↓ 11 ) 09/11/09 23:05:52 changed by FabianLange

also reported in #7144 which i just marked as duplicate

(in reply to: ↑ 10 ) 09/12/09 00:03:19 changed by michael.piecko

Sorry for my duplicate Fabian, i didn't notice this ticket. But i'd like to add, that i'm using linux and my images won't show up because of that "//".

Michael

09/12/09 08:24:07 changed by nicolas

I can confirm this bug on osx/apache too

09/12/09 08:38:23 changed by fabien

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [21954]) [1.3] fixed // in web debug images references (closes #4929)

10/07/09 14:06:37 changed by Dennis.Verspuij

  • status changed from closed to reopened.
  • resolution deleted.

[21954] accidentally reverts the fix of [21891] where a slash was inserted between some of the image path segments to resolve the issue, and thereby making [21954] itself useless. Please update '%s%s/images' back into '%s/%s/images' in line 112 of sfWebDebugLogger.class.php to fix this.

10/07/09 14:11:21 changed by fabien

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [22853]) [1.3] fixed typo (closes #4929)