[buddypress-trac] [BuddyPress] #4107: WordPress database error for ”INSERT INTO ( blog_id, meta_key, meta_value ) VALUES”

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Mar 30 11:58:00 UTC 2012


#4107: WordPress database error for ”INSERT INTO  ( blog_id, meta_key, meta_value
) VALUES”
--------------------------+--------------------------------------
 Reporter:  adrian7       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Blogs         |    Version:  1.5.4
 Severity:  major         |   Keywords:  dev-feedback 2nd-opinion
--------------------------+--------------------------------------
 I checked the php error_log file on my website and stubled across a lot or
 lines like this:


 {{{
 WordPress database error You have an error in your SQL syntax; check the
 manual that corresponds to your MySQL server version for the right syntax
 to use near '( blog_id, meta_key, meta_value ) VALUES ( 2420,
 'last_activity', '2012-03-29 22' at line 1 for query INSERT INTO  (
 blog_id, meta_key, meta_value ) VALUES ( 2420, 'last_activity',
 '2012-03-29 22:02:16' ) made by require, require_once, require_once,
 require_once, do_action, call_user_func_array,
 maybe_add_existing_user_to_blog, add_existing_user_to_blog,
 add_user_to_blog, do_action, call_user_func_array,
 bp_blogs_add_user_to_blog, bp_blogs_record_blog, bp_blogs_update_blogmeta
 }}}

 I remebed I just added an existing user from the network to an existing
 blog.

 I am still on 1.5.4, but it might affect the latest 1.5.5 version.

 I guess the function responsible for this is bp_blogs_update_blogmeta
 where there's the queries.

 {{{
 $wpdb->prepare( "INSERT INTO {$bp->blogs->table_name_blogmeta} ( blog_id,
 meta_key, meta_value ) VALUES ( %d, %s, %s )", $blog_id, $meta_key,
 $meta_value )
 }}}

 And update respectively.

 So it seems the var `$bp->blogs->table_name_blogmeta` is empty at that
 point.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4107>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list