Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem: I can no longer log into wp-admin with my user (others still work) Solution: The issue was with corrupted database: "rp4wp_hide_nag user_meta key is set to zero. That breaks the auto_increment. I removed that particular entry from the DB, changed the meta_key to AUTO_INCREMENT, and was able to log in again"

0% of people find this useful.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 6 replies, has 2 voices.

Last updated by delphineF 2 years, 4 months ago.

Assigned support staff: Bruno Kos.

Author Posts
June 17, 2019 at 3:15 am #4031825

delphineF

I have a WordPress website on a cloud plan at Siteground. I switched the website to WPML recently. Since then, my main user (the blog author) has been unable to log into the website backend (wp-admin) twice. The behavior is the following: if they type in their right username and password, they get redirected to

<em><u>hidden link</u></em>;.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.<DOMAIN_NAME>.com%2Fwp-admin%2F&reauth=1

If they use the wrong password (on purpose), WordPress replies with a clear error the username/password combo is invalid.

The last time it happened, I deleted a WPML property in the user_meta table and that seemed to have fixed it. It seems I just got lucky. That property is no longer there but my user cannot log in.

Note: my user works fine. Both users are admins.

If I log into cPanel, I can see the following errors:

[Sun Jun 16 18:58:29.140432 2019] [:notice] [pid 2540] [client <SERVER_IP>:42396] mod_hive matched URI <em><u>hidden link</u></em>;.com/wp-login.php (/home/<web_folder>/public_html/wp-login.php) with match 2, referer: <em><u>hidden link</u></em>;.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.<DOMAIN_NAME>.com%2Fwp-admin%2F&reauth=1
[Sun Jun 16 18:56:46.529690 2019] [:notice] [pid 14154] [client <SERVER_IP>:50072] mod_hive matched URI <em><u>hidden link</u></em>;.com/wp-login.php (/home/<web_folder>/public_html/wp-login.php) with match 2, referer: <em><u>hidden link</u></em>;.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.<DOMAIN_NAME>.com%2Fwp-admin%2F&reauth=1
[Sun Jun 16 18:56:42.185580 2019] [:notice] [pid 2540] [client <SERVER_IP>:49266] mod_hive matched URI <em><u>hidden link</u></em>;.com/wp-login.php (/home/<web_folder>/public_html/wp-login.php) with match 2, referer: <em><u>hidden link</u></em>;.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.<DOMAIN_NAME>.com%2Fwp-admin%2F&reauth=1
[Sun Jun 16 18:46:22.451731 2019] [:notice] [pid 14154] [client <SERVER_IP>:56324] mod_hive matched URI <em><u>hidden link</u></em>;.com/wp-login.php (/home/<web_folder>/public_html/wp-login.php) with match 2, referer: <em><u>hidden link</u></em>;.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.<DOMAIN_NAME>.com%2Fwp-admin%2Fedit.php&reauth=1
[Sun Jun 16 18:46:08.978918 2019] [:notice] [pid 14154] [client <SERVER_IP>:52744] mod_hive matched URI <em><u>hidden link</u></em>;.com/wp-login.php (/home/<web_folder>/public_html/wp-login.php) with match 2, referer: <em><u>hidden link</u></em>;.com/wp-login.php
[Sun Jun 16 18:45:58.105780 2019] [:notice] [pid 2541] [client <SERVER_IP>:50026] mod_hive matched URI <em><u>hidden link</u></em>;.com/wp-login.php (/home/<web_folder>/public_html/wp-login.php) with match 2, referer: <em><u>hidden link</u></em>;.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.<DOMAIN_NAME>.com%2Fwp-admin%2F&reauth=1
[Sun Jun 16 18:45:49.891114 2019] [:notice] [pid 2670] [client <SERVER_IP>:48594] mod_hive matched URI <em><u>hidden link</u></em>;.com/wp-login.php (/home/<web_folder>/public_html/wp-login.php) with match 2, referer: <em><u>hidden link</u></em>;.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.<DOMAIN_NAME>.com%2Fwp-admin%2F&reauth=1
[Sun Jun 16 18:44:22.419923 2019] [:notice] [pid 2538] [client <SERVER_IP>:59342] mod_hive matched URI <em><u>hidden link</u></em>;.com/wp-login.php (/home/<web_folder>/public_html/wp-login.php) with match 2, referer: <em><u>hidden link</u></em>;.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.<DOMAIN_NAME>.com%2Fwp-admin%2Fedit.php&reauth=1
[Sun Jun 16 18:43:58.495465 2019] [:notice] [pid 2537] [client <SERVER_IP>:53378] mod_hive matched URI <em><u>hidden link</u></em>;.com/wp-login.php (/home/<web_folder>/public_html/wp-login.php) with match 2, referer: <em><u>hidden link</u></em>;.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.<DOMAIN_NAME>.com%2Fwp-admin%2F&reauth=1
[Sun Jun 16 18:36:22.375436 2019] [:notice] [pid 2571] [client <SERVER_IP>:44032] mod_hive matched URI <em><u>hidden link</u></em>;.com/wp-login.php (/home/<web_folder>/public_html/wp-login.php) with match 2, referer: <em><u>hidden link</u></em>;.com/wp-login.php?redirect_to=https%3A%2F%2Fwww.<DOMAIN_NAME>.com%2Fwp-admin%2F&reauth=1 

