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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Proximity Search/Smart Group error
Pages: [1]

Author Topic: Proximity Search/Smart Group error  (Read 862 times)

mikeney

  • I’m new here
  • *
  • Posts: 20
  • Karma: 3
  • CiviCRM version: 3.3.2
  • CMS version: Joomla 1.5.22
Proximity Search/Smart Group error
February 14, 2010, 08:46:59 am
I have created a few proximity smart groups, and when trying to use them for a mass mailing, I get the following error page.  Any advice?  It occurs not when I view the smart group (which it handles flawlessly) but when I choose "Schedule/Send Mass Mailing"

-----------

    Sorry. A non-recoverable error has occurred.

    DB Error: no such field

    Database Error Code: Unknown column 'civicrm_email.id' in 'field list', 1054

    Return to home page.

Error Details:

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

       
Code: [Select]
=> -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => INSERT IGNORE INTO  I_1 (email_id, contact_id)
                    SELECT DISTINCT     civicrm_email.id as email_id,
                                        contact_a.id as contact_id
                   
FROM      civicrm_contact contact_a
LEFT JOIN civicrm_address address ON ( address.contact_id       = contact_a.id AND
                                       address.is_primary       = 1 )
LEFT JOIN civicrm_state_province state_province ON state_province.id = address.state_province_id
LEFT JOIN civicrm_country country               ON country.id        = address.country_id

                    LEFT JOIN           X_1
                            ON          contact_a.id = X_1.contact_id
                    WHERE           
                                        contact_a.do_not_email = 0
                        AND             contact_a.is_opt_out = 0
                        AND             contact_a.is_deceased = 0
                        AND             (civicrm_email.is_bulkmail = 1 OR civicrm_email.is_primary = 1)
                        AND             civicrm_email.on_hold = 0
                                         AND address.geo_code_1  >= 40.050709526325  AND
address.geo_code_1  <= 43.649356473675  AND
address.geo_code_2 >= -90.065915104743 AND
address.geo_code_2 <= -85.234189495257 AND

IFNULL( ACOS( 0.041002826704406 * COS( RADIANS( -87.6500523 ) ) *
              ( 0.74489367232181 * COS( RADIANS( 41.8500330 ) ) +
                0.66718319593267 * SIN( RADIANS( 41.8500330 ) ) ) +
              -0.99915903048626  * SIN( RADIANS( -87.6500523  ) ) ), 0.00000 ) * 6356788.0865494
 <= 200000
                        AND             contact_a.id NOT IN (
                                          SELECT contact_id FROM civicrm_group_contact
                                          WHERE civicrm_group_contact.group_id = 5 AND civicrm_group_contact.status = 'Removed')
                        AND             X_1.contact_id IS null
                    ORDER BY civicrm_email.is_bulkmail [nativecode=1054 ** Unknown column 'civicrm_email.id' in 'field list']
    [type] => DB_Error
    [user_info] => INSERT IGNORE INTO  I_1 (email_id, contact_id)
                    SELECT DISTINCT     civicrm_email.id as email_id,
                                        contact_a.id as contact_id
                   
FROM      civicrm_contact contact_a
LEFT JOIN civicrm_address address ON ( address.contact_id       = contact_a.id AND
                                       address.is_primary       = 1 )
LEFT JOIN civicrm_state_province state_province ON state_province.id = address.state_province_id
LEFT JOIN civicrm_country country               ON country.id        = address.country_id

                    LEFT JOIN           X_1
                            ON          contact_a.id = X_1.contact_id
                    WHERE           
                                        contact_a.do_not_email = 0
                        AND             contact_a.is_opt_out = 0
                        AND             contact_a.is_deceased = 0
                        AND             (civicrm_email.is_bulkmail = 1 OR civicrm_email.is_primary = 1)
                        AND             civicrm_email.on_hold = 0
                                         AND address.geo_code_1  >= 40.050709526325  AND
address.geo_code_1  <= 43.649356473675  AND
address.geo_code_2 >= -90.065915104743 AND
address.geo_code_2 <= -85.234189495257 AND

