2.0 upgrade cant login

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hi,  after upgrading from v1.9 and running 2.0 when I go to login with my admin account it looks like its loggin me in then ill be redirected to the home page  but it doesn't show that in the upper right with my email address and still says Log In with no admin link.

Checking the database the password and salt are the same for both email accounts compared to v1.9 db and these accounts are assigned the admin role so that looks ok.

If I debug the Customer Controller in ActionResult Login(LoginModel model, string returnUrl) validate customer returns true and the customer object is populated.  As far as I can tell the customer role is Id 1 which is admin.

Even if I click on my account it returns me to the login page.

Any thoughts on where I should look next?

Thanks
-Keith
12 years ago
Looking further,  by the time it hits the commonController / ActionResult HeaderLinks()  there is no customer at all so isAuthenticated and displayadminlink are false.

Then in my account, ActionResult Info()

HttpUnauthorizedResult.Unauthorizedcode = 401

_workContext.CurrentCustomer is null also

Thoughts?

Thanks
-Keith
12 years ago
Even stranger,  did a fresh install with sample data, setup the same username (email) and password and I can get into admin.

When I look at the customer table for the new install I have 3 accounts

1) the email and password I entered in the install but the password is in plain text in the password field and there is no password salt

2) the builtin@search_engine_record.com with password format 0

3) an empty record with username null

I then set the passwordformat to 0 on  my upgrade install and I was able to login but its not encrypted in the database

I re-did the upgrade from scratch with the exact same results

Thx
-Keith
12 years ago
did you find a solution to this ?

I am having the same problem on a fresh install and cannot login as admin. User login works when I try to login as administrator it just comes back to the login page.

Vishal
12 years ago
Sorry not yet, still looking.

Could you do a quick check and look in your customer table.  Look at the user account that you created when doing the install.   Is the password in plain text and the passwordformat is zero not 1,  also is teh passwordSalt blank?

At first I thought it was that I used the same email username as what was allready in v1.9 but I created a new one and same thing happens.

with my issue no accounts can log in admin or customers.

Ill let you know the second I find anything new.

Thx
-Keith
12 years ago
Found it,

During the conversion some how all of the roles didn't get converted properly.   Both the old admin and the new one that the installer created had only the admin role.  Installing a fresh version of nop and new db assigns both the admin and registered which you need both to be true to make it through the authentication

So I added a registered role in addition to the admin role and I was able to log in.  Looking at a fresh install the admin customer is in registered and admin roles so for some reason something is different going from a conversion.  has anyone upgraded from 1.9 to 2.0 without this issue?

Thanks
-Keith
12 years ago
what i found is i had to use the admin email address as the login, instead of the old user name.
11 years ago
Yes thats what I found too, if you entered a new username & password at the upgrade/install screen, these credentials do not work, you have to use the credentials from your original installation.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.