WordPress database table error
-
I get the following error on my site when using the latest version of your plugin. Is this a bug for you to fix?
[29-Jan-2017 01:56:35 UTC] WordPress database error Table ‘x74j0f3g_yutwlep.na5wk83j820u3ifpv2gw_supsystic_ss_shares’ doesn’t exist for query SELECT network_id, COUNT(*) AS total_shares FROM na5wk83j820u3ifpv2gw_supsystic_ss_shares WHERE project_id = 1 AND network_id IN(1,2,3,6,7,18) AND post_id = 2 GROUP BY network_id made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/fortuna/page.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, call_user_func_array, SocialSharing_Projects_Handler->applyContentCallback, SocialSharing_Projects_Handler->build, Rsc_Dispatcher->apply, apply_filters_ref_array, WP_Hook->apply_filters, call_user_func_array, SocialSharing_Shares_Module->filterAddProjectShares, SocialSharing_Shares_Model_Shares->getListProjectPageShares
-
Hi!
I’m sorry for such late reply.You need to re-install the plugin.
If this will not help, open phpmyadmin in cpanel, choose a database and on the SQL tab insert and run the code:CREATE TABLE IF NOT EXISTS%prefix%shares` (
idINT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
network_idINT(11) UNSIGNED NULL DEFAULT NULL,
project_idINT(11) UNSIGNED NULL DEFAULT NULL,
post_idINT(11) UNSIGNED NULL DEFAULT NULL,
timestampTIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id),
INDEXFK_%prefix%shares_%prefix%networks(network_id),
INDEXFK_%prefix%shares_%prefix%projects(project_id),
CONSTRAINTFK_%prefix%shares_%prefix%networksFOREIGN KEY (network_id) REFERENCES%prefix%networks(id) ON DELETE CASCADE ,
CONSTRAINTFK_%prefix%shares_%prefix%projectsFOREIGN KEY (project_id) REFERENCES%prefix%projects(id) ON DELETE CASCADE
)
COLLATE=’utf8_general_ci’
ENGINE=InnoDB
;`where
%prefix%has to be replaced with your database prefix:na5wk83j820u3ifpv2gw_supsystic_ss_I uninstalled the plugin and reinstalled it. Unfortunately this did not help and the error continues to occur as you can see below:
[08-Feb-2017 11:32:08 UTC] WordPress database error Table ‘x74j0f3g_yutwlep.na5wk83j820u3ifpv2gw_supsystic_ss_shares’ doesn’t exist for query SELECT network_id, COUNT(*) AS total_shares FROM na5wk83j820u3ifpv2gw_supsystic_ss_shares WHERE project_id = 1 AND network_id IN(1,2,3,6,7,18) AND post_id = 2 GROUP BY network_id made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/fortuna/page.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, call_user_func_array, SocialSharing_Projects_Handler->applyContentCallback, SocialSharing_Projects_Handler->build, Rsc_Dispatcher->apply, apply_filters_ref_array, WP_Hook->apply_filters, call_user_func_array, SocialSharing_Shares_Module->filterAddProjectShares, SocialSharing_Shares_Model_Shares->getListProjectPageShares
I attempted to run the code which you provided but I’m getting the following error:
#1059 – Identifier name ‘FK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_na5wk83j820u3ifpv2gw_supsystic_ss_networks’ is too long
Hi!
We will fix this problem in next version of Social Share Buttons plugin. I will inform you about the updates.
If you need this fix asap – execute these queries on your database –CREATE TABLE IF NOT EXISTS
na5wk83j820u3ifpv2gw_supsystic_ss_shares(
idINT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
network_idINT(11) UNSIGNED NULL DEFAULT NULL,
project_idINT(11) UNSIGNED NULL DEFAULT NULL,
post_idINT(11) UNSIGNED NULL DEFAULT NULL,
timestampTIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id),
INDEXFK_na5wk83j820u3ifpv2gw_supsystic_ss_networks(network_id),
INDEXFK_na5wk83j820u3ifpv2gw_supsystic_ss_projects(project_id),
CONSTRAINTFK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_networksFOREIGN KEY (network_id) REFERENCESwp_supsystic_ss_networks(id) ON DELETE CASCADE,
CONSTRAINTFK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_projectsFOREIGN KEY (project_id) REFERENCESwp_supsystic_ss_projects(id) ON DELETE CASCADE
)
COLLATE=’utf8_general_ci’
ENGINE=InnoDB
;-
This reply was modified 9 years, 1 month ago by
supsystic.
I attempted to run the code you just provided however I’m getting the following error:
#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘EXISTSna5wk83j820u3ifpv2gw_supsystic_ss_shares ( id INT(11) UNSIGNED NOT NULL A’ at line 1
Hello!
Please try this code –CREATE TABLE IF NOT EXISTS na5wk83j820u3ifpv2gw_supsystic_ss_shares ( id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, network_id INT(11) UNSIGNED NULL DEFAULT NULL, project_id INT(11) UNSIGNED NULL DEFAULT NULL, post_id INT(11) UNSIGNED NULL DEFAULT NULL, timestamp TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), INDEX FK_na5wk83j820u3ifpv2gw_supsystic_ss_networks (network_id), INDEX FK_na5wk83j820u3ifpv2gw_supsystic_ss_projects (project_id), CONSTRAINT FK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_networks FOREIGN KEY (network_id) REFERENCES wp_supsystic_ss_networks (id) ON DELETE CASCADE, CONSTRAINT FK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_projects FOREIGN KEY (project_id) REFERENCES wp_supsystic_ss_projects (id) ON DELETE CASCADE ) COLLATE='utf8_general_ci' ENGINE=InnoDB ;Hello,
Unfortunately the provided code failed. I am using InnoDB as the storage engine as that may or may not make a difference with the code they you are providing.
Error: #1005 – Can’t Create Table — Errno: 150
If you could create a .sql file for me to import with the proper table information perhaps that would be easier since this is the third attempt that has failed so far.
Hi!
Sorry, I made mistake concerning prefixes. Please try this code. It should solve the problem.CREATE TABLE IF NOT EXISTS na5wk83j820u3ifpv2gw_supsystic_ss_shares ( id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, network_id INT(11) UNSIGNED NULL DEFAULT NULL, project_id INT(11) UNSIGNED NULL DEFAULT NULL, post_id INT(11) UNSIGNED NULL DEFAULT NULL, timestamp TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), INDEX FK_na5wk83j820u3ifpv2gw_supsystic_ss_networks (network_id), INDEX FK_na5wk83j820u3ifpv2gw_supsystic_ss_projects (project_id), CONSTRAINT FK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_networks FOREIGN KEY (network_id) REFERENCES na5wk83j820u3ifpv2gw_supsystic_ss_networks (id) ON DELETE CASCADE, CONSTRAINT FK_na5wk83j820u3ifpv2gw_supsystic_ss_shares_projects FOREIGN KEY (project_id) REFERENCES na5wk83j820u3ifpv2gw_supsystic_ss_projects (id) ON DELETE CASCADE ) COLLATE='utf8_general_ci' ENGINE=InnoDB ;The code was applied but I am now seeing the following error:
[14-Feb-2017 22:47:51 UTC] WordPress database error Table ‘x74j0f3g_yutwlep.na5wk83j820u3ifpv2gw_supsystic_ss_shares’ doesn’t exist for query SELECT network_id, COUNT(*) AS total_shares FROM na5wk83j820u3ifpv2gw_supsystic_ss_shares WHERE project_id = 1 AND network_id IN(1,2,3,6,7,18) AND post_id = 24334 GROUP BY network_id made by require(‘wp-blog-header.php’), wp, WP->main, WP->parse_request, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, call_user_func, WP_REST_Posts_Controller->get_items, WP_REST_Posts_Controller->prepare_item_for_response, apply_filters(‘the_excerpt’), WP_Hook->apply_filters, call_user_func_array, SocialSharing_Projects_Handler->applyContentCallback, SocialSharing_Projects_Handler->build, Rsc_Dispatcher->apply, apply_filters_ref_array, WP_Hook->apply_filters, call_user_func_array, SocialSharing_Shares_Module->filterAddProjectShares, SocialSharing_Shares_Model_Shares->getListProjectPageShares
Hello!
Here is the sql file with code – https://www.dropbox.com/s/7g1t9bz7zyme8am/supsystic_shares_create.sql?dl=0
Also tomorrow we will release new version of Social Share Buttons plugin with fixes.It fixed the error this time. Thanks!
Hey team, I installed and re-installed and im getting
database error: [Table ‘df033209201760.wp_0s3ygk95w8_supsystic_ss_views’ doesn’t exist]
ThoughtS?
Hi @marcosamadeo
Here is the sql file with code – https://www.dropbox.com/s/5la8c62z64et76h/views.sql?dl=0
Please try it.Never mind… solved it..
-
This reply was modified 9 years ago by
molamola281.
-
This reply was modified 9 years, 1 month ago by
The topic ‘WordPress database table error’ is closed to new replies.