[symfony-users] Re: Can't access slots in partials (with cache enabled)

2009-12-23 Thread andrian
Thanks for the info.
I had the same problem with latest stable 1.2 release. After patching
the render function everything seems to work fine.
I still don't know why it's not included in the core release...

On Dec 21, 10:05 pm, Paulo Magalhães pa...@mentalstring.net wrote:
 Bumping up this as it is a major bug on the stable releases and seems to
 not be getting enough attention: slots are _not_ working when cache is
 enable.

 Two tickets on this:

 http://trac.symfony-project.org/ticket/4185http://trac.symfony-project.org/ticket/5958

 Reproducible on 1.3.1 as well.

 Proposed patches do fix the issue for accessing slots from within
 partials, but introduce issues when including slots in the app main layout.

 Is this being looked on?

 Regards,
 PM

 wissl wrote:
  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 pfeffe...@gmail.com 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 pablo.go...@gmail.com 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 
  pfeffe...@gmail.comwrote:
  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 symfony-us...@googlegroups.com.
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
  .
  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 symfony-us...@googlegroups.com.
  To unsubscribe from this group, send email to 
  symfony-users+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://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 symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Re: Can't access slots in partials (with cache enabled)

2009-12-21 Thread Paulo Magalhães
Bumping up this as it is a major bug on the stable releases and seems to 
not be getting enough attention: slots are _not_ working when cache is 
enable.

Two tickets on this:

http://trac.symfony-project.org/ticket/4185
http://trac.symfony-project.org/ticket/5958

Reproducible on 1.3.1 as well.

Proposed patches do fix the issue for accessing slots from within 
partials, but introduce issues when including slots in the app main layout.

Is this being looked on?


Regards,
PM



wissl wrote:
 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 pfeffe...@gmail.com 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 pablo.go...@gmail.com 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 
 pfeffe...@gmail.comwrote:
 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 symfony-us...@googlegroups.com.
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 .
 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 symfony-us...@googlegroups.com.
 To unsubscribe from this group, send email to 
 symfony-users+unsubscr...@googlegroups.com.
 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 symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Can't access slots in partials (with cache enabled)

2009-12-16 Thread Matthias Pfefferle
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 pablo.go...@gmail.com 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 
 pfeffe...@gmail.comwrote:

  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 symfony-us...@googlegroups.com.
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
  .
  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 symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Can't access slots in partials (with cache enabled)

2009-12-16 Thread wissl
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 pfeffe...@gmail.com 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 pablo.go...@gmail.com 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 
  pfeffe...@gmail.comwrote:

   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 symfony-us...@googlegroups.com.
   To unsubscribe from this group, send email to
   symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
   .
   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 symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.