Author Message

Pascal France

Friday 26 May 2006 8:23:37 am

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Pascal France

Monday 29 May 2006 12:27:51 pm

Hi,

This post is not bound with my previous question above.

I have a login trouble with my two siteaccess.
I have three users for my_plain siteaccess: A, B and C
Once I'm logged in with user A, I can see: "welcome user A".
I log out and then log in with user B. But I see again: "welcome user A" and I have to display a new page (say page_1) to see: "welcome user B".
If I log out and log in with user C, I see: "welcome user A" and if I display "page_1" I see "welcome user B".

It seems the displayed pages are in the cache.

I added the code to display the user names in pagelayout.tpl:

{def $user=fetch( 'user', 'current_user' )}
{if $user.is_logged_in}
{$user.contentobject.name}
{/if}
{undef $user}

and I added in my "my_plain" site.ini.append.php:

 43 [FileSettings]
 44 VarDir=var/my_plain
 45 StorageDir=storage
 46 CacheDir=cache
 47 LogDir=log

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Pascal France

Monday 29 May 2006 1:18:52 pm

Hi,

I created a username.tpl witch contains:

  1 {def $user=fetch( 'user', 'current_user' )}
  2 {if $user.is_logged_in}
  3 <div id="user_avatar">
  4 {attribute_view_gui attribute=$user.contentobject.data_map.image image_class=small}<br />
  5 {$user.contentobject.name}
  6 </div>
  7 {/if}
  8 {undef $user}

and then, I tried these two solutions:
First one, in pagelayout.tpl:

 77 {cache-block expiry=1}
 78 {include uri='design:username.tpl'}
 79 {/cache-block}

Second, in my_plain/site.ini.append.php:

 49 [ContentSettings]
 50 ViewCaching=disabled

but I have always the same problem (even I disable ViewCaching in site.ini and set "CachedViewModes=").

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Marcin Drozd

Monday 29 May 2006 2:02:58 pm

Hi Pascal
Did U try with:

{set-block scope=root variable=cache_ttl}0{/set-block}

This code should be the first line in your template (I think username.tpl)

http://ez-publish.pl

Pascal France

Tuesday 30 May 2006 12:14:21 am

Hi Marcin,

I didn't know this function, so I did a search and found this thread:
http://ez.no/community/forum/setup_design/cache_problem_question/re_cache_problem_question__2
and the documentation pages:
http://ez.no/doc/ez_publish/technical_manual/3_7/reference/template_functions/variables/set_block
http://ez.no/doc/ez_publish/technical_manual/3_7/templates/the_pagelayout/variables_in_pagelayout

...and it should work......but not for me and I have always the same problem :-(

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Pascal France

Tuesday 30 May 2006 12:57:35 am

Hi,

How is it possible that disabling all caches in site.ini or site.ini.append.php (ViewCaching and [OverrideSettings]) has no effect ??

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish