CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Search Country in Profile Listing give array error
Pages: [1] 2

Author Topic: Search Country in Profile Listing give array error  (Read 5940 times)

businessbroker

  • Guest
Search Country in Profile Listing give array error
November 23, 2008, 05:30:49 am
I have published my first sample profile here:
http://www.xopeka.biz/civicrm/profile?reset=1&gid=1
I was super happy, then my friend told me that he tryed to seach contacts in italy (in this profile are al italian) he get an error, but also searching for othe nations give the same error, it is a bug?

Code: [Select]
    Sorry. A non-recoverable error has occurred.

    DB Error: no such field

    Database Error Code: Unknown column 'Work-phone-Phone.location_type_id' in 'on clause', 1054

    Return to home page.

Error Details:

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT count(DISTINCT contact_a.id)  FROM civicrm_contact contact_a
LEFT JOIN civicrm_address `Work-address` ON (`Work-address`.contact_id = contact_a.id AND `Work-address`.location_type_id = 2) 
LEFT JOIN civicrm_country `Work-country` ON `Work-country`.id = `Work-address`.country_id 
LEFT JOIN civicrm_location_type `Work-location_type` ON (  ( `Work-phone-Phone`.location_type_id = `Work-location_type`.id )OR ( `Work-address`.location_type_id = `Work-location_type`.id )  )   LEFT JOIN civicrm_group_contact `civicrm_group_contact-2` ON contact_a.id = `civicrm_group_contact-2`.contact_id   WHERE  ( LOWER(`Work-country`.name) = 'iran, islamic republic of' AND `civicrm_group_contact-2`.group_id IN ( 2 ) AND `civicrm_group_contact-2`.status IN ("Added") )  AND  ( 1 )     [nativecode=1054 ** Unknown column 'Work-phone-Phone.location_type_id' in 'on clause']
    [type] => DB_Error
    [user_info] => SELECT count(DISTINCT contact_a.id)  FROM civicrm_contact contact_a
