Domain Mapping Plugin filling error_log

I recently updated to the most recent version of the domain mapping plugin and experienced many issues- which I saw the best solution was to revert to a recent working version. Which I did. I've now got 600MB of this error in my log:

[07-May-2016 17:06:49 UTC] WordPress database error Specified key was too long; max key length is 1000 bytes for query CREATE TABLE IF NOT EXISTS wp_domain_mapping_reseller_log (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, user_id BIGINT UNSIGNED NOT NULL, provider VARCHAR(255) NOT NULL, requested_at DATETIME NOT NULL, type TINYINT UNSIGNED NOT NULL, valid TINYINT UNSIGNED NOT NULL, errors TEXT NOT NULL, response TEXT NOT NULL, PRIMARY KEY (id), KEY idx_reseller_log (provider, valid)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/domain-mapping/domain-mapping.php'), domainmap_launch, Domainmap_Plugin->set_module, Domainmap_Module_System->__construct, Domainmap_Module_System->_upgrade, apply_filters('domainmaping_database_upgrade'), call_user_func_array, Domainmap_Module_System->setup_database, Domainmap_Module_System->_exec_queries, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query

Any ideas how to resolve this?

  • Ivan Shulev

    Hey BrandCo ,

    I hope you are having a nice day so far!

    Please backup your database and try adding the following SQL snippet in PHPMyAdmin or any database access tool you have:

    CREATE TABLE IF NOT EXISTS wp_domain_mapping_reseller_log(
    	id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    	user_id BIGINT UNSIGNED NOT NULL,
    	provider VARCHAR(255) NOT NULL,
    	requested_at DATETIME NOT NULL,
    	type TINYINT UNSIGNED NOT NULL,
    	valid TINYINT UNSIGNED NOT NULL,
    	errors TEXT NOT NULL,
    	response TEXT NOT NULL, PRIMARY KEY (id),
    	KEY idx_reseller_log (provider)
    ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

    I hope this helps and I wish you an awesome day ahead!

    Ivan

  • BrandCo

    There was a table for domain_mapping_reseller_log - it was empty. So I dropped the table and ran your command.

    Still seeing this in the error logs:

    [09-May-2016 01:06:04 UTC] WordPress database error Specified key was too long; max key length is 1000 bytes for query CREATE TABLE IF NOT EXISTS wp_domain_mapping_reseller_log (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, user_id BIGINT UNSIGNED NOT NULL, provider VARCHAR(255) NOT NULL, requested_at DATETIME NOT NULL, type TINYINT UNSIGNED NOT NULL, valid TINYINT UNSIGNED NOT NULL, errors TEXT NOT NULL, response TEXT NOT NULL, PRIMARY KEY (id), KEY idx_reseller_log (provider, valid)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/domain-mapping/domain-mapping.php'), domainmap_launch, Domainmap_Plugin->set_module, Domainmap_Module_System->__construct, Domainmap_Module_System->_upgrade, apply_filters('domainmaping_database_upgrade'), call_user_func_array, Domainmap_Module_System->setup_database, Domainmap_Module_System->_exec_queries, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query

  • BrandCo

    Looks like the error is reporting on the domain_mapping_reseller_log as well as the domain_mapping tables.

    [10-May-2016 21:28:58 UTC] WordPress database error Specified key was too long; max key length is 1000 bytes for query CREATE TABLE IF NOT EXISTS wp_domain_mapping_reseller_log (id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, user_id BIGINT UNSIGNED NOT NULL, provider VARCHAR(255) NOT NULL, requested_at DATETIME NOT NULL, type TINYINT UNSIGNED NOT NULL, valid TINYINT UNSIGNED NOT NULL, errors TEXT NOT NULL, response TEXT NOT NULL, PRIMARY KEY (id), KEY idx_reseller_log (provider, valid)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/domain-mapping/domain-mapping.php'), domainmap_launch, Domainmap_Plugin->set_module, Domainmap_Module_System->__construct, Domainmap_Module_System->_upgrade, apply_filters('domainmaping_database_upgrade'), call_user_func_array, Domainmap_Module_System->setup_database, Domainmap_Module_System->_exec_queries, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
    [10-May-2016 21:28:58 UTC] WordPress database error Specified key was too long; max key length is 1000 bytes for query CREATE TABLE IF NOT EXISTS wp_domain_mapping (id BIGINT NOT NULL AUTO_INCREMENT, blog_id BIGINT NOT NULL, domain VARCHAR(255) NOT NULL, active TINYINT DEFAULT 1, PRIMARY KEY (id), KEY blog_id (blog_id, domain, active)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/domain-mapping/domain-mapping.php'), domainmap_launch, Domainmap_Plugin->set_module, Domainmap_Module_System->__construct, Domainmap_Module_System->_upgrade, apply_filters('domainmaping_database_upgrade'), call_user_func_array, Domainmap_Module_System->setup_database, Domainmap_Module_System->_exec_queries, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query

  • Ivan Shulev

    Hey BrandCo ,

    Sorry for the delay and the 1.5GB daily logs (that's a lot :O)!

    I would like you to try the following:

    1. Go to /wp-content/plugins/domain-mapping/classes/Domainmap/Module/System.php

    2. Change line 97 to
    $charset = " DEFAULT CHARACTER SET utf8";

    3. Change line 102 to
    $collate .= " COLLATE utf8_unicode_ci";

    Hopefully this will stop throwing so much errors.

    I hope this helps and I wish you an awesome day ahead!

    Ivan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.