• Resolved mehmeh

    (@mehmeh)


    [20-May-2016 16:29:07 UTC] do_action(‘wp_ajax_nopriv_update_views_ajax’), call_user_func_array, WordPressPopularPosts->update_views_ajax, WordPressPopularPosts->__update_views, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query tarafından oluşturulan INSERT INTO wordpress_popularpostssummary
    (postid, pageviews, view_date, last_viewed) VALUES (38172, 1, ‘2016-05-20’, ‘2016-05-20 19:29:07’)
    ON DUPLICATE KEY UPDATE pageviews = pageviews + 1, last_viewed = ‘2016-05-20 19:29:07’; sorgusu için WordPress veritabanı hatası (means for query WordPress Database error) Table ‘wordpress_popularpostssummary’ doesn’t exist

    [20-May-2016 16:29:07 UTC] do_action(‘wp_ajax_nopriv_update_views_ajax’), call_user_func_array, WordPressPopularPosts->update_views_ajax, WordPressPopularPosts->__update_views, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query tarafından oluşturulan INSERT INTO wordpress_popularpostssummary
    (postid, day, last_viewed, pageviews) VALUES (31864, ‘2016-05-20 19:29:07’, ‘2016-05-20 19:29:07’, 1)
    ON DUPLICATE KEY UPDATE pageviews = pageviews + 1, last_viewed = ‘2016-05-20 19:29:07’; sorgusu için WordPress veritabanı hatası (means for query WordPress Database error) Table ‘wordpress_popularpostssummary’ doesn’t exist

    Is this because my database has some tables missing as the log suggests or is it something else? Any idea why they are missing and how I can create them?

    Thank you

    https://wordpress.org/plugins/wordpress-popular-posts/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi there!

    Indeed, the server is telling you that the table wordpress_popularpostssummary doesn’t exist. Try this:

    1. Go to the admin section and then to Plugins.
    2. Find the WordPress Popular Posts plugin and deactivate it.
    3. Activate it again.

    This should reinstall the missing table on your database. Please let me know how it goes.

    Thread Starter mehmeh

    (@mehmeh)

    I tried to uninstall/delete plugin files and reinstall it but it didn’t fix. I guess it might be a permission issue. I imagine I will have to manually run some query on phpmyadmin to create the tables? Can you give me necessary query/queries for it?

    Thank you

    Plugin Author Hector Cabrera

    (@hcabrera)

    Ok, this is the query you need to run to create the summary table:

    CREATE TABLE wordpress_popularpostssummary (
        ID bigint(20) NOT NULL AUTO_INCREMENT,
        postid bigint(20) NOT NULL,
        pageviews bigint(20) NOT NULL DEFAULT 1,
        view_date date NOT NULL DEFAULT '0000-00-00',
        last_viewed datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
        PRIMARY KEY  (ID),
        UNIQUE KEY ID_date (postid,view_date),
        KEY postid (postid),
        KEY view_date (view_date),
        KEY last_viewed (last_viewed)
    ) ENGINE=INNODB;
    Thread Starter mehmeh

    (@mehmeh)

    What should I use to create popularpostsdata table?

    This?

    CREATE TABLE wordpress_popularpostsdata (
        ID bigint(20) NOT NULL AUTO_INCREMENT,
        postid bigint(20) NOT NULL,
        pageviews bigint(20) NOT NULL DEFAULT 1,
        view_date date NOT NULL DEFAULT '0000-00-00',
        last_viewed datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
        PRIMARY KEY  (ID),
        UNIQUE KEY ID_date (postid,view_date),
        KEY postid (postid),
        KEY view_date (view_date),
        KEY last_viewed (last_viewed)
    ) ENGINE=INNODB;
    Thread Starter mehmeh

    (@mehmeh)

    Hector are you around? Please provide the command to create the popularpostsdata as well. Thank you very much.

    Thread Starter mehmeh

    (@mehmeh)

    By the way this code doesn’t work for me, it says:

    #1005 - Can't create table 'database_database.wordpress_popularpostssummary' (errno: -1) (Details…)

    Details are:

    InnoDB  Documentation
    
    Supports transactions, row-level locking, and foreign keys

    I’ve researched and I guess this is a problem about UNIQUE KEY but not sure how to get around it? Can you possibly tell me how to do this?

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hey there!

    Use this query to create the popularpostsdata table:

    CREATE TABLE wordpress_popularpostsdata (
        postid bigint(20) NOT NULL,
        day datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
        last_viewed datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
        pageviews bigint(20) DEFAULT 1,
        PRIMARY KEY  (postid)
    ) ENGINE=INNODB;

    About the error, I’m honestly not sure as I’ve never ran into this problem. Try running the queries again but this time change ENGINE=INNODB into ENGINE=InnoDB and see if it fixes the issue.

    Thread Starter mehmeh

    (@mehmeh)

    I found out this is a complex problem about INNODB. I worked out a solution by changing the table name.

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Error log filled with these’ is closed to new replies.