Joomlatwork
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 21, 2013, 05:31:47 PM

Login with username, password and session length
Search:     Advanced search
17000 Posts in 5639 Topics by 11131 Members
Latest Member: DugDasyDawl
* Home Help Search Login Register
+  Joomlatwork
|-+  Joomla accelerate component
| |-+  Support questions
| | |-+  Template - Chooser cookie issue
« previous next »
Pages: [1] Print
Author Topic: Template - Chooser cookie issue  (Read 2591 times)
jbennert
Newbie
*
Posts: 6


View Profile
« on: March 20, 2007, 06:35:45 PM »

The accelerater does a great job - thank you it is worth the money.

I just did not figure out how I get the templatechooser working, so sitevisitors can change templates. I pasted jos_user_template cookie in the configuration for supported cookies but it does not seem to work this way. Then I tried the other option 'not to use the cache for this cookie'. But also not working. If a page was loaded with template A, also switching to template B will show same page with template A. I made sure accellerator cache and browser cache were cleared befor I made changes to the settings. I noticed every time there is a template change a new cookie of the name jos_user_template is created, so there could be 5 cookies of that name at the same time. Perhaps the previous jos_user_template cookie should be deleted when there is a template change, but it is not. If you could give me advice on what to do, or know a hack for the cookie handling of templatechooser - please let me know.

Thank you
Logged
joomlatwork
Administrator
Hero Member
*****
Posts: 2817


View Profile Email
« Reply #1 on: March 20, 2007, 07:13:34 PM »

Can I take a look at your site to see the cookies generated? Please pass me a Joomla account through email: services-at-joomlawork.com

Regards,

Richard
Logged
jbennert
Newbie
*
Posts: 6


View Profile
« Reply #2 on: March 21, 2007, 09:54:04 PM »

I mailed the URL to my site - please tell if you need more information.

Thank you
Logged
joomlatwork
Administrator
Hero Member
*****
Posts: 2817


View Profile Email
« Reply #3 on: March 21, 2007, 11:03:06 PM »

Sorry but didn't received any email... Huh

Richard
Logged
jbennert
Newbie
*
Posts: 6


View Profile
« Reply #4 on: March 22, 2007, 03:48:32 PM »

Sorry, services-at-joomlawork.com got my first mail. It's not easy sending emails.  Grin
Please check again.

Thank you
Logged
jbennert
Newbie
*
Posts: 6


View Profile
« Reply #5 on: March 22, 2007, 03:51:05 PM »

I see - you gave me this adress 'services-at-joomlawork.com'. I now tried services-at-joomlatwork.com.  Wink
Logged
joomlatwork
Administrator
Hero Member
*****
Posts: 2817


View Profile Email
« Reply #6 on: March 22, 2007, 09:30:25 PM »

Have sent you the following email:
Quote
I think that I found the cause of the problem. The problem is not the cache component but the problem is within the template chooser self.  I've made an installation without the cache and the same problem occurs. Eitherway this works for me:
The cookies are set for the relative path that the user is on. This can you solve by editing the joomla.php (within the includes directory of the joomla installation). I made the following adjustments:
- on line 1233 the lifetime of the cookie is set to 60x10 (10 minutes!) I've increased it at my site to 24*3600 (1 day).
code:
$lifetime         = 3600*24;

Also the cookie should be set for the whole domain and not the relative paths. Therefore you must change the following line of code: line 1235 and line 1238 into:
line 1235: setcookie( 'jos_user_template', "$jos_change_template", time()+$lifetime, "/");
line 1238: setcookie( 'jos_user_template', '', time()-3600 , "/");

The "/" takes care that the cookie is set for the whole path. And not the relative paths

Please let me now if this works for you

Regards,

Richard
Logged
jbennert
Newbie
*
Posts: 6


View Profile
« Reply #7 on: March 22, 2007, 11:08:12 PM »

Richard - it rocks!

It works - great, I am very happy you had this solution at hand. AND I am very impressed on your very quick response. Good job. I did not have this issue without the cache, but perhaps some other users. So your solution is the one and only.

Thank you very much - if I don't bother you the next two days - this issue is solved for me.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!