AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] DB errors

21 Posts
2 Users
1 Reactions
14.9 K Views
Posts: 1593
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@anonymous20)
Noble Member
Joined: 10 years ago
[#5478]

Hello.

I see 3 of those errors (one per update ?)  in my debug.log

[11-Jan-2018 08:22:19 UTC] WordPress database error Specified key was too long; max key length is 767 bytes for query ALTER TABLE `wp_wpforo_subscribes` ADD UNIQUE KEY `fld_group_unq`( `itemid`, `type`, `userid`, `user_email` ) made by require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, wpforo_update, wpforo_activation


20 Replies
Robert
Posts: 10752
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 3 months ago

I see the Unique key has not been created for _wpforo_subscription table. Please execute these SQLs to add it:

ALTER TABLE `wp_wpforo_subscribes`
CHANGE COLUMN `user_name` `user_name` VARCHAR(99) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_520_ci' AFTER `active`,
CHANGE COLUMN `user_email` `user_email` VARCHAR(99) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_520_ci' AFTER `user_name`;

ALTER TABLE `wp_wpforo_subscribes` ADD UNIQUE INDEX `itemid_type_user_name_user_email` (`itemid`, `type`, `user_name`, `user_email`);

 

Don't forget to change the wp_ table prefis if your database tables prefix is not wp_ .


Posts: 1593
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@anonymous20)
Noble Member
Joined: 10 years ago

Doing what you suggest, i get:

 

#1062 - Duplicate entry '12-topic--' for key 'itemid_type_user_name_user_email'

 


Posts: 1593
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@anonymous20)
Noble Member
Joined: 10 years ago

Also it seems that if i didn't had the option WP Debug to log, that error would exist but i would never know about it.

I'm pretty sure others also have it and don't know it.

So the question is why this happened in the first place ? I have an extremely stable and controled hosting plan, so hosting is not an issue.

I feel a bit unconfortable with DB errors.

 


Robert
Posts: 10752
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 3 months ago

Just delete all duplicated entries, try as many times as it returns error and delete all duplicated entries. Once all are deleted the SQL will work and problem will be fixed.


Page 1 / 4
Share: