• Resolved okappy

    (@okappy)


    I am using WordPress with Apache2.4, PHP7.0.27 and MariaDB 10.1.14.

    I am seeing two errors frequently in our apache error_log

    WordPress database error Table ‘wp_forum_topics’ already exists for query RENAME TABLE wp_forum_threads TO wp_forum_topics; made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘plugins_loaded’), WP_Hook->do_action, WP_Hook->apply_filters, AsgarosForumDatabase->buildDatabase

    and

    WordPress database error Too many keys specified; max 64 keys allowed for query ALTER TABLE wp_forum_topics ADD FULLTEXT (name); made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘plugins_loaded’), WP_Hook->do_action, WP_Hook->apply_filters, AsgarosForumDatabase->buildDatabase

    Please advise how i resolve these errors.

    Thanks
    Richard

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Asgaros

    (@asgaros)

    Hello @okappy

    I guess that those errors occur during an update. In the first one a database-table is renamed from wp_forum_threads to wp_forum_topics. It seems that this already has been done but the old table still exists. You can check via phpMyAdmin if there is still an old wp_forum_threads table and remove it.

    The second problem seems to be that an index is create over and over again in your wp_forum_topics database. I dont know why this happens. Can you check the current “asgarosforum_db_version” value in your wp_options database?

    Thread Starter okappy

    (@okappy)

    Hi @asgaros

    Thanks for getting back to me so promptly. I’ve deleted the wp_forum_topics table now.

    For the second problem, the asgarosforum_db_version is 19.

    Plugin Author Asgaros

    (@asgaros)

    Not sure why the indexes are created over and over again. Maybe something went wrong during an update once (because the version seems to be up2date now). You can try to delete existing duplicate-indexes for name in the wp_forum_topics table.

    Thread Starter okappy

    (@okappy)

    Thanks, i’ve tried that but they just get created again. I also tried changing the asgarosforum_db_version to 20 but that didn’t make a difference

    Plugin Author Asgaros

    (@asgaros)

    This logic should not even get executed when the value is 20. So it seems that the version could not get retrieved correctly. Are you using the plugin on a multisite-installation?

    Thread Starter okappy

    (@okappy)

    No, the plugin is being used on a single site only

    Thread Starter okappy

    (@okappy)

    I saw there was an update to the plugin which i installed. Now asgarosforum_db_version says its version 18, if i try and manually change it in the database to 20 it gets updated straight away back to 18. However, i’ve commented the line

    $this->db->query('ALTER TABLE '.$this->tables->topics.' ADD FULLTEXT (name);');

    which has worked this time and it is now not creating lots of indexes so fixed at least temporarily.

    • This reply was modified 8 years, 3 months ago by okappy.
    Plugin Author Asgaros

    (@asgaros)

    Can you check if you are using the latest file? It should not be possible that it is set back to 18 (there is not even a logic for this in the code). Please check the file includes/forum-database.php. Is the version-number at the beginning equal 20?

    Thread Starter okappy

    (@okappy)

    Yes it has private $db_version = 20;

    Thread Starter okappy

    (@okappy)

    I think i might have resolved it. We have some other servers running behind a load balancer. One of those servers had a version of 18 so I guess it was that one was conflicting with our main server. I’ve removed your plugin on that server for now and downloaded the latest version of your plugin on our main server, everything seems to be working ok.

    Thanks for all your help and suggestions.

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

The topic ‘WordPress database error’ is closed to new replies.