Jump to content

Customers do not stay logged in.


Guest kush

Recommended Posts

Having a problem here but I'm not sure why.

When a customer logs in, they are just redirected to the homepage after hitting "submit", but the system does not show they are logged in so they cannot view their account details. It shows the same login/register links.

Thanks for any help,

Kush

Link to comment
Share on other sites

It looks like the only time a customer can view their profile is directly after placing an order. Even then, none of the links in the profile work (view order, edit info, etc.). It either redirects to the homepage or just gives them a "page not found" error. Any other time a user tries to log in, they're just redirected to the homepage and are not logged in.

If someone can just tell me what files may have been damaged that would cause this, I can just re-upload them and see if that fixes the problem.

Link to comment
Share on other sites

Guest NOD32 user

It looks like the only time a customer can view their profile is directly after placing an order. Even then, none of the links in the profile work (view order, edit info, etc.). It either redirects to the homepage or just gives them a "page not found" error. Any other time a user tries to log in, they're just redirected to the homepage and are not logged in.

If someone can just tell me what files may have been damaged that would cause this, I can just re-upload them and see if that fixes the problem.

I had these same issues with 4.2.3 but only from some locations:

Customers do not stay logged in. (Admin did not stay logged in also)

Add To Basket Fails (intermittent Problem, Some Customers Only, Perhap

product/category pages 404 error

Workaround was to login as admin after selecting secure login and then enable 'Force SSL'

Since upgrading only a couple of hours ago to 4.3.0 these issues seem to be resolved with force SSL now disabled again.

One difference that may have impacted on these issues is the addition in my case of the extra RewriteBase line in .htaccess - I had one manually added per my webhosts example but it was without the trailing (or was it leading?) '/'

EDIT: But I have just noticed that now I cannot logout of the storefront ??? - seems to work but upon returning I am already logged in again.

Only the IP detection issue now to finish being resolved.

Cheers :)

Link to comment
Share on other sites

Thanks for the replies.

Make sure that the correct values are in your config file - If your customers are accessing your store without using the www. extension but you have the www. in your config file then you need to add a line to your .htaccess file to force www.

The same goes if they are accessing your store using www. but www. isn't added in your config file.

In /includes/global.inc.php check:

$glob['storeURL'] = 'http://www.your-domain.com';

Here is the full content of my .htaccess file:

## Activate the mod_rewrite Engine



RewriteEngine On



RewriteCond %{QUERY_STRING} (.*)$

RewriteRule cat_([0-9]+)(\.[a-z]{3,4})?(.*)$	index.php?_a=viewCat&catId=$1&%1 [NC]



RewriteCond %{QUERY_STRING} (.*)$

RewriteRule prod_([0-9]+)(\.[a-z]{3,4})?$		index.php?_a=viewProd&productId=$1&%1 [NC]



RewriteCond %{QUERY_STRING} (.*)$

RewriteRule info_([0-9]+)(\.[a-z]{3,4})?$		index.php?_a=viewDoc&docId=$1&%1 [NC]



RewriteCond %{QUERY_STRING} (.*)$

RewriteRule tell_([0-9]+)(\.[a-z]{3,4})?$		index.php?_a=tellafriend&productId=$1&%1 [NC]



RewriteCond %{QUERY_STRING} (.*)$

RewriteRule _saleItems(\.[a-z]+)?(\?.*)?$		index.php?_a=viewCat&catId=saleItems&%1 [NC,L]



Options +FollowSymLinks 

RewriteEngine on 

RewriteCond %{HTTP_HOST} ^site.com [NC] 

RewriteRule ^(.*)$ http://www.site.com/$1 [L,R=301]




And here is the store url line in global.inc.php:




$glob['storeURL'] = 'http://www.site.com';

I'm not particularly fluent in php, so if you notice anything there that's incorrect please let me know!

NOD32 user - thanks for those links, I will try estelle's solution tonight.

Link to comment
Share on other sites

At this point I'm considering re-installing a fresh copy of cubecart, then my skin, then the mods one by one to see which one is causing the issue (if that's even the case - no idea). Might be the only solution at this point :)

Link to comment
Share on other sites

Update!

I found that the ONLY time that the system recognizes a login is directly after placing an order (the cookies are still fresh?)

When I click on "Your account", I get directed here:

http://www.site.com/index.php?_a=account

Now - when I click on ANY of the links in the profile, they ALL have the act= in it. For example, the profile link:

http://www.site.com/index.php?act=profile

When I REPLACE the act= with _a=, the proper page loads, and everything is beautiful.

So now the million dollar question is...why are all the links directing to act=, and how do I change it?

Thanks much, I'm glad we're getting closer here.

Link to comment
Share on other sites

Another update:

I found that in /skins/myskin/content/account.tpl, all of the links to the account pages (profile, orders, mailing list, etc.) used act=. I changed them to _a and they all work now.

Now, to find out how to log in from a place other than directly after placing an order. I replaced the act= in login.tpl with _a, as I did for account.tpl but I'm getting the following error:

1054: Unknown column 'salt' in 'field list'



SQL:

SELECT `customer_id`, `salt` FROM CubeCart_customer WHERE `type`>0 AND `email`='[email protected]'

If I keep the act= in the login.tpl links, it just redirects as before. So still, the only way to get logged in is to place an order. Once you log out, you cannot log back in.

Link to comment
Share on other sites

I just uploaded a completely fresh skin from the newest release, and now I'm getting that SQL error every time I log in, so it can't be a skin problem. Also things like "send to a friend", "request password", etc. do not work - I get a confirmation that an email is sent, but no email is sent.

Link to comment
Share on other sites

I just uploaded a completely fresh skin from the newest release, and now I'm getting that SQL error every time I log in, so it can't be a skin problem. Also things like "send to a friend", "request password", etc. do not work - I get a confirmation that an email is sent, but no email is sent.

bump

Link to comment
Share on other sites

Guest onlyespadrilles

I have a similar problem with my store.

Each time someone tries to login they are almost immediately logged out again. Also the cart contents are regularly lost.

Some customers are completely unaffected, yet others see the problem.

I have pinned it down to ssl being enabled. With ssl disabled the problem doesn't exist.

I have so far seen this issue in ie6, ie7 and firefox 2. i'm downloading firefox 3 now to see if this browser is affacted.

I have also seen it happen in the cubecart 4 demo store so i'm assuming it is a browser/security setting that is causing the trouble.

Not sure how to resolve, so grateful for suggestions.

Link to comment
Share on other sites

  • 1 month later...
Guest Alex Rodriguez

I am having this problem as well. I login to my test account. Then when I add a product to the basket, I get logged out and the word "login" appears at the top.

I have "forced ssl" enabled.

I went into the global.inc.php file and changed my "store url" from "http" to "https" since I'm forcing SSL but this didn't work either.

I'm using CubeCart 4.3.0.

Has anyone had any luck in fixing this login issue?

I'm also having a problem where sometimes the account get's blocked for multiple logins and then I can't login even after the "wait" time of 10 minutes has passed. There is a forum post here about it: http://forums.cubecart.com/index.php?showt...25&hl=login

Perhaps these are related. If CubeCart thinks the account is blocked would it kick my account out?

TIA,

Alex

Make sure that the correct values are in your config file - If your customers are accessing your store without using the www. extension but you have the www. in your config file then you need to add a line to your .htaccess file to force www.

The same goes if they are accessing your store using www. but www. isn't added in your config file.

In /includes/global.inc.php check:

$glob['storeURL'] = 'http://www.your-domain.com';

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...