• I’m running a WordPress 4.3.1 multisite with Redirection 2.4.1. My error logs are full of statements that look like this:

    WordPress database error Table ‘wp_ceyehost01.wp_2_redirection_items’ doesn’t exist for query SELECT wp_2_redirection_items.*,wp_2_redirection_groups.position AS group_pos FROM wp_2_redirection_items INNER JOIN wp_2_redirection_groups ON wp_2_redirection_groups.id=wp_2_redirection_items.group_id AND wp_2_redirection_groups.status=’enabled’ AND wp_2_redirection_groups.module_id=1 WHERE (wp_2_redirection_items.regex=1 OR wp_2_redirection_items.url=’/feed/’) /* From [example.org/feed/] in [/nas/wp/www/cluster-41760/ceyehost01/wp-content/plugins/redirection/models/redirect.php:75] */ made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, WordPress_Module->init, Red_Item::get_for_url

    The problem appears to affect all the sites in the multisite.

    https://www.ads-software.com/plugins/redirection/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Same problem here.

    Plugin Author John Godley

    (@johnny5)

    Your redirection_items database table does not seem to exist.

    Did you have Redirection installed before and this is happening only since 2.4.1?
    Did you have any errors when installing?

    Thread Starter markstockley

    (@markstockley)

    The problem predates 2.4.1, it’s certainly been happening for months but I couldn’t tell you exactly when it started (I don’t have direct access to error log).

    I don’t recall seeing any error messages when installing nor exactly when I installed it. All I can say for sure is that it’s one of my ‘must have’ plugins and I normally install it as a matter of course when setting up a new site.

    I have just created test redirects on both the parent site and a child site (site id 2) – both worked correctly.

    If I run “SHOW TABLES LIKE ‘wp_2_redirection_%'” I get the following tables listed:

    wp_2_redirection_404
    wp_2_redirection_groups
    wp_2_redirection_items
    wp_2_redirection_logs

    Kind regards

    M.

    Same here – but new occurance on previously installed instance

    [23-Sep-2015 14:54:22 UTC] WordPress database error Table ‘909769_natureslens.wtv_redirection_items’ doesn’t exist for query SELECT wtv_redirection_items.*,wtv_redirection_groups.tracking,wtv_redirection_groups.position AS group_pos,wtv_redirection_modules.id AS module_id FROM wtv_redirection_items INNER JOIN wtv_redirection_groups ON wtv_redirection_groups.id=wtv_redirection_items.group_id AND wtv_redirection_groups.status=’enabled’ INNER JOIN wtv_redirection_modules ON wtv_redirection_modules.id=wtv_redirection_groups.module_id AND wtv_redirection_modules.type=’wp’ WHERE( wtv_redirection_items.regex=1 OR wtv_redirection_items.url=’/worldwide-tours/’) made by require(‘wp-blog-header.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), call_user_func_array, WordPress_Module->init, Red_Item::get_for_url

    Plugin Author John Godley

    (@johnny5)

    Mark, do you still get the errors after disabling the plugin?

    Thread Starter markstockley

    (@markstockley)

    Yes.

    I checked the error log, requested the home page of site 7, checked the error log again and saw the error. I then network deactivated the plugin, visited the home page of site 7, checked the log again and there were no new entries. I then network activated the plugin, visited the home page of site 7, checked the log again and saw a new error.

    Kind regards

    M.

    I can confirm this as well on a brand new install of WP. I’m using WP-CLI to kickstart my WP site. After installing and enabling the Redirection plugin the output is full of errors like this:

    WordPress database error Table 'wordpress.wp_redirection_items' doesn't exist for query SELECT wp_redirection_items.*,wp_redirection_groups.position AS group_pos FROM wp_redirection_items INNER JOIN wp_redirection_groups ON wp_redirection_groups.id=wp_redirection_items.group_id AND wp_redirection_groups.status='enabled' AND wp_redirection_groups.module_id=1 WHERE (wp_redirection_items.regex=1 OR wp_redirection_items.url='') made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/php/wp-cli.php'), require('phar:///usr/local/bin/wp/php/wp-settings-cli.php'), do_action('init'), call_user_func_array, WordPress_Module->init, Red_Item::get_for_url

    Doesn’t actually seem to affect anything other than cluttering up the output/logs. Disabling the plugin gets rid of the errors.

    FGD

    (@creativetopia)

    Same Issue Here. My Error Log is huge. This was a clean install.

    To fix the above issue, you must change the values ‘255’ and ‘200’ over to ‘191’ on your redirection/models/database.php then, you must have to disable and re-enable the plugin, if it’s a MU installation, you have to go to Tools > Redirection > Options > and click on the “Delete” button (if you have redirects on place, then make sure to do a back up prior doing this step). then check again, and it should work just fine.

    The issue is with InnoDB, this has a maximum index length of 767 bytes for tables that use a COMPACT or REDUNDANT row format, so for utf8 or utf8mb4 columns, you can index a maximum of 255 or 191 characters, respectively. If you currently have utf8 columns with indexes longer than 191 characters, you will need to index a smaller number of characters.

    In our cases, we use utf8mb4, hence the problem.

    The only issue is that you must replace such values every time you run an upgrade, I ended up writing a script that does it for me.

    @author, please help us and update such values by default ??

    Regards!

    In case you desire to manually update the file, here’s a pull request:
    https://github.com/johngodley/redirection/pull/123

    Just check the Files changed comparison and update accordingly.

    Thanks for posting the solution to this problem, @luigitec. Additionally, I appreciate your comment about handling the fix on an MU installation. It helped me resolve the issue after mere editing didn’t.

    I wanted to add a note here in case others run across the same issue and think the fix doesn’t resolve the problem. Before giving up, be sure you’re not on a multi-site install.

    In the instance I was dealing with, the client had a site on Bluehost that moved from shared to its managed WP hosting, and I didn’t realize the site was on an MU install.

    Another word on deleting the data, which is required for the MU fix: It’s not a big deal to set things up again if you download your redirects. Where to download, however, is not readily apparent.

    Look under Tools > Redirection > Modules, then hover your cursor below the module you’re using to see download options. In my case this was WP and I downloaded a CSV.

    After wiping the data via the delete button you’ll need to recreate a Group to receive the re-imported redirects. I forgot about this so the first import didn’t show up anywhere. But I can confirm that, when the redirects have a group to go back into, the CSV Import (under Options) restores them perfectly.

    Now the client’s error log is a zero-byte file. Yay ??

    Awesome, I’m glad I was able to help! ?? Let’s just hope the Author @john Godley approves my pull request for the next release.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘WordPress database error Table … doesn't exist for query’ is closed to new replies.