Forum

Thread tagged as: Problem, Configuration, Members

perch_member_log_out(); not working properly

Hi

I have a site (built with Perch Runway) which uses the members app. Login, updating account details etc. all works fine, but perch_member_log_out(); doesn't seem to be working properly.

I have this at the top of my 'logout.php' page template:


<?php perch_member_log_out(); perch_layout('global/header'); ?> <section class="hero short"> </section> <section class="sub-nav can-fix"> <ul> <li>Success!</li> </ul> </section>

But after seeing this page and navigating somewhere else on the site it still acts as though I'm logged in - sometimes a refresh sorts it, but not always.

I have caching enabled on my server to speed things up a bit - could this be the issue?

Thanks!

Jack Barber

Jack Barber 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What sort of caching?

I have this in my .htaccess:


<IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" </IfModule>

Hmm...

Just reduced it to this


<IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" </IfModule>

Cleared my browser cache and it seems happier now - so can't be sure if it's a local or remote cache problem, or a bit of both.

Will keep an eye on it and report back if I notice a more concrete pattern.

Thanks for the great product BTW - you've created a CMS which is actually nice to use!

Drew McLellan

Drew McLellan 2638 points
Perch Support

One thing you can do is keep your browser console open on the Network tab. That should list the page as its being fetched, and you can see if the browser has actually been to the server for it or if it was used from cache.