Skip to:
Content
Pages
Categories
Search
Top
Bottom

Unknown column ‘u.user_id’ searching member in group


  • douglasndv
    Participant

    @douglasndv

    HI,
    When i search for a member in a group (/groups/grupo-do-andre/members/), occurs this error:

    [Unknown column ‘u.user_id’ in ‘IN/ALL/ANY subquery’]
    SELECT u.ID as id FROM adwp_users u WHERE 1=1 AND u.ID IN (27412,304,509,6625) AND u.user_id IN ( SELECT ID FROM adwp_users WHERE ( display_name LIKE ‘%ar%’ OR user_login LIKE ‘%ar%’ ) ) ORDER BY FIELD(u.id,27412,304,509,6625) LIMIT 0, 20
    [Unknown column ‘u.user_id’ in ‘IN/ALL/ANY subquery’]
    SELECT COUNT(u.ID) FROM adwp_users u WHERE 1=1 AND u.ID IN (27412,304,509,6625) AND u.user_id IN ( SELECT ID FROM adwp_users WHERE ( display_name LIKE ‘%ar%’ OR user_login LIKE ‘%ar%’ ) )

    In log we have “do_action(‘wp_ajax_bp_get_suggestions’), WP_Hook->do_action, WP_Hook->apply_filters, bp_ajax_get_suggestions, bp_core_get_suggestions, BP_Groups_Member_Suggestions->get_suggestions, BP_User_Query->__construct, BP_User_Query->do_user_ids_query”

    I check the SQL and changing the field name “… AND u.user_id IN ( SELECT ID FROM adwp_users …” by “… AND u.ID IN ( SELECT ID FROM adwp_users …” fix it.

    I am using WP 4.9.7 and Buddypress 3.1.0.

    Seems that SQL is wrong, isnt?

    Tks

    Douglas

  • You must be logged in to reply to this topic.
Skip to toolbar