Menu/permission problem

Author Message

Øivind Gulbrandsen

Wednesday 03 November 2004 1:04:22 am

Based on the "Intranet" site I am building a solution for an organization.

Different user groups has got different access rules.

I have a problem with the menus (top menu).

When the site is opened menu items for "open" parts of the site is shown. OK.

If I then login I still get the same menu items - even if this user is allowed to access more menu items. (and it opens another page - not the home page!). If I open one of the restricted pages (through URL) it opens fine - and now with correct menu items! (But still the same problem if I go back to either the home page or the first page opened).

I have tried to delete "all cache" after I am logged in to the site. Then everything works excellent! (But if I delete cache before logging in the problem is there...). If I then log out and reopen the site without login the anonymous user sees all menu items! (another thing is that he can also see content from restricted sections that is shown on the home page through toolbars..., but he can not open the relevant menu items...).

Anyone that knows the problem - evt. solutions?

Øivind

Michael D.

Wednesday 03 November 2004 1:59:55 am

Which browser do you use?
Several browsers have too aggressive caching policies and are caching content even when they're not supposed to.

No real solution but at least worth trying is to add the following lines to the index.php, somewhere before ob_end_flush(); :

header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
header("Pragma: no-cache");

You could also try to set an expiry date which lies in the past, but I had no big success with this.

Testing showed the following:
IE 6: doing fine
Mozilla Browsers: login, logout, login, logout <- the last logout won't work
Opera: You have to use F5 to reload the page.

You could also try to use a different siteaccess for anonymous and registered users, if you don't mind the caching (which would be critical for eg. a shopping basket).

I would be very pleased to see a final solution as this is something bugging me a lot.

Btw, I disabled the cache of my Firefox 1.0PR to work properly and believe me it sucks. ;)

Øivind Gulbrandsen

Thursday 04 November 2004 9:17:46 am

I use IE 6.0.

Have tried to include the proposed code in index.php. No effect on my problems...

To set the expiry date to the past - where do I set this date?

I do not like the idea of several siteaccesses... (and not sure if I understand the consequenses).

Any others with ideas???

Øivind Gulbrandsen

Friday 05 November 2004 2:54:33 am

Have now solved this.

The cache-block key resulted in same cache for all users, but should be differentiated by role. Found this in another forum topic - and it worked (changed it in the relevant templates):

{cache-block keys=array('my_cache_block',$uri_string,$current_user.role_id_list|implode(',')) expiry=86400}

BUT STILL ONE PROBLEM:

After login it does not show the home page of my site, but one of the sub-pages. I do not understand why this happens. (When I open the site without login I come to the correct page).

Any ideas???

Michael D.

Friday 05 November 2004 7:16:28 am

I don't want to be bossy but you should post your new problem in a new thread. :)

(And no, I don't have an idea what the problem might be.. unless you are on a different url after the login.)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:17:39
Script start
Timing: Jan 18 2025 19:17:39
Module start 'layout'
Timing: Jan 18 2025 19:17:39
Module start 'content'
Timing: Jan 18 2025 19:17:40
Module end 'content'
Timing: Jan 18 2025 19:17:40
Script end

Main resources:

Total runtime0.6905 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 589.0391152.6250
Module start 'layout' 0.00650.0039 741.664139.4453
Module start 'content' 0.01040.6785 781.1094495.3047
Module end 'content' 0.68890.0015 1,276.414112.4844
Script end 0.6904  1,288.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.5070160.0002
Check MTime0.00150.2148160.0001
Mysql Total
Database connection0.00060.093710.0006
Mysqli_queries0.633791.7804630.0101
Looping result0.00060.0809610.0000
Template Total0.656195.020.3281
Template load0.00200.287920.0010
Template processing0.654194.739920.3271
Template load and register function0.00010.021710.0001
states
state_id_array0.00120.169910.0012
state_identifier_array0.00220.322220.0011
Override
Cache load0.00170.2444410.0000
Sytem overhead
Fetch class attribute can translate value0.00070.095320.0003
Fetch class attribute name0.00100.141950.0002
XML
Image XML parsing0.00020.034820.0001
class_abstraction
Instantiating content class attribute0.00000.001450.0000
General
dbfile0.00070.1052100.0001
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs