Database Error when using Marketpress

Hello. Fresh installation of MarketPress on just upgraded version of Wordpress 4.2.2

Getting database error in my logs on the wp-admin backend:

WordPress database error Table 'cm_word4ya.cm_mp_product_attributes' doesn't exist for query SELECT * FROM cm_mp_product_attributes made by require_once('wp-admin/network/admin.php'), require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, Marketpress->register_custom_types, MP_Product_Attributes->register, MP_Product_Attributes->get

On the website front end getting log errors:
WordPress database error Table 'cm_word4ya.cm_mp_terms' doesn't exist for query SELECT * FROM cm_mp_terms WHERE type='product_category' made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/cm_word_4ya/front-page.php'), get_template_part, locate_template, load_template, require('/themes/cm_word_4ya/php/cmLoadPage.php'), get_header, locate_template, load_template, require_once('/themes/cm_word_4ya/header-def.php'), load_template, require_once('/themes/cm_word_4ya/header_inc.php'), wp_head, do_action('wp_head'), call_user_func_array, wp_enqueue_scripts, do_action('wp_enqueue_scripts'), call_user_func_array, MP_Multisite->load_scripts, mp_global_get_terms

To start off with there are no tables by the name cm_mp_terms although that's what it's looking for.

Any idea what's happening here ?

This is a multi-site installation of WordPress.

Thanks.

