Syntax errors with panel pages & User Relations

tamitha - September 11, 2009 - 14:56
Project:Advanced Profile Kit
Version:6.x-1.0-beta1
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I use a custom panel page for displaying a taxonomy term page. After installing this mod, it all looks beautiful and works fine. But when I viewed one of my taxonomy pages, I saw this error:

* user warning: 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 'DISTINCT(node.nid), node_counter.totalcount AS node_counter_totalcount FROM ' at line 1 query: SELECT COUNT(*) FROM (SELECT DISTINCT(node.nid) AS DISTINCT(node.nid), node_counter.totalcount AS node_counter_totalcount FROM node node LEFT JOIN node_counter node_counter ON node.nid = node_counter.nid WHERE (node.status <> 0) AND (node_counter.totalcount > 0) AND (node.vid IN ( SELECT tn.vid FROM term_node tn LEFT JOIN term_hierarchy th ON th.tid = tn.tid LEFT JOIN term_hierarchy th1 ON th.parent = th1.tid LEFT JOIN term_hierarchy th2 ON th1.parent = th2.tid WHERE tn.tid = 1 OR th1.tid = 1 OR th2.tid = 1 )) ORDER BY node_counter_totalcount DESC ) count_alias in /home/momtips/public_html/sites/all/modules/views/includes/view.inc on line 729.
* user warning: 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 'DISTINCT(node.nid), node_counter.totalcount AS node_counter_totalcount FROM ' at line 1 query: SELECT DISTINCT(node.nid) AS DISTINCT(node.nid), node_counter.totalcount AS node_counter_totalcount FROM node node LEFT JOIN node_counter node_counter ON node.nid = node_counter.nid WHERE (node.status <> 0) AND (node_counter.totalcount > 0) AND (node.vid IN ( SELECT tn.vid FROM term_node tn LEFT JOIN term_hierarchy th ON th.tid = tn.tid LEFT JOIN term_hierarchy th1 ON th.parent = th1.tid LEFT JOIN term_hierarchy th2 ON th1.parent = th2.tid WHERE tn.tid = 1 OR th1.tid = 1 OR th2.tid = 1 )) ORDER BY node_counter_totalcount DESC LIMIT 0, 5 in /home/momtips/public_html/sites/all/modules/views/includes/view.inc on line 755.

Removing the User Interface module corrects this error message. But adds this error message when viewing the advanced profile of a user:

* user warning: Unknown column 'name' in 'field list' query: SELECT COUNT(*) FROM (SELECT name FROM user_relationships user_relationships ) count_alias in /home/momtips/public_html/sites/all/modules/views/includes/view.inc on line 729.
* user warning: Unknown column 'name' in 'field list' query: SELECT name, uid, picture FROM user_relationships user_relationships LIMIT 0, 5 in /home/momtips/public_html/sites/all/modules/views/includes/view.inc on line 755.

Thanks!
Tamitha

#1

Michelle - September 11, 2009 - 22:12
Project:Advanced Profile Kit» User Interface
Version:6.x-1.x-dev» <none>
Category:bug report» support request

The first one merlinofchaos is a core bug that has a workaround in the views dev. The second looks like User Interface conflicts with User Relationships. I don't know which causes the problem. Since I know UR works fine with APK, I'm taking a guess and tossing it over to UI.

Michelle

#2

tamitha - September 12, 2009 - 04:17

I'm so sorry - I guess I hadn't had enough sleep when I posted this - lol I didn't mean to say:

Removing the User Interface module corrects this error message. But adds this error message when viewing the advanced profile of a user:

The 2nd error message came after removing UR.

#3

Michelle - September 12, 2009 - 04:21
Project:User Interface» Advanced Profile Kit
Version:<none>» 6.x-1.x-dev
Status:active» fixed

Oh... In that case, this should be fixed. You must be using an older dev. If you remove the User Relationships module, now, the view doesn't try to run.

Michelle

#4

tamitha - September 13, 2009 - 00:41

I am using the most recent version of Advanced Profile 6.x-1.0-beta1

#5

tamitha - September 13, 2009 - 07:06

Don't know if it helps to see the whole example in person or not:

http://mommytips.com/users/twinsmom

#6

Michelle - September 13, 2009 - 13:23
Version:6.x-1.x-dev» 6.x-1.0-beta1

@tamitha: The beta is 2 months old. I said it's fixed in the dev.

Michelle

#7

tamitha - September 13, 2009 - 17:03

Ok - sorry, I thought you were talking about the dev for another project on that one. Going to install now.

Thanks so much!

#8

tamitha - September 13, 2009 - 17:19
Status:fixed» closed

Thanks!

#9

davedg629 - October 8, 2009 - 20:53

I was getting the "second error" about user relationships when viewing any advanced profile. I fixed it by installed the latest dev version of user relationships and APK -AND- enabling the "UR Views" submodule. Before I enabled the "UR Views" submodule I was still getting the error - enabled it and now no errors!

 
 

Drupal is a registered trademark of Dries Buytaert.