• Resolved dogacankanat

    (@dogacankanat)


    Hello Lester,

    Thanks for offering this powerful plugin for free. Highly appreciated.

    My issue is with my multisite setup. If you need FTP details please let me know.

    Wordpress 4.7.4 (Multisite) (6 subdirectory blogs under it)
    X Pro 1.0.2 theme
    PHP 7.1.3

    1- Is it OK to have just 1 database table wp_ratings?
    I cant see wp_2_ratings, wp_3_ratings… etc in my database.

    2- I receive below warnings in my wordpress debug. Any idea what causes the issue?

    Table '20646_wp_DATABASENAME_cz.wp_5_ratings' doesn't exist. Konkrétní dotaz: SELECT rating_username, rating_rating, rating_ip FROM wp_5_ratings WHERE rating_postid = 175. P?íslu?ná funkce: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/xpro/single.php'), x_get_view, X_View_Router::render, include('/themes/xpro-child/framework/views/icon/wp-single.php'), get_footer, locate_template, load_template, require_once('/themes/xpro/footer.php'), x_get_view, X_View_Router::render, include('/themes/xpro/framework/legacy/cranium/footers/views/footer/base.php'), x_get_view, X_View_Router::render, include('/themes/xpro/framework/legacy/cranium/footers/views/icon/wp-footer.php'), x_get_view, X_View_Router::render, include('/themes/xpro/framework/legacy/cranium/footers/views/global/_footer-widget-areas.php'), dynamic_sidebar, WP_Widget->display_callback, WP_Widget_Recent_Posts->widget, WP_Query->the_post, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, get_comment_authors_ratings.

    Table '20646_wp_DATABASENAME_cz.wp_5_ratings' doesn't exist. Konkrétní dotaz: SHOW FULL COLUMNS FROMwp_5_ratings. P?íslu?ná funkce: do_action('wp_ajax_nopriv_postratings'), WP_Hook->do_action, WP_Hook->apply_filters, process_ratings.

    Table '20646_wp_DATABASENAME_cz.wp_5_ratings' doesn't exist. Konkrétní dotaz: SELECT rating_username, rating_rating, rating_ip FROM wp_5_ratings WHERE rating_postid = 2. P?íslu?ná funkce: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/xpro/page.php'), x_get_view, X_View_Router::render, include('/themes/xpro/framework/views/icon/wp-page.php'), the_post, WP_Query->the_post, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, get_comment_authors_ratings.

    Table '20646_wp_DATABASENAME_cz.wp_5_ratings' doesn't exist. Konkrétní dotaz: SELECT rating_username, rating_rating, rating_ip FROM wp_5_ratings WHERE rating_postid = 2. P?íslu?ná funkce: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/xpro/page.php'), x_get_view, X_View_Router::render, include('/themes/xpro/framework/views/icon/wp-page.php'), get_footer, locate_template, load_template, require_once('/themes/xpro/footer.php'), x_get_view, X_View_Router::render, include('/themes/xpro/framework/legacy/cranium/footers/views/footer/base.php'), x_get_view, X_View_Router::render, include('/themes/xpro/framework/legacy/cranium/footers/views/icon/wp-footer.php'), x_get_view, X_View_Router::render, include('/themes/xpro/framework/legacy/cranium/footers/views/global/_footer-widget-areas.php'), dynamic_sidebar, WP_Widget->display_callback, WP_Widget_Recent_Posts->widget, WP_Query->the_post, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, get_comment_authors_ratings.

    • This topic was modified 7 years, 11 months ago by dogacankanat.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Lester Chan

    (@gamerz)

    Yeap that is ok, that is how MS database table is named. It seems that the wp_ratings table for your site ID 5 is not created, Did u try to deactivate and activate the plugin again? It should be created.

    Thread Starter dogacankanat

    (@dogacankanat)

    Hello Lester,

    Thanks for your quick response.

    In my database I have only one “wp_ratings” table even though I have 6 sub directory blogs.

    I network activated the plugin, also tried to disable network activate and went to each plugin page separately and activate like that also, but no change.

    I have only one “wp_ratings” table in my database and that’s for the main site. For the other sites I don’t have “wp_2_ratings”, “wp_3_ratings”… etc.

    I can see your module in all blogs admin plugin pages and it seems like it works fine in front-end however, since these tables for each blog is not created automatically I am receiving the error.

    Any idea how to fix that?
    Or any SQL query that I can run in phpmyadmin?
    I need tables for wp_2_ratings to wp_6_ratings.

    Thanks in advance.

    Regards,
    DYK

    Plugin Author Lester Chan

    (@gamerz)

    Here is the SQL code to create the table, just replace the table name from 2 all the way to 6.

    
    CREATE TABLE wp_2_ratings (
      rating_id int(11) NOT NULL AUTO_INCREMENT,
      rating_postid int(11) NOT NULL DEFAULT '0',
      rating_posttitle mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
      rating_rating int(2) NOT NULL DEFAULT '0',
      rating_timestamp varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      rating_ip varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      rating_host varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      rating_username varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      rating_userid int(10) NOT NULL DEFAULT '0',
      PRIMARY KEY (rating_id),
      KEY rating_postid (rating_postid),
      KEY rating_userid (rating_userid),
      KEY rating_postid_ip (rating_postid,rating_ip)
    ) CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
    

    That is weird, it should by right create it when u did a network activate.

    • This reply was modified 7 years, 11 months ago by Lester Chan.
    • This reply was modified 7 years, 11 months ago by Lester Chan. Reason: Argh, I hate BBPress code parser
    • This reply was modified 7 years, 11 months ago by Lester Chan.
    Thread Starter dogacankanat

    (@dogacankanat)

    Hello Lester,

    You are a star ??

    Problem solved after adding tables for each.

    I guess problem can be connected to “MultiSite Clone Duplicator”. When it was cloning the subsites it didn’t create the “wp_ratings” tables for them. But strange part is that, even though i deactivate and reactivate tables not created automatically.

    Anyway, whomever wants to create tables manually for their subsites can use the above SQL query.

    Once more thanks for the fast response and have a nice day.

    Regards,
    DYK

    Plugin Author Lester Chan

    (@gamerz)

    No problem, good day to you too @DYK =)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Multisite Issues’ is closed to new replies.