• Resolved arypneta

    (@arypneta)


    We’ve been getting a lot of messages in our error logs that appear to be created by Redirection (or at least related to it). We have multiple separate sites/networks and have Redirection installed on all of them, but are only seeing these weird logs on one site.

    Is this something that could be generated by your plugin? We’re on the most recent version, but maybe something else is different in our setup on just this one site.

    This is the error message:

    */ 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’), WP_Hook->do_action, WP_Hook->apply_filters, WordPress_Module->init, Red_Item->get_match, do_action(‘redirection_visit’), WP_Hook->do_action, WP_Hook->apply_filters, WordPress_Module->redirection_visit, Red_Item->visit, Red_Redirect_Log::create

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author John Godley

    (@johnny5)

    What is the actual error?

    Thread Starter arypneta

    (@arypneta)

    It’s not an actual error per se, but more of a log message. The bolded text below is what shows up in the error log:

    */ 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’), WP_Hook->do_action, WP_Hook->apply_filters, WordPress_Module->init, Red_Item->get_match, do_action(‘redirection_visit’), WP_Hook->do_action, WP_Hook->apply_filters, WordPress_Module->redirection_visit, Red_Item->visit, Red_Redirect_Log::create

    It seems to log a message each time a redirect is performed, but this isn’t happening on other other sites just the one.

    Is there anything in your plugin that would login informational messages like this? Everything seems to be working, the messages just clog up the error log. If you don’t think you have anything in your code that would log this message, perhaps it’s a conflict with another plugin that I can investigate further.

    Plugin Author John Godley

    (@johnny5)

    No, the plugin doesn’t output any log entries, and particularly not something that would affect one site and not others.

    Thread Starter arypneta

    (@arypneta)

    So, I think I have solved the issue. There was actually an error, but it didn’t show fully in our production error logs. I was able to see it when I spun up a local development environment:

    WordPress database error Unknown error 1054 for query INSERT INTO wp_redirection_logs (url, domain, ip, created, agent, referrer, request_method, http_code, redirection_id, sent_to, redirect_by) VALUES …. 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’), WP_Hook->do_action, WP_Hook->apply_filters, WordPress_Module->init, Red_Item->get_match, do_action(‘redirection_visit’), WP_Hook->do_action, WP_Hook->apply_filters, WordPress_Module->redirection_visit, Red_Item->visit, Red_Redirect_Log::create

    After looking at the table structure between sites, it looks like the site with issues was missing the “request_data” and “redirect_by” columns, which was causing the error. I assume that may be because those columns were added later after we installed Redirection and some migration step was missed.

    Deactivating and re-activating the plugin didn’t automatically add them, so I took a look at 420.php where the database setup was and copied the appropriate SQL queries to create those two columns.

    The messages seem to have stopped and we are seeing data in the log now (which we weren’t before, but I didn’t realize).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Weird error log messages’ is closed to new replies.