LEFT JOIN civicrm_address `Work-address` ON (`Work-address`.contact_id = contact_a.id AND `Work-address`.location_type_id = 2) 
LEFT JOIN civicrm_country `Work-country` ON `Work-country`.id = `Work-address`.country_id 
LEFT JOIN civicrm_location_type `Work-location_type` ON (  ( `Work-phone-Phone`.location_type_id = `Work-location_type`.id )OR ( `Work-address`.location_type_id = `Work-location_type`.id )  )   LEFT JOIN civicrm_group_contact `civicrm_group_contact-2` ON contact_a.id = `civicrm_group_contact-2`.contact_id   WHERE  ( LOWER(`Work-country`.name) = 'iran, islamic republic of' AND `civicrm_group_contact-2`.group_id IN ( 2 ) AND `civicrm_group_contact-2`.status IN ("Added") )  AND  ( 1 )     [nativecode=1054 ** Unknown column 'Work-phone-Phone.location_type_id' in 'on clause']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT count(DISTINCT contact_a.id)  FROM civicrm_contact contact_a
LEFT JOIN civicrm_address `Work-address` ON (`Work-address`.contact_id = contact_a.id AND `Work-address`.location_type_id = 2) 
LEFT JOIN civicrm_country `Work-country` ON `Work-country`.id = `Work-address`.country_id 
LEFT JOIN civicrm_location_type `Work-location_type` ON (  ( `Work-phone-Phone`.location_type_id = `Work-location_type`.id )OR ( `Work-address`.location_type_i
[/code]

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Search Country in Profile Listing give array error
November 23, 2008, 06:28:53 am

can u please reproduce this on demo and if so, please file an issue. We'll fix it in 2.1 or 2.2

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

businessbroker

  • Guest
Re: Search Country in Profile Listing give array error
November 23, 2008, 09:04:34 am
where i can find demo of 2.1.2 of civicrm? I see only demo link to 2.1

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Search Country in Profile Listing give array error
November 23, 2008, 11:11:29 am
Maybe I am missing the problem. I hit the problem when I only selected 'italy' but when i put a % in all of the fields I got a search return. Have you set any of the data fields as 'required' in the profile settings? (see attached)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

businessbroker

  • Guest
Re: Search Country in Profile Listing give array error
November 23, 2008, 11:39:59 am
the error is with any country selected, not with only italy, other fields are ok, yes

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Search Country in Profile Listing give array error
November 23, 2008, 03:40:47 pm
Quote from: businessbroker on November 23, 2008, 09:04:34 am
where i can find demo of 2.1.2 of civicrm? I see only demo link to 2.1

http://drupal.demo.civicrm.org/ is running 2.1.2 code - we always keep the public demo updated :-)
Protect your investment in CiviCRM by  becoming a Member!

businessbroker

  • Guest
Re: Search Country in Profile Listing give array error
November 24, 2008, 02:05:49 pm
sample done, but here look to go, mmm I'l check bette my settings of profiles and fields, thanks:
http://drupal.demo.civicrm.org/civicrm/profile?reset=1&gid=5

mcsmom

  • I post frequently
  • ***
  • Posts: 266
  • Karma: 23
    • Official Joomla! Book
  • CiviCRM version: 4 and 3.4
  • CMS version: Joomla!
Re: Search Country in Profile Listing give array error
December 04, 2008, 10:01:27 am
Just wanted to mention that i had this problem too with searching on country or world region.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Search Country in Profile Listing give array error
December 04, 2008, 04:41:58 pm
Elin - would be great if you could recreate on the demo or give more details on how to recreate (i.e. what fields in the profile, and what user behavior / inputs throws the error).
Protect your investment in CiviCRM by  becoming a Member!

mcsmom

  • I post frequently
  • ***
  • Posts: 266
  • Karma: 23
    • Official Joomla! Book
  • CiviCRM version: 4 and 3.4
  • CMS version: Joomla!
Re: Search Country in Profile Listing give array error
December 06, 2008, 07:32:25 am
The whole thing seems to be somewhat intermittent. I did realize that one issue was the permissions on the log and on the verstion txt.   

Also, for items with the drop downs it seems to be very fussy and is a little slow so users who type and hit enter country or province sometimes get errors.

UPDATE

Well actually I think it is that I was searching on the non primary country.

Bigger question: Can I pick a particular location type as the primary one?  I have a set up where I require three addresses and I would like the first type to be the primary one.
« Last Edit: December 06, 2008, 07:44:42 am by mcsmom »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Search Country in Profile Listing give array error
December 07, 2008, 05:23:48 pm
If you set a "default" location type from Administer CiviCRM >> Location Types, I think that one should be set as primary when folks complete a profile w/ multiple locations.
Protect your investment in CiviCRM by  becoming a Member!

businessbroker

  • Guest
Re: Search Country in Profile Listing give array error
December 07, 2008, 05:38:12 pm
My predefined country is ITALY, but this don't appear on select menu of search profile and also all the countryes seleted are giving errors, you can again check it on my sample from link in my first post in this topic.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Search Country in Profile Listing give array error
December 08, 2008, 01:20:35 am
Couldn't get the url to load. http://www.xopeka.biz/civicrm/profile?reset=1&gid=1

Maybe post an screengrab  of your profile settings ie /admin/uf/group/field?reset=1&action=browse&gid=XX so that can be ruled out.

I only ask as my comments above suggested to me that some of the field settings were not searchable while others were. but i can't verify as i can get on the site
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

businessbroker

  • Guest
Re: Search Country in Profile Listing give array error
December 08, 2008, 11:39:01 am
here attached:
1) default nation missing in select menu (italy)
2) error when searching something

businessbroker

  • Guest
Re: Search Country in Profile Listing give array error
December 08, 2008, 11:41:39 am
here the second point attached

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Search Country in Profile Listing give array error

This forum was archived on 2017-11-26.