Opened 13 years ago
Closed 8 years ago
#4107 closed defect (bug) (worksforme)
WordPress database error for ”INSERT INTO ( blog_id, meta_key, meta_value ) VALUES”
Reported by: | adrian7 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 1.5.4 |
Component: | Blogs | Keywords: | |
Cc: |
Description
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.
Change History (3)
Note: See
TracTickets for help on using
tickets.
Do you have the Blogs component (site tracking) enabled on this site?