A few days ago I received a message from user on support forum. He wrote about problem with the styles table in the plugin. Over the lifetime of the plugin such problems was not happened, but … I visited the admin area of his blog – really, the problem is obvious. A brief research revealed the following. WP 4.2 now supports charset utf8mb4, and determines the possibility of using it automatically according to the version of MySQL (must be 5.5.3+). This user uses a special version of MySQL (5.5.42-cll) that must but does not support this charset. As a result – error when creating the table with all the consequences.
What to do? Below is a small instruction how to combat this problem.
Open phpMyAdmin or if you do not have access to it install any of the plugins that allows you to run SQL scripts (for example: SQL Executioner, MiwoSQL etc.). You need to execute two SQL scripts.
CREATE TABLE [PREFIX]_stb_styles (
slug varchar(255) NOT NULL,
caption varchar(255) NOT NULL,
js_style text DEFAULT NULL,
css_style text DEFAULT NULL,
stype varchar(8) DEFAULT NULL,
trash tinyint(1) DEFAULT 0,
PRIMARY KEY (slug)
CHARACTER SET utf8
This script creates a style table and set its charset to utf8. Do not forget to change [PREFIX] to the real prefix of your database (usually wp).
INSERT INTO [PREFIX]_stb_styles(slug, caption, stype, trash)
('alert', 'Alert!', 'system', 0),
('black', 'Black Quote', 'system', 0),
('custom', 'Custom Style', 'custom', 0),
('download', 'Download', 'system', 0),
('grey', 'Codes', 'special', 0),
('info', 'Info', 'system', 0),
('warning', 'Warning!', 'system', 0);
This script fills in the table with the default data. Do not forget to change [PREFIX] to the real prefix of your database (usually wp).
After completing both scripts, go to “Themes” page of the plugin and activate any theme.
What STB Pro users must to do in this case you can learn here…
That’s all. Good luck!
© 2015, minimus. All rights reserved.