Customer login issue…

Hi,
I’ve imported all customers (Step 5) successfully and had the setting as MERGE DEFAULT WEBSITES ticked. 
The website is a multisite…..
Site 1: contactleft.paymonthlysite.co.uk
Site 2: brandnewretro.co.uk
Both sites sharing the same admin / database.
Oddly some of the customers cannot login to their account on brandnewretro.co.uk, but some can login ok.
Any ideas why this could happen?
 

18 answers

Profile photo of Mall Staff 184060.00 $tone March 7, 2021
Public

Hi there,

  • Magento ver. 1.9.4.4

To solve the issue you mentioned, please try the following steps at your end:

1. Open the PHP file at: pub/ub-tool/protected/controllers/Step6Controller.php
and find the code lines:

if ($table == 'customer_entity_varchar' AND $attributeCode1 == 'password_hash') {
$customer2->$attributeCode1 .= ":0"; // In Magento2: 0 is HASH_VERSION_MD5
}

and replace it with:

if ($table == 'customer_entity_varchar' && $attributeCode1 == 'password_hash') {
//checking the encrypt algorithms of the password hash
if (!stripos($customer2->$attributeCode1, '$2y$') === 0) { //if is not Bcrypt algorithms
$parts = explode(":",$customer2->$attributeCode1, 2);
if (isset($parts[0]) && strlen($parts[0]) === 64) {
$customer2->$attributeCode1 .= ":1"; // In M2: 1 is SHA256 algorithms
} else {
$customer2->$attributeCode1 .= ":0"; // In M2: 0 is MD5 algorithms
}
}
}

2. After that, you run the following SQL query in your M2 DB:

UPDATE `ub_migrate_map_step_6` SET `offset` = 0 Where entity_name = 'customer_entity';

3. Then, you run delta migration in step #6 using the CLI command:

php -f bin/ubdatamigration run --step=6;

4. Once done, reindex the data and check the issue you mentioned again. And let me how it goes.

Regards,
Mall.
 
 
 
 

#4
Profile photo of Mall Staff 184060.00 $tone March 8, 2021
Public

Hi there,

The Customer entity id 5485 is the one I’m trying login with on brandnewretro.co.uk (testing website)… which is website id 2 (CL Distribution).

Please try with exact steps as follow at your end:
1. Open the PHP file at pub/ub-tool/protected/controllers/Step6Controller.php
and find the code lines:

