Hiya!

I've been happily installing and configuring APK - the result is a very long user warning and no profile displayed -

It starts with:

user warning: Unknown column 'bo_users.uid' in 'where clause' query: SELECT COUNT(*) FROM (SELECT users.uid AS uid, facebook_status.sid AS facebook_status_sid, users.picture AS users_picture, users.name AS users_name, users.mail AS users_mail, facebook_status.message AS facebook_status_message, facebook_status.sender AS facebook_status_sender, facebook_status.recipient AS facebook_status_recipient, facebook_status.type AS facebook_status_type, facebook_status.created AS facebook_status_created, facebook_status.private AS facebook_status_private, fbsmp.sid AS fbsmp_sid,

and continues for a very long time with a couple of repetitions or variations.

I note that -

My database has the prefix bo_ (which with hindsight is an unfortunate choice of prefix) so the column bo_users.uid exists in the database, but the select query states SELECT users.uid without the prefix...

I've been looking at the variant and can't see anywhere to adapt the query which I guess is generated from the options selected.

I've tried creating a new variant with a slightly different name but following your documentation - but it doesn't seem to allow me to create it - it just doesn't appear as a variant...

So can you offer any insight please?

Please accept apologies if this support should be requested from panels or another and point me in the right direction.

Comments

michelle’s picture

Project: Advanced Profile Kit » Facebook-style Statuses (Microblog)

The error you pasted is about Facebook-style Statuses, not APK. It's been a while since I've looked at APK but I'm pretty sure there are no FBSS custom views or anything; it just puts the given CTools content type on the variant. So I'm tossing this over to ICY.

Michelle

icecreamyou’s picture

Version: 6.x-1.0 » 6.x-3.x-dev
Status: Active » Postponed (maintainer needs more info)

Normally errors give you the file and line number that caused them. Can you copy-paste the whole error here? I really have no idea what the problem could be just from a paste of a partial query.

mylesorme’s picture

Thanks - I'm so sorry to have delayed reply - I 'lost' my post with Michelle's reply, and thought that I must have failed to submit the form!

Here's the full error:

user warning: Unknown column 'bo_users.uid' in 'where clause' query: SELECT COUNT(*) FROM (SELECT users.uid AS uid, facebook_status.sid AS facebook_status_sid, users.picture AS users_picture, users.name AS users_name, users.mail AS users_mail, facebook_status.message AS facebook_status_message, facebook_status.sender AS facebook_status_sender, facebook_status.recipient AS facebook_status_recipient, facebook_status.type AS facebook_status_type, facebook_status.created AS facebook_status_created, facebook_status.private AS facebook_status_private, fbsmp.sid AS fbsmp_sid, fbsmp.type AS fbsmp_type, fbsmp.data AS fbsmp_data FROM bo_users users LEFT JOIN bo_user_relationships user_relationships ON users.uid = user_relationships.requestee_id LEFT JOIN bo_users users_user_relationships ON user_relationships.requester_id = users_user_relationships.uid INNER JOIN bo_facebook_status facebook_status ON users.uid = facebook_status.recipient LEFT JOIN bo_fbsmp fbsmp ON facebook_status.sid = fbsmp.sid WHERE (facebook_status.type in ('user')) AND (facebook_status.message <> '' OR ( fbsmp.type IS NOT NULL AND fbsmp.type IN ('link','photo','video','slideshare') )) AND ( ((user_relationships.requestee_id = 1 OR user_relationships.requester_id = 1) AND user_relationships.approved = 1) OR bo_users.uid = 1 ) GROUP BY facebook_status.sid, uid, facebook_status_sid, users_picture, users_name, users_mail, facebook_status_message, facebook_status_sender, facebook_status_recipient, facebook_status_type, facebook_status_created, facebook_status_private, fbsmp_sid, fbsmp_type, fbsmp_data ORDER BY facebook_status_sid DESC ) count_alias in /home/brinkedout/domains/brinkedout.com/public_html/sites/all/modules/views/includes/view.inc on line 745.
user warning: Unknown column 'bo_users.uid' in 'where clause' query: SELECT users.uid AS uid, facebook_status.sid AS facebook_status_sid, users.picture AS users_picture, users.name AS users_name, users.mail AS users_mail, facebook_status.message AS facebook_status_message, facebook_status.sender AS facebook_status_sender, facebook_status.recipient AS facebook_status_recipient, facebook_status.type AS facebook_status_type, facebook_status.created AS facebook_status_created, facebook_status.private AS facebook_status_private, fbsmp.sid AS fbsmp_sid, fbsmp.type AS fbsmp_type, fbsmp.data AS fbsmp_data FROM bo_users users LEFT JOIN bo_user_relationships user_relationships ON users.uid = user_relationships.requestee_id LEFT JOIN bo_users users_user_relationships ON user_relationships.requester_id = users_user_relationships.uid INNER JOIN bo_facebook_status facebook_status ON users.uid = facebook_status.recipient LEFT JOIN bo_fbsmp fbsmp ON facebook_status.sid = fbsmp.sid WHERE (facebook_status.type in ('user')) AND (facebook_status.message <> '' OR ( fbsmp.type IS NOT NULL AND fbsmp.type IN ('link','photo','video','slideshare') )) AND ( ((user_relationships.requestee_id = 1 OR user_relationships.requester_id = 1) AND user_relationships.approved = 1) OR bo_users.uid = 1 ) GROUP BY facebook_status.sid, uid, facebook_status_sid, users_picture, users_name, users_mail, facebook_status_message, facebook_status_sender, facebook_status_recipient, facebook_status_type, facebook_status_created, facebook_status_private, fbsmp_sid, fbsmp_type, fbsmp_data ORDER BY facebook_status_sid DESC LIMIT 0, 10 in /home/brinkedout/domains/brinkedout.com/public_html/sites/all/modules/views/includes/view.inc on line 771.

mylesorme’s picture

Status: Postponed (maintainer needs more info) » Active
GreatStarMaster’s picture

I have the same issue.

icecreamyou’s picture

Status: Active » Postponed (maintainer needs more info)

Well the problem is line 18 of includes/views/handlers/facebook_status_views_handler_argument_rels_and_me.inc but I have no idea why that wouldn't work or what I might change to make it work. What database type and version are you using?

GreatStarMaster’s picture

Category: bug » support
Priority: Minor » Normal
Status: Fixed » Active

I use MySQL 5.1
Table prefix_users has alias users, I change string 18 to

      (($this->table_alias.requestee_id = %d OR $this->table_alias.requester_id = %d) AND $this->table_alias.approved = 1) OR users.uid = %d

The error disappeared. Is it right solution?

icecreamyou’s picture

Category: support » bug
Priority: Normal » Minor
Status: Postponed (maintainer needs more info) » Fixed

#7 is not a generic solution because "users" in this case is the table alias not the table name and that is not guaranteed to be consistent. However I just committed a change that I think should fix this.

Category: support » bug
Priority: Normal » Minor
Status: Active » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.