IFNULL( ACOS( 0.041002826704406 * COS( RADIANS( -87.6500523 ) ) *
              ( 0.74489367232181 * COS( RADIANS( 41.8500330 ) ) +
                0.66718319593267 * SIN( RADIANS( 41.8500330 ) ) ) +
              -0.99915903048626  * SIN( RADIANS( -87.6500523  ) ) ), 0.00000 ) * 6356788.0865494
 <= 200000
                        AND             contact_a.id NOT IN (
                                          SELECT contact_id FROM civicrm_group_contact
                                          WHERE civicrm_group_contact.group_id = 5 AND civicrm_group_contact.status = 'Removed')
                        AND             X_1.contact_id IS null
                    ORDER BY civicrm_email.is_bulkmail [nativecode=1054 ** Unknown column 'civicrm_email.id' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT IGNORE INTO  I_1 (email_id, contact_id)
                    SELECT DISTINCT     civicrm_email.id as email_id,
                                        contact_a.id as contact_id
                   
FROM      civicrm_contact contact_a
LEFT JOIN civicrm_address address ON ( address.contact_id       = contact_a.id AND
                                       address.is_primary       = 1 )
LEFT JOIN civicrm_state_province state_province ON state_province.id = address.state_province_id
LEFT JOIN civicrm_country country               ON country.id        = address.country_id

                    LEFT JOIN           X_1
                            ON          contact_a.id = X_1.contact_id
                    WHERE           
                                        contact_a.do_not_email = 0
                        AND             contact_a.is_opt_out = 0
                        AND             contact_a.is_deceased = 0
                        AND             (civicrm_email.is_bulkmail = 1 OR civicrm_email.is_primary = 1)
                        AND             civicrm_email.on_hold = 0
                                         AND address.geo_code_1  >= 40.050709526325  AND
address.geo_code_1  <= 43.649356473675  AND
address.geo_code_2 >= -90.065915104743 AND
address.geo_code_2 <= -85.234189495257 AND

IFNULL( ACOS( 0.041002826704406 * COS( RADIANS( -87.6500523 ) ) *
              ( 0.74489367232181 * COS( RADIANS( 41.8500330 ) ) +
                0.66718319593267 * SIN( RADIANS( 41.8500330 ) ) ) +
              -0.99915903048626  * SIN( RADIANS( -87.6500523  ) ) ), 0.00000 ) * 6356788.0865494
 <= 200000
                        AND             contact_a.id NOT IN (
                                          SELECT contact_id FROM civicrm_group_contact
                                          WHERE civicrm_group_contact.group_id = 5 AND civicrm_group_contact.status = 'Removed')
                        AND             X_1.contact_id IS null
                    ORDER BY civicrm_email.is_bulkmail [nativecode=1054 ** Unknown column 'civicrm_email.id' in 'field list']"]
)

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Proximity Search/Smart Group error
February 14, 2010, 10:18:41 am
Can you replicate it on http://joomla.demo.civicrm.org. If you are able to replicate then file an issue in jira ( issue tracker )

Thanks
Kurund
Found this reply helpful? Support CiviCRM

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: Proximity Search/Smart Group error
February 14, 2010, 11:37:52 am

for custom searches to be used in a civimail mailing, they need to include civicrm_email in their join clause. Some of our custom searches do not do so

if you can check the proximity search code and create a patch along with an issue that would be great

thanx

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

mikeney

  • I’m new here
  • *
  • Posts: 20
  • Karma: 3
  • CiviCRM version: 3.3.2
  • CMS version: Joomla 1.5.22
Re: Proximity Search/Smart Group error
February 16, 2010, 07:48:09 am
Thanks guys.  Unfortunately, I cannot replicate this error on the demo site because the Create Email or Send Mass Mail functions do not appear to be enabled.

I am not a coder, so I am unable to create a patch. :-(

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Proximity Search/Smart Group error

This forum was archived on 2017-11-26.