Bug #9
[PATCH] sfDynamicsPlugin does not work with cached pages
| Status: | Waiting for feedback | Start: | 09/17/2009 | |
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | Core functionalities | Spent time: | - | |
| Target version: | v.0.9 - incoming release | Estimated time: | 1.00 hour |
Description
Reported by bschussek | August 5th, 2009 @ 03:45 PM
The plugin listens to the event "response.filter_content" to inject javascript and stylesheet HTML tags into the HTML source code. It relies on sfDynamics::load() being called for these scripts.
Unfortunately the above event is fired after the HTML source is saved to the cache. Thus, when a page is loaded from the cache, it is loaded without javascripts and stylesheet tags. In this case the filter doesn't work either, because sfDynamics::load() is called in actions and views, which are not executed if the page is loaded from the cache.
I proposed the inclusion of a new event "view.filter_content" on the symfony trac that solves this problem. I also created a patch for sfDynamicsPlugin that is attached to this ticket.
Symfony ticket: http://trac.symfony-project.org/ticket/6963
History
Updated by Romain Dorgueil 12 months ago
- Category set to Core functionalities
- Target version set to v.0.9.3 / v.0.9.4
Updated by Romain Dorgueil 12 months ago
- Status changed from Assigned to Waiting for feedback
- Assigned to deleted (
Romain Dorgueil)
Hi Bernard.
Your ticket is very important, as we need this to work with cache. I did not have time to experiment with other events, but the view.filter_content event does not exist in symfony 1.2. Your patch cannot be applied as is. I see there is a view.cache.filter_content event, but I need to find time to experiment with this.
Thanks for your patch anyway.
Updated by Romain Dorgueil 12 months ago
- Target version changed from v.0.9.3 / v.0.9.4 to v.0.9 - incoming release