Closed (fixed)
Project:
User Relationships
Version:
6.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
27 Jul 2009 at 07:02 UTC
Updated:
29 Aug 2009 at 16:20 UTC
When attempting to autocomplete the username field in Privatemsg, I would get the following error message:
user warning: Table 'drupal.users' doesn't exist query: SELECT users_user_relationships.name AS name FROM cms_user_relationships INNER JOIN users users_user_relationships ON user_relationships.requestee_id = users_user_relationships.uid WHERE (name LIKE 'Jck%') AND (user_relationships.approved = 1) AND (user_relationships.requester_id =4) ORDER BY name ASC LIMIT 0, 10 in /www/modules/privatemsg/privatemsg.module on line 994.
I have attached a patch that fixes it, but I'm unsure about the quality of my work.
| Comment | File | Size | Author |
|---|---|---|---|
| user_relationships_api.privatemsg.inc_.patch | 1.01 KB | Jckf |
Comments
Comment #1
alex.k commentedI think this is the same issue as #514012: User Relationships integration with Privatemsg autocomplete error - could you try the -dev release pls? Thanks.
Comment #2
Jckf commentedI'm 99.9% sure you are correct about this. I'll get the dev files later today. Sorry for not searching.
Comment #3
Jckf commentedI copied that one file from the dev. release, and the errors are gone (like with my patch) =) I guess this case is closed.
Note: I was talking to the author of Privmsg, and he thinks you're not building your queries correctly =p Look at my patch, as I tried to follow his guidelines =)
Comment #4
Jckf commentedComment #5
alex.k commentedThanks, will check the queries, and check with the author of UR integration.
Comment #6
mattlc commentedhere is the fix (excuse me for bad formating) in function "user_relationships_api_privatemsg_sql_autocomplete_alter" :
It simply not use { and } at lines 22, 24 and 25.
Comment #7
alex.k commentedIt looks like the only remaining issue was that the query didn't use a placeholder for the uid, otherwise it looks equivalent to the patch posted by @Jckf except for table aliases. Corrected in http://drupal.org/cvs?commit=251488, hope that's it :)