• 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: http://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: http://i.imgur.com/u3olv.jpg

    http://wordpress.org/extend/plugins/redirection/

Viewing 15 replies - 1 through 15 (of 26 total)
  • I’m getting the same warning message after WP 3.5 update.

    Unfortunately I’m getting the same thing here. I did a vanilla install of WordPress 3.5 and added just that plugin to confirm there wasn’t anything else possibly conflicting.

    Follow up: Here’s some info from Andrew Nacin posted today (12/12/12) regarding this issue in 3.5. Apparently it is simply a warning. Nothing is technically broken and the plugin will function correctly. However, this could open the plugin up for injection issues. It should be fixed.

    http://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/

    How to fix? Export csv wont work anymore…

    Anonymous User 7324279

    (@anonymized-7324279)

    Sun Dec 16 12:10:34 2012] [error] [client 94.228.34.212] WordPress database error Table ‘xxxxxxxxxxxxxxx.wp_redirection_logs’ doesn’t exist for query INSERT INTO wp_redirection_logs (url,sent_to,created,agent,redirection_id,ip,referrer,module_id,group_id) VALUES (‘/forums/forumdisplay.php?f=7′,”,NOW(),’magpie-crawler/1.1 (U; Linux amd64; en-GB; +http://www.brandwatch.net)’,0,’94.228.34.212′,”,3,0) made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), call_user_func_array, Error404_Module->template_redirect, RE_Log->create

    broken.

    I too am getting an error something like this after WordPress upgrade to 3.5:

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

    Hi All,

    This fix will get rid of the error, please be aware that it is changing the plugin files directly, so it will be overwritten the next time an update is released (which will hopefully contain the fix!)

    Go to /wp-content/plugins/redirection/group.php line 70

    Change $wpdb->prepare to $wpdb->query

    That’s it. prepare is the wrong function here because there isn’t a where clause, so you can’t pass it through a value to sanitise with the prepare function.

    Hope that helps someone!

    Hye,

    Is it

    /wp-content/plugins/redirection/group.php

    or

    /wp-content/plugins/redirection/models/group.php

    because in plugin editor i don’t see that file. And my warning also show models/group.php

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

    Regards,

    blog Naziman

    Hi Naziman,

    Yes it’s in models, sorry! /wp-content/plugins/redirection/models/group.php.

    The function it’s in is get_for_select().

    Regards,
    Sam

    Same error for me. Changing $wpdb->prepare to $wpdb->query removed the error. Thanks Sam.

    Thanks Sam… Your solution worked.

    It worked for me too. Thank you Sam.

    Thanks Sam, this fixed my error too.

    That worked, thanks Sam!

    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?

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