Jay

  • Rupok

    Hi Jay

    Hope you had a wonderful day.

    WordPress database error Table 'cm_word4ya.cm_mp_product_attributes' doesn't exist

    This is critical. I just checked my database and found "myPrefix_mp_product_attributes" available in my Database. Can you make sure you have this table available? Can you please dump your whole database (if possible), upload to any file sharing service like Dropbox, Google Drive etc. and send us through our secure contact form? I could compare with my Database and could tell you what's actually going on.

    You can send me from here: https://premium.wpmudev.org/contact/

    Subject: "Attn: Rupok"
    - Download Link
    - Link back to this thread for reference
    - Any other relevant URLs

    Select "I have a different question" for your topic. This and the subject line ensure that it gets assigned to me.

    Or you can send us your cPanel/server access through the same way so we can have a look inside your database. Please confirm if this is a live site or not.

    I'm looking forward to hear from you and resolve the issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Jay

    Rupok,

    Unfortunately I really needed a resolution before my flight the following day and I never heard any more back from you.

    So I took it upon myself to do a fresh installation of Wordpress under a different domain name. Low and behold I saw the very same error message:
    WordPress database error Table 'cm_word4ya.cm_mp_product_attributes' doesn't exist for query SELECT * FROM cm_mp_product_attributes made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, Marketpress->register_custom_types, MP_Product_Attributes->register, MP_Product_Attributes->get

    However, when I moved forward a bit further with the Marketpress setup wizard the tables got created and the error stopped appearing.

    This told me that the MP Setup wizard was not completing on the install I was having the problem on. So, I did a dump of those tables from the working multi-site and imported them into the multi-site I could not get working ie;
    -- phpMyAdmin SQL Dump
    -- version 4.0.6deb1
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Mar 10, 2016 at 01:15 PM
    -- Server version: 5.5.37-0ubuntu0.13.10.1-log
    -- PHP Version: 5.5.3-1ubuntu2.6

    SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
    SET time_zone = "+00:00";

    --
    -- Database: cm_word4ya
    --

    -- --------------------------------------------------------

    --
    -- Table structure for table cm_mp_products
    --

    CREATE TABLE IF NOT EXISTS cm_mp_products (
    id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    site_id bigint(20) DEFAULT NULL,
    blog_id bigint(20) DEFAULT NULL,
    blog_public int(2) DEFAULT NULL,
    post_id bigint(20) DEFAULT NULL,
    post_author bigint(20) unsigned NOT NULL DEFAULT '0',
    post_title text NOT NULL,
    post_content longtext NOT NULL,
    post_excerpt longtext NOT NULL,
    post_permalink text NOT NULL,
    post_status varchar(20) NOT NULL,
    post_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    post_date_gmt datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    post_modified datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    post_modified_gmt datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    price decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
    sales_count bigint(20) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

    -- --------------------------------------------------------

    --
    -- Table structure for table cm_mp_product_attributes
    --

    CREATE TABLE IF NOT EXISTS cm_mp_product_attributes (
    attribute_id int(11) unsigned NOT NULL AUTO_INCREMENT,
    attribute_name varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT '',
    attribute_terms_sort_by enum('ID','ALPHA','CUSTOM') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    attribute_terms_sort_order enum('ASC','DESC') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    PRIMARY KEY (attribute_id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ;

    -- --------------------------------------------------------

    --
    -- Table structure for table cm_mp_product_attributes_terms
    --

    CREATE TABLE IF NOT EXISTS cm_mp_product_attributes_terms (
    attribute_id int(11) unsigned NOT NULL,
    term_id bigint(20) unsigned NOT NULL,
    PRIMARY KEY (attribute_id,term_id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

    -- --------------------------------------------------------

    --
    -- Table structure for table cm_mp_terms
    --

    CREATE TABLE IF NOT EXISTS cm_mp_terms (
    term_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    name varchar(200) NOT NULL DEFAULT '',
    slug varchar(200) NOT NULL DEFAULT '',
    type varchar(20) NOT NULL DEFAULT 'product_category',
    count bigint(10) NOT NULL DEFAULT '0',
    PRIMARY KEY (term_id),
    KEY name (name)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

    -- --------------------------------------------------------

    --
    -- Table structure for table cm_mp_term_relationships
    --

    CREATE TABLE IF NOT EXISTS cm_mp_term_relationships (
    post_id bigint(20) unsigned NOT NULL,
    term_id bigint(20) unsigned NOT NULL,
    PRIMARY KEY (post_id,term_id),
    KEY term_id (term_id)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

    That did the trick. Problem resolved. Not sure why the would not get created by MP but that solved it in case you run into this again.

    The fact you had those tables on your machine was of some value. However, not knowing if you were using a multi-site install or single site left questions in my mind.

    Thanks for your effort yesterday.

    Jay

  • Jay

    Rupok,

    Unfortunately I really needed a resolution before my flight the following day and I never heard any more back from you.

    So I took it upon myself to do a fresh installation of Wordpress under a different domain name. Low and behold I saw the very same error message:
    WordPress database error
    Table 'cm_word4ya.cm_mp_product_attributes' doesn't exist for query SELECT * FROM cm_mp_product_attributes made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, Marketpress->register_custom_types, MP_Product_Attributes->register, MP_Product_Attributes->get

    However, when I moved forward a bit further with the Marketpress setup wizard the tables got created and the error stopped appearing.

    This told me that the MP Setup wizard was not completing on the install I was having the problem on. So, I did a dump of those tables from the working multi-site and imported them into the multi-site I could not get working ie;
    -- phpMyAdmin SQL Dump

    CREATE TABLE IF NOT EXISTS cm_mp_products (
    id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    site_id bigint(20) DEFAULT NULL,
    blog_id bigint(20) DEFAULT NULL,
    blog_public int(2) DEFAULT NULL,
    post_id bigint(20) DEFAULT NULL,
    post_author bigint(20) unsigned NOT NULL DEFAULT '0',
    post_title text NOT NULL,
    post_content longtext NOT NULL,
    post_excerpt longtext NOT NULL,
    post_permalink text NOT NULL,
    post_status varchar(20) NOT NULL,
    post_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    post_date_gmt datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    post_modified datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    post_modified_gmt datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    price decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
    sales_count bigint(20) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (id)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

    CREATE TABLE IF NOT EXISTS cm_mp_product_attributes (
    attribute_id int(11) unsigned NOT NULL AUTO_INCREMENT,
    attribute_name varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT '',
    attribute_terms_sort_by enum('ID','ALPHA','CUSTOM') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    attribute_terms_sort_order enum('ASC','DESC') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    PRIMARY KEY (attribute_id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ;

    CREATE TABLE IF NOT EXISTS cm_mp_product_attributes_terms (
    attribute_id int(11) unsigned NOT NULL,
    term_id bigint(20) unsigned NOT NULL,
    PRIMARY KEY (attribute_id,term_id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

    CREATE TABLE IF NOT EXISTS cm_mp_terms (
    term_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    name varchar(200) NOT NULL DEFAULT '',
    slug varchar(200) NOT NULL DEFAULT '',
    type varchar(20) NOT NULL DEFAULT 'product_category',
    count bigint(10) NOT NULL DEFAULT '0',
    PRIMARY KEY (term_id),
    KEY name (name)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

    CREATE TABLE IF NOT EXISTS cm_mp_term_relationships (
    post_id bigint(20) unsigned NOT NULL,
    term_id bigint(20) unsigned NOT NULL,
    PRIMARY KEY (post_id,term_id),
    KEY term_id (term_id)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

    That did the trick. Problem resolved. Not sure why the would not get created by MP but that solved it in case you run into this again.

    The fact you had those tables on your machine was of some value. However, not knowing if you were using a multi-site install or single site left questions in my mind.

    Thanks for your effort yesterday.

    Jay

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.