• Resolved M

    (@infolegal)


    Full description of warning is: Warning: Missing argument 2 for wpdb::prepare(), called in /public_html/wp-content/plugins/redirection/models/group.php on line 70 and defined in /public_html/wp-includes/wp-db.php on line 992

    Looks like there’s some sort of conflict with the newly launched WP 3.6. Fixing this will be really appreciated, since this plugin has proved to be an indispensible one.

    Thank you!

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

Viewing 15 replies - 16 through 30 (of 34 total)
  • I see that I have this error on the redirection setting page:
    Warning: Missing argument 2 for wpdb::prepare(), called in /home/tweendev/public_html/earnix/wp-content/plugins/redirection/models/group.php on line 70 and defined in /home/tweendev/public_html/earnix/wp-includes/wp-db.php on line 992

    but there is no update request to this plugin – so I understand that I am using the final version, right? and if I understand right, the final version need to fix this error – right? so why do I see this error?

    @laserjobs: thank you for posting the fix.
    Worked for one of my sites as well.

    Here is the temporary fix
    https://gist.github.com/theandystratton/4565222

    On line 70 of redirection/models/group.php
    Remove the “( $wpdb->prepare” and ” )” at the end

    but –
    I cant fined in the plugin folder a PHP file with this name:
    redirection-models-group.php

    OK,
    I Placed the fix code in the “group.php” file.
    and this internal error gone
    BUT-the homepage is still blank!!!

    can someone here help me?

    @laserjobs: thanks! Works like a champ.

    @baraklevy – the file is not redirection-models-group.php That was the path – Look in your wp-content folder, then in the plugins folder, then in the redirection folder, then in the models folder. In here you will find the file group.php

    Navigate to line 70 and make the changes. If you go to the github page (https://gist.github.com/theandystratton/4565222), it shows you the old line 70 and the new line 70 with explanations.

    Hope this helps!

    Thx laserjobs – fix seems to clean up the error just fine.

    I think johnny5 (aka John Godley) has a new baby girl and may be a little busy, but don’t know for sure. Found pics on johngodley.com blog.

    If that’s you man, thank you for the plugin. I know if I ever had to choose between spending time with my beautiful baby daughter and us pranksters … well … I’d sit her on my lap while I worked, but that’s just me. ??

    Congratulations and take care.
    Best,
    Frank

    The plugin gives the following error :
    Warning: Missing argument 2 for wpdb::prepare(), called in /home/wima/domains/info-suriname.com/public_html/suriname/wp-content/plugins/redirection/models/group.php on line 70 and defined in /home/wima/domains/info-suriname.com/public_html/suriname/wp-includes/wp-db.php on line 992

    i used the hot fix:
    $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” );

    Bud then it gives a error again:
    Parse error: syntax error, unexpected ‘;’ in /home/wima/domains/info-suriname.com/public_html/suriname/wp-content/plugins/redirection/models/group.php on line 70

    This error is caused because the ) at the end cannot be removed can you please tel me how to fix this.

    wp-includes/wp-db.php in line 992:

    Replace this:

    function prepare( $query, $args ) {
    if ( is_null( $query ) )
    return;

    With:

    function prepare( $query, $args = null ) {
    if ( is_null( $query ) )
    return;

    It will fix wordpress 3.6 ??

    @cobrabb
    Perfect
    you solved my issue

    today i just updated my wordpress theme with latest one 3.7
    and i got this error
    after long surfing i got the solution at here
    thanks for the solution

    Excellent!!

    You solved my issue cobrabb. Eternally Grateful

    Thank you very much!!

    Juan Carlos

    (@jyegestiones)

    Hi, I have a similar error.
    Warning: Missing argument 2 for wpdb::prepare(), called in /home/user_cpanel/public_html/wp-content/plugins/limit-bogs-per-user.php on line 112 and defined in /home/user_cpanel/public_html/wp-includes/wp-db.php on line 992

    these are the codes:
    /public_html/wp-content/plugins/limit-bogs-per-user.php on line 112 = $role=$wpdb->get_results($wpdb->prepare($role_sql),ARRAY_A);

    public_html/wp-includes/wp-db.php on line 992 =
    function prepare( $query, $args ) {

    Any suggestions?
    thank you very much

    cobrabb

    (@cobrabb)

    WordPress theme and Wp version?

    Juan Carlos

    (@jyegestiones)

    Hello, wordpress version I have is 3.7.1, is a version in Spanish

    cobrabb

    (@cobrabb)

    In your plugin directory find the file /limit-bogs-per-user.php, past code here.

    From
    //check if the user is blog admin” around line 105

    to

    //clean the role

Viewing 15 replies - 16 through 30 (of 34 total)
  • The topic ‘Missing argument 2 for wpdb::prepare()’ is closed to new replies.