Simple Machines Community Forum

SMF Development => Bug Reports => Topic started by: Participant on January 14, 2020, 01:39:40 PM

Title: [2.0.16] Authorization from the second time.
Post by: Participant on January 14, 2020, 01:39:40 PM
Hello. I have version 2.0.17.
If a forum user has a login in Russian, then the user cannot log in to the forum the first time. If the username is in English, then it can.
After the first attempt, a message appears: Invalid password.

There was no such problem before. I do not know at what point the problem appeared, perhaps after installing version 2.0.17. Before that, it was 2.0.15.
Title: Re: Authorization from the second time.
Post by: Herman's Mixen on January 14, 2020, 01:47:33 PM
probaly you need patch 2.0.15 into 2.0.16 => 2.0.17 ;)
Title: Re: Authorization from the second time.
Post by: Participant on January 14, 2020, 01:51:16 PM
I don't have a patch installed. I did a Large Upgrade. But it didn't set up either. I just copied the Large Upgrade files to the hosting and deleted the installation files.
Title: Re: Authorization from the second time.
Post by: Kindred on January 15, 2020, 06:39:38 AM
if you used the large upgrade, you should have run the upgrade.php
Title: Re: Authorization from the second time.
Post by: Participant on January 15, 2020, 06:43:55 AM
I don't have a patch or large upgrade installed - errors occur.
I would like to set up a forum from scratch and transfer the existing data to it, but I do not know how to do it or if it is possible at all. As I understand it, this is a super task for smf, because no one can write anything about it on the forum.
Title: Re: Authorization from the second time.
Post by: Kindred on January 15, 2020, 07:06:02 AM
I don't have a patch installed. I did a Large Upgrade. But it didn't set up either. I just copied the Large Upgrade files to the hosting and deleted the installation files.

you said that you used the large upgrade

by using the large upgrade, you essentially did "set up the forum from scratch with imported dat"
you just missed the last step --- which is run upgrade.php
Title: Re: Authorization from the second time.
Post by: Illori on January 15, 2020, 07:17:02 AM
you just missed the last step --- which is run upgrade.php

but given that there were no database changes, you don't need to run upgrade.php. you do though need to clear any hooks that may have been in use.

take a look at https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
Title: Re: Authorization from the second time.
Post by: Participant on January 15, 2020, 07:38:50 AM
Kindred, I was running the upgrade.php. The update installer was running. At one of the steps, an error occurs and the installation does not reach the end.

Illori, I have a problem with switching from one version to the new one.
Title: Re: Authorization from the second time.
Post by: Illori on January 15, 2020, 07:48:36 AM
I am sorry that is very confusing. you are mixing terms. can you tell us step by step what you have done? an upgrade does not have an installer as part of it in anyway.
Title: Re: Authorization from the second time.
Post by: Participant on January 15, 2020, 07:57:15 AM
I did according to this instruction: https://wiki.simplemachines.org/smf/Upgrading
During installation, an error occurred at the "Database Changes" step: Unknown Error.
Title: Re: Authorization from the second time.
Post by: Illori on January 15, 2020, 08:07:45 AM
but above you said you deleted installation files, there are no installation files in the upgrade package.

please explain step by step what you have done so we know the current state of your install.
Title: Re: Authorization from the second time.
Post by: Participant on January 15, 2020, 08:18:45 AM
By installation files I mean this: upgrade.php. Quote from the link I posted earlier:
The final step in upgrading SMF, is to run the upgrading tool. Navigate with your browser to the upgrade.php file (it can be found in the directory where SMF is located) and run the upgrade, for example: www.yourdomain.com/forum/upgrade.php.
Title: Re: Authorization from the second time.
Post by: Illori on January 15, 2020, 08:27:31 AM
for a test, can you register another account here with a username that has the issue from your forum and see if you can log in without issue?

if you do run into issues please provide the link to that users profile.
Title: Re: Authorization from the second time.
Post by: Participant on January 15, 2020, 08:43:41 AM
Yes, this forum has the same problem.
Title: Re: Authorization from the second time.
Post by: Illori on January 15, 2020, 08:44:43 AM
link to that profile that has the issue?
Title: Re: Authorization from the second time.
Post by: Participant on January 15, 2020, 08:46:44 AM
Посетитель
https://www.simplemachines.org/community/index.php?action=profile;u=621960
Title: Re: Authorization from the second time.
Post by: Illori on January 15, 2020, 10:10:40 AM
I think this may be a bug we need to look into further.
Title: Re: Authorization from the second time.
Post by: shawnb61 on January 27, 2020, 01:33:54 AM
Participant -