NB: I removed the IP address, folder name, and host name.

So how do I troubleshoot this? I tried logging in from 2 different computers, I tried IE and Chrome. I tried Chrome Incognito mode, and I cleaned my cookies. Googling `mod_hive` led me to people hitting the same issue with cookie-related errors.

I tried wp_cli over SSH and received this:

    username@<host>.net [public_html]# wp user list
    Error: Invalid field: user_login.

Any help is welcome.

Thanks.

June 17, 2019 at 5:22 am #4032071

delphineF

Hi,

I did additional checks:

1. I deleted any user_meta properties my blog user has which my other (working) user does not
2. I aligned the values for those properties that are in common (except for first name, last name, description)
3. I cleared the WPML cache.

None of these helped. I have a hunch it could be due to the fact the login page does not understand the multiple languages.

I also used wp user list from the command line. Doing wp user list --field=ID or wp user list --field=roles works but not anything else. I then get errors like Error: Invalid field: user_login

June 17, 2019 at 11:31 am #4034923

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

I have checked debug information you provided - what came to my mind first is that there might be some other plugin interfering with either WPML, WordPress or a combination of all that would not allow you to login. I'm not seeing any " suspicious" plugins, though, so I'm not sure if this is the case.

However, if you only activate WPML, leaving all the other plugins, is the issue still present? Also, when trying to login, can you tell me if the WordPress debug.log is picking up anything?

1. Edit wp-config.php and insert the following lines:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

2. Reproduce the issue.

3. Locate the debug log in: /wp-content/debug.log

4. Paste the latest lines here. No need to paste the entire log file, just 50 lines or so will do. Please censor any sensitive information.

https://codex.wordpress.org/Debugging_in_WordPress

Let me know how it goes - if we get no useful information from the above, I will ask you for a Duplicator package and site credentials, but I'll provide more information related to this part.

Regards,
Bruno Kos

June 17, 2019 at 3:06 pm #4036451

delphineF

Here is what I am getting. i was getting a similar error when trying to create new users (see separate ticket)

[17-Jun-2019 15:03:58 UTC] WordPress database error Duplicate entry '0' for key 'PRIMARY' for query INSERT INTO `wp_usermeta` (`user_id`, `meta_key`, `meta_value`) 
VALUES (1, 'session_tokens', 'a:1:{s:64:\"df98f3231b2ffe26db869d6fede1ae309ee7880094f0312d9f82812b8fd284a5\";a:4:{s:10:\"expiration\";i:1560956638;s:2:\"ip\";s:14:\"98.223.189.202\";s:2:\"ua\";s:115:\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36\";s:5:\"login\";i:1560783838;}}') made by wp_signon, wp_set_auth_cookie, WP_Session_Tokens->create, WP_Session_Tokens->update, WP_User_Meta_Session_Tokens->update_session, WP_User_Meta_Session_Tokens->update_sessions, update_user_meta, update_metadata, add_metadata
June 17, 2019 at 3:08 pm #4036461

delphineF

Shouldn't this table automatically auto_increment the key to avoid

 error Duplicate entry '0' for key 'PRIMARY' for query INSERT INTO `wp_usermeta`

?

June 17, 2019 at 3:18 pm #4036575

delphineF

I think I might have found the conflicting issue - rp4wp_hide_nag user_meta key is set to zero. That breaks the auto_increment. I removed that particular entry from the DB, changed the meta_key to AUTO_INCREMENT, and was able to log in again. I will report the issue to the relevant plugin. My apologies for thinking it was due to your plugin. I believe this might also fix the user creation issue.

June 17, 2019 at 3:18 pm #4036581

delphineF

My issue is resolved now. Thank you!