Page 1 of 1
SOLVED Admin login redirecting to order dashboard
Posted: Fri Jan 29, 2021 8:31 pm
by Rainforest
I've created dev copies of my site so many times but this time I'm having the weirdest errors (I blame the ghost of 2020)
I created a copy of my site, my db. Fine.
Front end works fine.
The admin side I log in and it automatically takes me to the order dashboard
/admin/index.php?route=sale/order&token=xxxxxxxxxxxxxxx
I click any admin menu link and it just stays there.
I checked my htaccess, configs, they seem fine. No clue what to do other than delete and start again?
So, weird. Any ideas are appreciated.
Re: Admin login redirecting to order dashboard
Posted: Fri Jan 29, 2021 8:43 pm
by ADD Creative
Post your OpenCart version.
Post your PHP version.
Clear your browser cache.
Check your OpenCart and PHP error logs.
Check your web browser's developer console for errors.
Re: Admin login redirecting to order dashboard
Posted: Fri Jan 29, 2021 11:49 pm
by Rainforest
Sorry I should know better
Yeah I cleared my cash and everything.
Oc 2.3.0.2
7.1 php
It's an exact copy of my life store. Very strange. I've checked the HT access and everything. I've never had this type of situation. I guess I'll just have to redeem make a copy again. Also when I add a new user for a developer and try to log in it just doesn't log that user in. Just stays on the login page
SOLVED Re: Admin login redirecting to order dashboard
Posted: Sat Jan 30, 2021 7:55 pm
by Rainforest
###UPDATE##
OK. So I looked in my database and noticed, new users added were getting the USER_ID of 0 (zero)
So, I went in and changed it to a number and it works.
I have no idea why this is/was happening but users with ID of 0 (zero) will not be able to login.
Re: SOLVED Re: Admin login redirecting to order dashboard
Posted: Sat Jan 30, 2021 9:23 pm
by ADD Creative
Rainforest wrote: ↑Sat Jan 30, 2021 7:55 pm
###UPDATE##
OK. So I looked in my database and noticed, new users added were getting the USER_ID of 0 (zero)
So, I went in and changed it to a number and it works.
I have no idea why this is/was happening but users with ID of 0 (zero) will not be able to login.
The user_id is allocated by the database as it's set to AUTO_INCREMENT.
https://github.com/opencart/opencart/bl ... .sql#L3603
If every time you add a new user the user_id is zero, it suggests there is something wrong with your database tables.