Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP Group Reviews Plugin Error After Upgrading WordPress to 3.5


  • ozgurpolat
    Participant

    @ozgurpolat

    Plugin: BP Group Reviews 1.3.1
    Wordpress 3.5

    I get the following error after upgrading to wordpress 3.5:

    “Warning: Missing argument 2 for wpdb::prepare(), called in /home/kooksj5/public_html/kooksjournal.com/wp-content/plugins/bp-group-reviews/bp-group-reviews.php on line 203 and defined in”

    I fixed the problem by changing the bp-group-reviews.php.

    1.First change:
    Was:

    $wpdb->prepare( “SELECT activity_id, meta_value AS rating FROM {$bp->activity->table_name_meta} WHERE activity_id IN ({$activity_ids}) AND meta_key = ‘bpgr_rating'” ) );

    Is:

    “SELECT activity_id, meta_value AS rating FROM {$bp->activity->table_name_meta} WHERE activity_id IN ({$activity_ids}) AND meta_key = ‘bpgr_rating'” );

    2.Second change:
    was: $wpdb->prepare( ”

    SELECT m1.group_id, m1.meta_value AS rating, m2.meta_value AS rating_count, m3.meta_value AS ratings_enabled
    FROM {$bp->groups->table_name_groupmeta} m1
    LEFT JOIN {$bp->groups->table_name_groupmeta} m2 ON (m1.group_id = m2.group_id)
    LEFT JOIN {$bp->groups->table_name_groupmeta} m3 ON (m1.group_id = m3.group_id)
    WHERE m1.group_id IN ({$group_ids})
    AND m1.meta_key = ‘bpgr_rating’
    AND m2.meta_key = ‘bpgr_how_many_ratings’
    AND m3.meta_key = ‘bpgr_is_reviewable'”

    ) );

    is:

    SELECT m1.group_id, m1.meta_value AS rating, m2.meta_value AS rating_count, m3.meta_value AS ratings_enabled
    FROM {$bp->groups->table_name_groupmeta} m1
    LEFT JOIN {$bp->groups->table_name_groupmeta} m2 ON (m1.group_id = m2.group_id)
    LEFT JOIN {$bp->groups->table_name_groupmeta} m3 ON (m1.group_id = m3.group_id)
    WHERE m1.group_id IN ({$group_ids})
    AND m1.meta_key = ‘bpgr_rating’
    AND m2.meta_key = ‘bpgr_how_many_ratings’
    AND m3.meta_key = ‘bpgr_is_reviewable'”

    ) ;

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘BP Group Reviews Plugin Error After Upgrading WordPress to 3.5’ is closed to new replies.
Skip to toolbar