if (!stripos($customer2->$attributeCode1, '$2y$') === 0) { //if is not Bcrypt algorithms

and replace it with:

if (!(stripos($customer2->$attributeCode1, '$2y$') === 0)) { //if is not Bcrypt algorithms

2. After that, you run the following SQL query in your M2 DB:

UPDATE `ub_migrate_map_step_6` SET `offset` = 0 Where entity_name = 'customer_entity';

3. Then, you run delta migration in step #6 using the CLI command:

php -f bin/ubdatamigration run --step=6;

4. Download the PHP file HERE
and then upload the downloaded file to the file with path: app/code/Ubertheme/Ubdatamigration/Plugin/Customer/Model/AuthenticationPlugin.php
5. And then, you run CLI commands:
php -f bin/magento setup:upgrade;
php -f bin/magento indexer:reindex
php -f bin/magento cache:clean
and then, you enable this setting in Customer configuration in the backend of your M2 site: http://prntscr.com/10g7ktk
And check the issue you mentioned again.

Sorry one other thing regarding the products images which is driving me crazy, so it’ll much appreciated if you can help.
For some reason the product images show on the category pages, but a lot don’t show on the product page…

To solve that issue, please make sure you did copy all catalog media files from your M1 instance to the M2 instance as the guide of our module for the media files migration.
And then, make sure that you set the right permission for folder/files at path: pub/media/
And then, you run the following Magento’s CLI command:

php -d memory_limit=-1 -f bin/magento  catalog:images:resize;

And then, you clean the M2 cache and recheck the issue you mentioned.
Regards,
Mall.
 
 

#9
Profile photo of lvmedia 290.00 $tone March 8, 2021
Public

Hi, i get this issue when i change it global…..
We can’t share customer accounts globally when the accounts share identical email addresses on more than one website.
Also it didn’t work but that might be due to not being able to change it to global

#10
Profile photo of Mall Staff 184060.00 $tone March 9, 2021
Public

Hi there,

We can’t share customer accounts globally when the accounts share identical email addresses on more than one website.

So, please note that the migrated customers can only log in into the website that they belongs to it. It means that the migrated customer ID = 5485 can login only on the website id = 2 in your M2 site after migration and the customer ID = 11261 can login only on the website id = 1 in your M2 site respectively.

Meanwhile, please make sure that you already perform all steps as suggested in the reply #9.

Regards,
Mall.

#11
Profile photo of Mall Staff 184060.00 $tone March 10, 2021
Public

Hi there,

I’ve the changes / steps you suggested but still no joy.

I checked again into the login issue you mentioned in the reply #7:

The Customer entity id 5485 is the one I’m trying login with on brandnewretro.co.uk (testing website)… which is website id 2 (CL Distribution). I can login with the same login details on the live website (https://www.cldistribution.co.uk/).
Username: [email protected]
Password: sean01

And I could log in with that customer credentials on the site ‘brandnewretro.co.uk’
Here is the login result: http://prntscr.com/10hlwzf

Also can’t login with (entity ID 15685) which also points to website 2 brandnewretro.co.uk…
Username: [email protected]
Password: garywillingham01

I checked further into that customer credentials and saw that customer’s password_hash was hashed using the ‘Bcrypt’ algorithms: http://prntscr.com/10hm81a

To handle the ‘Bcrypt’ password harsh type, please make sure that you have added the PHP plugin which I suggested in the reply #9 to the M2 instance at ‘brandnewretro.co.uk’ successfully:

4. Download the PHP file HERE
and then upload the downloaded file to the file with path: app/code/Ubertheme/Ubdatamigration/Plugin/Customer/Model/AuthenticationPlugin.php
5. And then, you run CLI commands:
php -f bin/magento setup:upgrade;
php -f bin/magento indexer:reindex
php -f bin/magento cache:clean

Regards,
Mall.

#13
Profile photo of Mall Staff 184060.00 $tone March 10, 2021
Public

Hi there,

Please discard my reply #13 above.

I have just added the following XML file in your instance to enable the PHP plugin I mentioned above:
/home/cldistribution/public_html/app/code/Ubertheme/Ubdatamigration/etc/di.xml

And then I run the CLI command:

php -f bin/magento setup:upgrade;

And now the issue you mentioned has been solved:

Also can’t login with (entity ID 15685) which also points to website 2 brandnewretro.co.uk…
Username: [email protected]
Password: garywillingham01

I could log in successfully at my end for testing: http://prntscr.com/10hmkyx

Please check again.

Regards,
Mall.
 

#14
Profile photo of lvmedia 290.00 $tone March 24, 2021
Public

All works great thank you.
I’ve tested everything and it looks good now.
I do have one issue that I cant figure out… I’m not sure if its to do with the import.
if you go to http://contactleft.paymonthlysite.co.uk/main-military.html and click on page 2,3,4 on so on it says ‘We can’t find products matching the selection.’
I’ve reindexed the products, cleared cache etc and still no joy.
The pagination works on the search page though… 
http://contactleft.paymonthlysite.co.uk/catalogsearch/result/?q=fidlock
 

#15
Profile photo of Mall Staff 184060.00 $tone March 25, 2021
Public

Hi there,

if you go to http://contactleft.paymonthlysite.co.uk/main-military.html and click on page 2,3,4 on so on it says ‘We can’t find products matching the selection.’

It seems the issue you mentioned was solved at your end. I tried to access that URL and saw only one page with one product: http://prntscr.com/10upaec

Also, please note that the issue you mentioned in the Pagination related to Magento’s functions and your third-party theme only. It is beyond the scope of our migration tool.

Regards,
Mall.

#16
Profile photo of lvmedia 290.00 $tone March 25, 2021
Public

Sorry i had to reindex the data to show all the products on ttp://contactleft.paymonthlysite.co.uk/main-military.html page.
I’m using a default theme Luma which normally is fine.
I’m not sure if you can point me in the right direction to why anything past page 1 isn’t showing products.
Many thanks.

#17
Profile photo of ubdev Staff 98590.00 $tone March 26, 2021
Public

Hi there, 
 
We’re afraid that it relates to the custom theme and related modules’ functions only, not our module. 
 
Due to our limited resources, we could help you with the issues related to our migration module only. 
 
Thanks for your understanding. 
 
Regards,
Ubertheme team

#18

Please login or Register to Submit Answer

Written By

Comments