WordPress database error
-
After installation and activation, On the admin page for the plugin I am seeing this message above the settings tab:
WordPress database error: [Table ‘www3ideal.wp_object_sync_sf_object_map’ doesn’t exist]
SELECT * FROM wp_object_sync_sf_object_map WHERE salesforce_id LIKE “tmp_sf_%”WordPress database error: [Table ‘www3ideal.wp_object_sync_sf_object_map’ doesn’t exist]
SELECT * FROM wp_object_sync_sf_object_map WHERE wordpress_id LIKE “tmp_wp_%”
-
@smartguyus in some server environments, when the plugin activates it is unable to create the required database tables. I’m not sure why this is, as I haven’t been able to figure out which environments have this issue.
But in any case, you can try to create the tables manually and see if that works. Here’s the SQL for them:
CREATE TABLE
wp_object_sync_sf_field_map(
idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
labelvarchar(64) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
namevarchar(64) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
wordpress_objectvarchar(128) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
salesforce_objectvarchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
salesforce_record_types_allowedlongblob,
salesforce_record_type_defaultvarchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
fieldslongtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
pull_trigger_fieldvarchar(128) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ‘LastModifiedDate’,
sync_triggerstext COLLATE utf8mb4_unicode_520_ci NOT NULL,
push_asynctinyint(1) NOT NULL DEFAULT ‘0’,
push_draftstinyint(1) NOT NULL DEFAULT ‘0’,
weighttinyint(1) NOT NULL DEFAULT ‘0’,
versionvarchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
pull_to_draftstinyint(1) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (id),
UNIQUE KEYname(name),
KEYname_sf_type_wordpress_type(wordpress_object,salesforce_object(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;CREATE TABLE
wp_object_sync_sf_object_map(
idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
wordpress_idvarchar(32) COLLATE utf8mb4_unicode_520_ci NOT NULL,
salesforce_idvarbinary(32) NOT NULL DEFAULT ”,
wordpress_objectvarchar(128) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
createddatetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
object_updateddatetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
last_syncdatetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
last_sync_actionvarchar(128) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
last_sync_statustinyint(1) NOT NULL DEFAULT ‘0’,
last_sync_messagevarchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEYsalesforce(salesforce_id),
UNIQUE KEYsalesforce_wordpress(wordpress_object,wordpress_id),
KEYwordpress_object(wordpress_object,wordpress_id),
KEYsalesforce_object(salesforce_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;It’s possible you’ll need to reactivate the plugin after doing this.
Hello,
theCREATE TABLEwp_object_sync_sf_field_map` (
idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
labelvarchar(64) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
namevarchar(64) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
wordpress_objectvarchar(128) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
salesforce_objectvarchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
salesforce_record_types_allowedlongblob,
salesforce_record_type_defaultvarchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
fieldslongtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
pull_trigger_fieldvarchar(128) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ‘LastModifiedDate’,
sync_triggerstext COLLATE utf8mb4_unicode_520_ci NOT NULL,
push_asynctinyint(1) NOT NULL DEFAULT ‘0’,
push_draftstinyint(1) NOT NULL DEFAULT ‘0’,
pull_to_draftstinyint(1) NOT NULL DEFAULT ‘0’,
weighttinyint(1) NOT NULL DEFAULT ‘0’,
versionvarchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT ”,
PRIMARY KEY (id),
UNIQUE KEYname(name),
KEYname_sf_type_wordpress_type(wordpress_object,salesforce_object)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;`
give me the error:
#1709 - Index column size too large. The maximum column size is 767 bytes.Any idea to solved?
@sebastienserre I do not know how to solve that. What version of PHP and MySQL are you using, and who is your host?
Sorry,
https://stackoverflow.com/questions/30761867/mysql-error-the-maximum-column-size-is-767-bytes
should solve.
I didn’t test on my mutualized hoster.I’ve migrated to another dedicated server…. where I didn’t reproduced…
@sebastienserre I don’t think we’re likely to add this into the plugin. From everything I’ve been able to find, it appears to be an issue on older MySQL versions, and it’s unlikely that we can devote much energy to supporting that.
However if there’s a pull request someone submits that fixes the issue without harming more current versions of MySQL, I’d be happy to look at it.
I understand, no problem.
I will push a PR if i ‘ll find a solution 😉I had the same problem on MySQL 5.5
I switched the created, object_updated, and last_sync columns to the following:
$object_map_sql = "CREATE TABLE $object_map_table ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, wordpress_id varchar(32) NOT NULL, salesforce_id varbinary(32) NOT NULL DEFAULT '', wordpress_object varchar(128) NOT NULL DEFAULT '', created timestamp NULL, object_updated timestamp NULL, last_sync timestamp NULL, last_sync_action varchar(128) DEFAULT NULL, last_sync_status tinyint(1) NOT NULL DEFAULT '0', last_sync_message varchar(255) DEFAULT NULL, PRIMARY KEY (id), KEY wordpress_object (wordpress_object,wordpress_id), KEY salesforce_object (salesforce_id) ) $charset_collate";Source: https://stackoverflow.com/questions/4851672/one-mysql-table-with-multiple-timestamp-columns
The topic ‘WordPress database error’ is closed to new replies.