I cannot reproduce the error where you are required to log in twice. 

What theme are you using?  Does this issue happen when you use the SMF default theme - Curve?

Title: Re: Authorization from the second time.
Post by: Participant on January 27, 2020, 04:03:19 AM
shawnb61, the error also occurs on this forum.
On this forum I use the "SMF Default Theme".

In General, I do not understand how to find out what my theme is. Very confusing done. But I guess I have a default theme.
Title: Re: Authorization from the second time.
Post by: shawnb61 on January 27, 2020, 04:27:08 PM
I have since been able to reproduce this. 

Logged internally as issue #133.

Thanks for the report. 
Title: Re: Authorization from the second time.
Post by: shawnb61 on February 19, 2020, 10:13:54 PM
I believe the fix outlined here will resolve this problem:
https://www.simplemachines.org/community/index.php?topic=571082.msg4042818#msg4042818
Title: Re: Authorization from the second time.
Post by: live627 on February 21, 2020, 12:25:45 AM
I fix one bug and create another. Damn. Savage.
Title: Re: Authorization from the second time.
Post by: Ulibka on June 05, 2020, 04:26:15 AM
I believe the fix outlined here will resolve this problem:
https://www.simplemachines.org/community/index.php?topic=571082.msg4042818#msg4042818 (https://www.simplemachines.org/community/index.php?topic=571082.msg4042818#msg4042818)

I'm have same problem.
User with russain letter need to print password twice.
If user and password have only english letters - all work ok.

I'm have SMF 2.017, all tables in UTF-8, language = Russian
I'm do initial installation using SMF 2.017 install and old database.
After installation I'm convert all database tables to UTF8.
and run upgrade.php

Theme is Japanes Red from this site.

I'm patch script.js as described above.

Test site:
https://woodtools.site/index.php

User: test2020
Password: 1234
login - OK

User name in russian letters:
User: Рамза
Password: 12345

In this case user must fill login and password twice.
You can check it byself.
Login in upper left corner

Separet login button have name : Вход
Title: Re: Authorization from the second time.
Post by: shawnb61 on June 05, 2020, 01:02:00 PM
I believe the fix outlined here will resolve this problem:
https://www.simplemachines.org/community/index.php?topic=571082.msg4042818#msg4042818

Ulibka - the solution to your problem was 2 posts above your post.

EDIT:  You may need to force a refresh for that page on your browser.  Usually shift-F5, or shift-refresh.  Otherwise the new .js doesn't get loaded, you are still using the old one. 
Title: Re: [2.0.16] Authorization from the second time.
Post by: Ulibka on June 05, 2020, 03:03:44 PM
I'm edit script.js exactly as you described :)
But nothing changes.
I make picture from chrome dev tools:
(https://woodtoolsimg.ru/resize/images/2020-06-05/7627FCED-CA31-4F7C-B1AA-FA6A73B47884-350.jpg) (https://woodtoolsimg.ru/resize/images/2020-06-05/7627FCED-CA31-4F7C-B1AA-FA6A73B47884-1600.jpg)

If I'm try to login :
User name in russian letters:
User: Рамза
Password: 12345

first login: invalid password,
second login: ok

I'm see login form - it's the same as default theme.
Title: Re: [2.0.16] Authorization from the second time.
Post by: shawnb61 on June 05, 2020, 08:38:00 PM
Did you refresh your browser as specified above?

Old version of script.js is likely cached.
Title: Re: [2.0.16] Authorization from the second time.
Post by: Ulibka on June 05, 2020, 11:27:59 PM
Did you refresh your browser as specified above?

Old version of script.js is likely cached.

Yes, it is.
I'm publish photo from chrome dev tools - you can see that code was changed.
Title: Re: [2.0.16] Authorization from the second time.
Post by: shawnb61 on June 06, 2020, 02:58:52 AM
I have confirmed that the above fix works fine on a vanilla 2.0.17 install with the user ID and password you have provided.

You have something else going on...

Initial guess is that there is an issue with your UTF8 implementation somewhere. 

I would ensure that:
 - All ***columns*** are utf8_general_ci; not just tables, look at the columns
 - In your settings table, global_character_set is set to: 'UTF-8'
 - In settings.php, you see the row for: $db_character_set = 'utf8';

If all of the above is true, you have some deeper problem somewhere...  You need to try all vanilla code + the fix above in a test environment.