• Since I updated to WP 3.5, the plugin Redirection are showing “Warning messages”, the plugin still working but I don’t like to see that warning messages when I am using redirection plugin. This is the warning message that appears over all the page of Redirection plugin:

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/wp-content/plugins/redirection/models/group.php on line 70 and defined in /home/wp-includes/wp-db.php on line 990

    Example: https://i.imgur.com/J8C4G.jpg

    Also I got the same message when I am in a “Redirections for group” page and I try to edit any redirection, I get the same message over the field

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/wp-content/plugins/redirection/models/group.php on line 70 and defined in /home/wp-includes/wp-db.php on line 990

    Example: https://i.imgur.com/u3olv.jpg

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

Viewing 11 replies - 16 through 26 (of 26 total)
  • Hello all, this is very strange. I have updated the plugin in all my sites and the error that you are all experiencing is not occurring for me. @sam Scholfield, his fix does the trick but I am curious as to why some have reported this issue and not all.

    I am a novice when it comes to programming and am having trouble with the fix. Can someone offer some guidance on how to get to: /wp-content/plugins/redirection/models/group.php in order to make the change? When I type in my website address followed by: /wp-content/plugins/redirection/models/group.php I get an error message. Any support would be greatly appreciated!

    @kgerber you need to FTP into your server, navigate to the path you mention download the file group.php, edit the file by adding the information mentioned and then upload it again into the same path you downloaded the file from.

    This is the best method to use. Also make a copy of the file you download locally just in case something goes wrong.

    I hope this helps you.

    Kind regards

    Thread Starter Cardoza

    (@cardoza)

    I did this fix and the error is gone, but now my redirection GROUPS won't appear in the drop down menu, so I can't sort or search by group.
    
    Any other suggestions?

    Same problem with me! Sam’s fix the error message, but now I can’t see the groups I created in redirection plugin!

    Someone can help with this big problem please?

    Thread Starter Cardoza

    (@cardoza)

    I found this link php-warning-missing-argument-2-for-wpdb-prepare that might assist you further and understand why you are getting this error.

    I hope this helps

    @cardoza and @kitelife and others with missing groups:

    (Edited to use the solution in current SVN instead)

    Instead of changing $wpdb->prepare to $wpdb->query, just remove the $wpdb->prepare( and the closing ), i.e. change

    $rows = $wpdb->get_results( $wpdb->prepare( "SELECT {$wpdb->prefix}redirection_modules.name AS module_name,{$wpdb->prefix}redirection_groups.name AS group_name,{$wpdb->prefix}redirection_groups.id FROM {$wpdb->prefix}redirection_groups INNER JOIN {$wpdb->prefix}redirection_modules ON {$wpdb->prefix}redirection_modules.id={$wpdb->prefix}redirection_groups.module_id ORDER BY {$wpdb->prefix}redirection_modules.name,{$wpdb->prefix}redirection_groups.position" ) );

    to

    $rows = $wpdb->get_results( "SELECT {$wpdb->prefix}redirection_modules.name AS module_name,{$wpdb->prefix}redirection_groups.name AS group_name,{$wpdb->prefix}redirection_groups.id FROM {$wpdb->prefix}redirection_groups INNER JOIN {$wpdb->prefix}redirection_modules ON {$wpdb->prefix}redirection_modules.id={$wpdb->prefix}redirection_groups.module_id ORDER BY {$wpdb->prefix}redirection_modules.name,{$wpdb->prefix}redirection_groups.position" );

    Warning: Missing argument 2 for wpdb::prepare(), wouldn’t it be nice to here from the author… 3.5 has been out long enough now. Please update your plugin for the community!

    I am hoping for an update as well…

    Even with the fixes above, I still cannot add redirect. Whenever I try to do so, I get the following error message:

    Sorry, but your redirection was not created

    OK, seems like I got it to work…

    /wp-content/plugins/redirection/models/group.php – Following Sam’s tip to change line 70’s $wpdb->prepare to $wpdb->query.

    The error I received went away after I clicked on the Delete button in the plugin’s Options page and re-activated the plugin.

    Hope this helps.

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Warning messages after update to WordPress 3.5’ is closed to new replies.