Forums / Bug Reports / [DONE1.3.5] Logoff Bug!!, Please help

[DONE1.3.5] Logoff Bug!!, Please help

Locked

Views: 2,257

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
18 Jul 2006, 8:19 AM
#1
yabora avatar

yabora

New Zenner

Join Date:
May 2006
Posts:
64
Plugin Contributions:
2

[DONE1.3.5] Logoff Bug!!, Please help

it might be a repeated question, but I found no answer for it.

I am building a 2 language store, when I use lang number 2, then log off, it takes me to the log off page of lang 1 (default lang) , not the logoff page of lang 2.

the log off link:
index.php?main_page=logoff

while I think it should be:
index.php?main_page=logoff&language=?? <-- ?? is the code for lang number 2.

can you help please?

19 Jul 2006, 12:40 PM
#2
yabora avatar

yabora

New Zenner

Join Date:
May 2006
Posts:
64
Plugin Contributions:
2

Re: [DONE1.3.5] Logoff Bug!!, Please help

it is strange if this is not a known problem?

can any one help please.

Yabora

20 Jul 2006, 3:59 PM
#3
czechboy avatar

czechboy

New Zenner

Join Date:
Jun 2006
Posts:
18
Plugin Contributions:
0

Re: [DONE1.3.5] Logoff Bug!!, Please help

Hi I have the same problem. Nobody knows how to solve this?

20 Jul 2006, 5:10 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [DONE1.3.5] Logoff Bug!!, Please help

This is because all the user's preferences have been cleared out during logoff, including their language selection.

I haven't tested this yet ... perhaps you would test and give feedback:
includes/modules/pages/logoff/header_php.php
starting around line 18, you have:```php
/**

  • Check if there is still a customer_id
  • If so, kill the session, and redirect back to the logoff page
  • This will cause the header logic to see that the customer_id is gone, and thus not display another logoff link
    */
    if (!empty($_SESSION['customer_id'])) {
    zen_session_destroy();
    zen_redirect(zen_href_link(FILENAME_LOGOFF));
    }
replace that with:
```php
/**
 * Check what language should be used on the logoff screen
 */
  $logoff_lang = ($_SESSION['languages_code'] != DEFAULT_LANGUAGE) ? 'language=' . $_SESSION['languages_code'] : '';

/**
  * Check if there is still a customer_id
  * If so, kill the session, and redirect back to the logoff page
  * This will cause the header logic to see that the customer_id is gone, and thus not display another logoff link
  */
if (!empty($_SESSION['customer_id'])) {
  zen_session_destroy();
  zen_redirect(zen_href_link(FILENAME_LOGOFF, $logoff_lang));
}

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Jul 2006, 5:26 AM
#5
yabora avatar

yabora

New Zenner

Join Date:
May 2006
Posts:
64
Plugin Contributions:
2

Re: [DONE1.3.5] Logoff Bug!!, Please help

DrByte, thanks :thumbsup: it is working for me

CzechBoy, how come it didn't work for you.

my log off problem is solved

however, if leave the computer logged in for a long time, when I click any link in the website, it takes me to main screen of the lang 1.

I think we are not far away from the permenant solution.

Yabora.

22 Jul 2006, 9:18 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [DONE1.3.5] Logoff Bug!!, Please help

yabora:

if leave the computer logged in for a long time, when I click any link in the website, it takes me to main screen of the lang 1.
That's how it's designed to work. After 24 minutes, all the previous settings are discarded.

I think we are not far away from the permenant solution.You could always change lang 2 to be your default...

Why is this a problem?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Jul 2006, 8:41 AM
#7
icemanchai avatar

icemanchai

New Zenner

Join Date:
Jun 2006
Posts:
76
Plugin Contributions:
0

Re: [DONE1.3.5] Logoff Bug!!, Please help

Thanks Ajeh to tell me this thread had the solution I wanted. It works for me. :thumbsup: