Home Forums Buddypress live notification unexpected token or wpdb::prepare(); error [Solved]

This topic contains 0 replies, has 1 voice, and was last updated by  Jigesh Raval 12 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #912 Reply

    Jigesh Raval
    Participant

    Buddypress live notification plugin do not work with wordpress 3.6,3.7 and later, i tried to find the solution and here it is.

    Problem is:

    wpdb::prepare requires two parameters, example like this  $wpdb->prepare($param1,$param2); 

    if you examine bp-live-notification.php line number 152 than there first query is "SELECT * FROM {$bp->core->table_name_notifications} WHERE id in {$list_ids} AND is_new = 1" but second query is out of bracket and that is digit 1 so it do not work.

    Solution:

    in order to use wpdb::prepare(); statement we can either combine two queries but with some reason bubble wasn’t appearing but notification bar in top was updating, to overcome it, i removed statement wpdb::prepare();

    Here is code to replace:

    $notifications =$wpdb->get_results( "SELECT * FROM {$bp->core->table_name_notifications} WHERE id in {$list_ids} AND is_new = 1");

    Hope this help, do not forget to leave a comment. Thanks.

Viewing 1 post (of 1 total)
Reply To: Buddypress live notification unexpected token or wpdb::prepare(); error [Solved]
Your information:





<a href="" title="" rel="" target=""> <blockquote cite=""> <code> <pre> <em> <strong> <del datetime=""> <ul> <ol start=""> <li> <img src="" border="" alt="" height="" width="">