Everything was working great, but then I got rid of a bunch of my old profile values, and restructured my views to filter on content_profile fields. The views work great, but my finder is broken. I rebuilt EVERYTHING from scratch; new content_profile fields, new view, new finder, even uninstalled (not just disabled) finder and reactivated, but I still get the following error. I am so frustrated! It was working perfectly.
user warning: Column 'field_hospital_value' in field list is ambiguous query: SELECT users.uid AS uid, users.picture AS users_picture, users.name AS users_name, realname.realname AS realname_realname, realname.uid AS realname_uid, profile_values_profile_firstname.value AS profile_values_profile_firstname_value, profile_values_profile_firstname.uid AS profile_values_profile_firstname_uid, profile_values_profile_lastname.value AS profile_values_profile_lastname_value, profile_values_profile_lastname.uid AS profile_values_profile_lastname_uid, users.mail AS users_mail, field_hospital_value, nid, type, vid FROM users users LEFT JOIN node node_users ON users.uid = node_users.uid AND node_users.type = 'profile_about_me' LEFT JOIN users_roles users_roles ON users.uid = users_roles.uid AND users_roles.rid = 8 LEFT JOIN content_type_profile_about_me node_data_field_deparment_value_0 ON node_users.vid = node_data_field_deparment_value_0.vid AND node_data_field_deparment_value_0.field_deparment_value = '61' LEFT JOIN content_type_profile_about_me node_data_field_deparment_value_1 ON node_users.vid = node_data_field_deparment_value_1.vid AND node_data_field_deparment_value_1.field_deparment_value = '44' LEFT JOIN content_type_profile_about_me node_data_field_deparment_value_2 ON node_users.vid = node_data_field_deparment_value_2.vid AND node_data_field_deparment_value_2.field_deparment_value = '39' LEFT JOIN content_type_profile_about_me node_data_field_deparment_value_3 ON node_users.vid = node_data_field_deparment_value_3.vid AND node_data_field_deparment_value_3.field_deparment_value = '46' LEFT JOIN content_type_profile_about_me node_data_field_deparment_value_4 ON node_users.vid = node_data_field_deparment_value_4.vid AND node_data_field_deparment_value_4.field_deparment_value = '43' LEFT JOIN content_type_profile_about_me node_data_field_deparment_value_5 ON node_users.vid = node_data_field_deparment_value_5.vid AND node_data_field_deparment_value_5.field_deparment_value = '38' LEFT JOIN content_type_profile_about_me node_data_field_deparment_value_6 ON node_users.vid = node_data_field_deparment_value_6.vid AND node_data_field_deparment_value_6.field_deparment_value = '37' LEFT JOIN content_type_profile_about_me node_data_field_deparment_value_7 ON node_users.vid = node_data_field_deparment_value_7.vid AND node_data_field_deparment_value_7.field_deparment_value = '40' LEFT JOIN content_type_profile_about_me node_data_field_deparment_value_8 ON node_users.vid = node_data_field_deparment_value_8.vid AND node_data_field_deparment_value_8.field_deparment_value = '42' LEFT JOIN content_type_profile_about_me node_data_field_deparment_value_9 ON node_users.vid = node_data_field_deparment_value_9.vid AND node_data_field_deparment_value_9.field_deparment_value = '41' LEFT JOIN content_type_profile_about_me node_data_field_deparment_value_10 ON node_users.vid = node_data_field_deparment_value_10.vid AND node_data_field_deparment_value_10.field_deparment_value = '45' LEFT JOIN content_type_profile_about_me node_data_field_deparment_value_11 ON node_users.vid = node_data_field_deparment_value_11.vid AND node_data_field_deparment_value_11.field_deparment_value = '36' LEFT JOIN content_type_profile_about_me node_data_field_job_title_value_0 ON node_users.vid = node_data_field_job_title_value_0.vid AND node_data_field_job_title_value_0.field_job_title_value = '64' LEFT JOIN content_type_profile_about_me node_data_field_job_title_value_1 ON node_users.vid = node_data_field_job_title_value_1.vid AND node_data_field_job_title_value_1.field_job_title_value = '65' LEFT JOIN content_type_profile_about_me node_data_field_job_title_value_2 ON node_users.vid = node_data_field_job_title_value_2.vid AND node_data_field_job_title_value_2.field_job_title_value = '63' LEFT JOIN content_type_profile_about_me node_data_field_job_title_value_3 ON node_users.vid = node_data_field_job_title_value_3.vid AND node_data_field_job_title_value_3.field_job_title_value = '66' LEFT JOIN content_type_profile_about_me node_data_field_job_title_value_4 ON node_users.vid = node_data_field_job_title_value_4.vid AND node_data_field_job_title_value_4.field_job_title_value = '62' LEFT JOIN content_type_profile_about_me node_data_field_hospital_value_0 ON node_users.vid = node_data_field_hospital_value_0.vid AND node_data_field_hospital_value_0.field_hospital_value = '11' LEFT JOIN content_type_profile_about_me node_data_field_hospital_value_1 ON node_users.vid = node_data_field_hospital_value_1.vid AND node_data_field_hospital_value_1.field_hospital_value = '20' LEFT JOIN content_type_profile_about_me node_data_field_hospital_value_2 ON node_users.vid = node_data_field_hospital_value_2.vid AND node_data_field_hospital_value_2.field_hospital_value = '22' LEFT JOIN content_type_profile_about_me node_data_field_hospital_value_3 ON node_users.vid = node_data_field_hospital_value_3.vid AND node_data_field_hospital_value_3.field_hospital_value = '21' LEFT JOIN content_type_profile_about_me node_data_field_hospital_value_4 ON node_users.vid = node_data_field_hospital_value_4.vid AND node_data_field_hospital_value_4.field_hospital_value = '9' LEFT JOIN content_type_profile_about_me node_data_field_hospital_value_5 ON node_users.vid = node_data_field_hospital_value_5.vid AND node_data_field_hospital_value_5.field_hospital_value = '10' LEFT JOIN realname realname ON users.uid = realname.uid LEFT JOIN profile_values profile_values_profile_firstname ON users.uid = profile_values_profile_firstname.uid AND profile_values_profile_firstname.fid = '3' LEFT JOIN profile_values profile_values_profile_lastname ON users.uid = profile_values_profile_lastname.uid AND profile_values_profile_lastname.fid = '2' WHERE (users.status <> 0) AND (users_roles.rid IS NULL) AND (node_data_field_deparment_value_0.field_deparment_value = '61' OR node_data_field_deparment_value_1.field_deparment_value = '44' OR node_data_field_deparment_value_2.field_deparment_value = '39' OR node_data_field_deparment_value_3.field_deparment_value = '46' OR node_data_field_deparment_value_4.field_deparment_value = '43' OR node_data_field_deparment_value_5.field_deparment_value = '38' OR node_data_field_deparment_value_6.field_deparment_value = '37' OR node_data_field_deparment_value_7.field_deparment_value = '40' OR node_data_field_deparment_value_8.field_deparment_value = '42' OR node_data_field_deparment_value_9.field_deparment_value = '41' OR node_data_field_deparment_value_10.field_deparment_value = '45' OR node_data_field_deparment_value_11.field_deparment_value = '36') AND (node_data_field_job_title_value_0.field_job_title_value = '64' OR node_data_field_job_title_value_1.field_job_title_value = '65' OR node_data_field_job_title_value_2.field_job_title_value = '63' OR node_data_field_job_title_value_3.field_job_title_value = '66' OR node_data_field_job_title_value_4.field_job_title_value = '62') AND (node_data_field_hospital_value_0.field_hospital_value = '11' OR node_data_field_hospital_value_1.field_hospital_value = '20' OR node_data_field_hospital_value_2.field_hospital_value = '22' OR node_data_field_hospital_value_3.field_hospital_value = '21' OR node_data_field_hospital_value_4.field_hospital_value = '9' OR node_data_field_hospital_value_5.field_hospital_value = '10') ORDER BY realname_realname ASC in /var/www/vhosts/mybluepearlvet.com/httpdocs/drupal/sites/all/modules/views/includes/view.inc on line 769.
Comments
Comment #1
danielb commentedcan you please paste an export of your finder here? perhaps your view too?
Comment #2
fidot commentedThe column 'field_hospital_value' is declared in tables node_data_field_hospital_value_0, node_data_field_hospital_value_1, node_data_field_hospital_value_2, node_data_field_hospital_value_3, node_data_field_hospital_value_4 and node_data_field_hospital_value_5, so the query doesn't know which you mean.
HTH
Terry
Comment #3
davidbessler commentedSure. Here's the finder (I actually rebuilt it several times, so it may not be exactly the same, but still produces the error above.
Here is the view:
Thank you SO very much for your help.
Comment #4
davidbessler commentedTerry, I searched my database for those values and tables and can't find them anywhere. Where might they be?
Comment #5
davidbessler commentedWith the way it is set up above, this is the error I get:
Comment #6
danielb commentedDo you seriously think I can read what you've pasted there? How come when I paste something it doesn't look retarded?
Observe:
I need to be able to understand your view and your finder. Nevermind what that other guy said.
Comment #7
danielb commentedI spotted some 'relationships' stuff in your view there, I think I know what's going on, but I don't know how to fix it.
That field_hospital_value - does it exist in your view as a field item, or something else? I can't tell, it looks like it might be an argument or filter.
Try adding it as a field to your view.
Not that it fixes the problem but it might be a suitable workaround in some cases.
There was a related issue regarding relationships: http://drupal.org/node/487980
oh surprise surprise it's a content profile field too!
Comment #8
danielb commentedI will leave a note in the other issue about this one and mark this as a duplicate. If I can work out how to get aliases for fields joined by a relationship then this should all be fine.