This is an issue since more than half a year now... There was (is?) a ticket in trac with a working patch, I don't know why it isn't merged into core...
On 16 Dez., 09:20, Matthias Pfefferle <[email protected]> wrote: > Thats exactly my problem, Pablo! > > I have enabled the cache (settings.yml) but the files which are > affected by this problem are all excluded from the caching > (cache.yml). > > Example: I extracted the whole <head />er to a partial (because every > layout should use the same header-informations). In this partial there > are several slots to display special meta-informations for specific > actions. > > The layout code: > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" > dir="ltr"> > <?php include_partial('global/layout_head'); ?> > [...] > </html> > > The partial code: > > <head profile="http://purl.org/uF/2008/03/ > http://microformats.org/wiki/xfolk-profile > <?php if (has_slot('profile_uri')) { include_slot > ('profile_uri'); } ?> > [...] > </head> > > If the cache is disabled (settings.yml), everything works fine and the > partial shows the "profile_uri"-slot without any problems. If I enable > the cache (settings.yml), the "has_slot('profile_uri')" returns false. > If I paste the patial-code directly into the layout, everything works > fine (with and without caching enabled (settings.yml)). > > I reproduced this phenomenon also with normal templates. If the slot > is directly in the template, I got no problems, if it is used in a > partial the has_slot returns false. > > On Dec 16, 12:26 am, Pablo Godel <[email protected]> wrote: > > > If I understand your problem correctly, it is the whole purpose of enabling > > caching, so certain parts of your code don't get ran. > > > Pablo > > > On Tue, Dec 15, 2009 at 12:03 PM, Matthias Pfefferle > > <[email protected]>wrote: > > > > I can't access slots in partials with enabled symfony caching (symfony > > > 1.2.10)... does anyone had similar problems? Is there a way to > > > workaround? > > > > -- > > > > You received this message because you are subscribed to the Google Groups > > > "symfony users" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<symfony-users%[email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/symfony-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
