#3811 - Query error in Hook_member_boxes_buildr::run() in v11

  • By
  • Added
  • 8 views
Identifier #3811
Issue type Feature request or suggestion
Title Query error in Hook_member_boxes_buildr::run() in v11
Status Completed
Handling member Chris Graham
Addon General / Uncategorised
Description I am getting the following error inside member tooltips:
A query has failed [SELECT m.*,r.*,rm.name AS room_name FROM cms11_w_members m JOIN cms11_w_realms r ON m.location_realm=r.id JOIN cms11_w_rooms rm ON r.location_x=rm.location_x AND r.location_y=rm.location_y AND r.location_realm=rm.location_realm WHERE (m.id=4) LIMIT 1] [Unknown column 'r.location_x' in 'on clause']

The culprit is the following line (# 51) in "sources_custom/hooks/systems/member_boxes/buildr.php":
$rows = $GLOBALS['SITE_DB']->query_select('w_members m JOIN ' . $GLOBALS['SITE_DB']->get_table_prefix() . 'w_realms r ON m.location_realm=r.id JOIN ' . $GLOBALS['SITE_DB']->get_table_prefix() . 'w_rooms rm ON r.location_x=rm.location_x AND r.location_y=rm.location_y AND r.location_realm=rm.location_realm', array('m.*', 'r.*', 'rm.name AS room_name'), array('m.id' => $member_id), '', 1);

I tried to find a fix but the `w_realms` table doesn't have `location_x` and `location_y` columns in any repo branch so I'm not sure what needs to be done.
Steps to reproduce

1. Go to Forum home

2. Hover over a member's name (e.g., in the "Last Post" column of a forum group).

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated