Page 1 of 1

lougout page bug

Posted: Tue Jul 02, 2013 5:00 am
by wafflemeister
OpenCart Version: 1.5.5.1
Browser: Firefox
Website: wafflepantry.com

Hey guys,

I have noticed something unusual on my website when I try to log out. I get the following error message from my browser:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies.
When I give it a few seconds and click on the 'Try Again' button of my browser the lougout site shows up properly with the following standard message:
You have been logged off your account. It is now safe to leave the computer.

Your shopping cart has been saved, the items inside it will be restored whenever you log back into your account.
Any idea what is causing this?

Help is greatly appreciated, thank you!

WaffleMeister

Re: lougout page bug

Posted: Tue Jul 02, 2013 8:50 am
by pedro1993
Well the error is self explanitery. For whatever reason the page is looping on the logout page. Could you check your error log by going to Admin > System > Error Logs and post it in here please?

Thanks,
Peter

Re: lougout page bug

Posted: Wed Jul 03, 2013 2:37 am
by wafflemeister
Hi Peter,

Thank you for your time and effort.
I cleared the error log and logged out, which returned the following eroor entry:
2013-07-02 18:31:01 - PHP Notice: Undefined variable: filter_name in /home/sevan011/public_html/catalog/view/theme/oskar/template/common/header.tpl on line 61
I have attached the file in question for review. Please note that this is a custom template.

Thanks again for your help.

Best,
WaffleMeister

P.S. was in Edinburgh last year, Scotland is a beautiful country

Re: lougout page bug

Posted: Wed Jul 03, 2013 3:11 am
by pedro1993
wafflemeister wrote:Hi Peter,

Thank you for your time and effort.
I cleared the error log and logged out, which returned the following eroor entry:
P.S. was in Edinburgh last year, Scotland is a beautiful country
Hehe, Scotland is a nice Country, especially the Highlands and Lochs! Edinburgh and Fife do have they good parts as well :)

I checked your header.tpl file and that doesn't seems to be the issue, nor is your posted.

Could you post the catalog/controller/account/logout.php file?

Also, have you installed any VQMods recently that you think could be causing a problem?

Thanks,
Peter

Re: lougout page bug

Posted: Wed Jul 03, 2013 3:58 am
by wafflemeister
Peter,

I have attached the lougout file, although, I don't think I have ever worked on this file before.
I have not installed any recent VQMods either. The website is 2 weeks old, I caught the mistake as I actually opened a test account and tried to logout for the first time. I have also tried to change the theme back to its original but that did not do any good either.

Thanks,
WaffleMeister

Re: lougout page bug

Posted: Wed Jul 03, 2013 4:10 am
by pedro1993
Everything seems to be okay here, when clicking the log out button, does the user actually log out if you go to another page afterwards?

Peter

Re: lougout page bug

Posted: Wed Jul 03, 2013 4:13 am
by wafflemeister
It does log out the user. Basically, you do get the browser error message and if you wait a few seconds and click 'Try Again' it properly logs you out and gives you the conformation message that you have been logged out. You can try it out with a test account if you like. I wonder if this is just a browser/cookie issue on my end.

Re: lougout page bug

Posted: Wed Jul 03, 2013 4:26 am
by pedro1993
I tried it myself, it isn't a cookie error.

I am not 100% what the problem is. I have 2 suggestions,

The first one Redirect to another page when logging out

To do this, simply look for this line of code in your catalog/controller/account/logout.php file:

Code: Select all

$this->redirect($this->url->link('account/logout', '', 'SSL'));
and replace it with:

Code: Select all

$this->redirect($this->url->link('account/login', '', 'SSL'));
That will direct your users to the login page when they log out. Perhaps that will work?

The second option, if you message you FTP details I will have a little peak online and target the problem?

Peter

Re: lougout page bug

Posted: Thu Jul 04, 2013 5:38 am
by wafflemeister
I figured out that the error in line 61 is because of the fact that the template is not compatible with the new version of opencart. 'filter_name' was changed to 'search' in the newest version of opencart. I have made the change and the line 61 error has disappeared, however, the logout issue still persists. The other thing I noticed, when I try to login, I can only login on the third try, which is quite weird, too.