Support » Plugin: Redirection » Install bug – read this the plugin isn’t working for you

  • On line 97 of upgrade redirection/models/database.php is the following line, which, during installation, sets up the defaults groups and monitoring options.

    if ( $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}redirection_groups" ) === 0 ) {

    This line *always returns false*, as $wpdb->get_var returns a string, not an integer value.

    With this part of the installation not running, many features are completely broken on install – you can’t add a redirect, the monitoring settings keep getting disabled, and so on.

    Change === to == and everything is fixed.

    Note – if you’ve already installed the plugin, it won’t help since this function is only run on install. Uninstalling and reinstalling should work; or if you know how, you can just run the code within that if statement manually.

  • The topic ‘Install bug – read this the plugin isn’t working for you’ is closed to new replies.