Issues with Plugin Activation – Database Table Creation
-
Hello,
I’m experiencing issues with the activation of the “Widgets for Google Reviews” plugin on my WordPress site. During the activation process, I receive the following error:
see image: https://snipboard.io/k9F8WB.jpg
Plugin activation failed because the required database tables could not be created!
We got the following error from the database:
Run the following SQL codes in your database administration interface (e.g., PhpMyAdmin) to create the tables:
CREATE TABLE JwIOM1_trustindex_google_reviews (idTINYINT(1) NOT NULL AUTO_INCREMENT,hiddenTINYINT(1) NOT NULL DEFAULT 0,userVARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,user_photoTEXT,textTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,ratingDECIMAL(3,1),highlightVARCHAR(11),dateDATE,reviewIdTEXT,replyTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
PRIMARY KEY (id)
)
Then try activating the plugin again.Steps I’ve Taken:
- I accessed the
schema.phpfile and addedIF NOT EXISTSto the SQL command to avoid errors if the table already exists. Here is the modified SQL command:
$ti_db_schema = [
‘reviews’ => “
CREATE TABLE IF NOT EXISTS “. $this->get_tablename(‘reviews’) .” (idTINYINT(1) NOT NULL AUTO_INCREMENT,hiddenTINYINT(1) NOT NULL DEFAULT 0,userVARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,user_photoTEXT,textTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,ratingDECIMAL(3,1),highlightVARCHAR(11),dateDATE,reviewIdTEXT,replyTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
PRIMARY KEY (id)
)
“
];2. I verified that the configuration settings of my site are identical to those of other sites on the same server where the plugin works without issues.
Despite these steps, the plugin still fails to activate and the same errors persist.Request for Assistance:
Could you please assist me in resolving these issues? Specifically, I would like guidance on the correct configuration of database table creation during plugin activation.
Any help or suggestions would be greatly appreciated.
Thank you very much!
Best regards,
DavidThe page I need help with: [log in to see the link]
- I accessed the
The topic ‘Issues with Plugin Activation – Database Table Creation’ is closed to new replies.