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 CiviEvent (Moderator: Yashodha Chaku) »
  • participant_status_id column not found when sorting by Participant Status
Pages: [1]

Author Topic: participant_status_id column not found when sorting by Participant Status  (Read 856 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
participant_status_id column not found when sorting by Participant Status
November 11, 2010, 02:29:23 pm
I get an error which I'm unable to reproduce on the Demo site.

Every time I view a Participant list and click on the heading "Status" to sort by status, the following error is reported...

Code: [Select]
Nov 09 17:25:19  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [ code ] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT DISTINCT(contact_a.id) as contact_id, contact_a.contact_type  as `contact_type`, contact_a.contact_sub_type  as `contact_sub_type`, contact_a.sort_name  as `sort_name`, contact_a.display_name  as `display_name`, civicrm_event.id as event_id, civicrm_event.title as event_title, civicrm_event.start_date as event_start_date, civicrm_event.end_date as event_end_date, civicrm_participant.id as participant_id, civicrm_participant.fee_level as participant_fee_level, civicrm_participant.fee_amount as participant_fee_amount, civicrm_participant.fee_currency as participant_fee_currency, event_type.label as event_type, participant_status.label as participant_status, participant_role.label as participant_role, civicrm_participant.register_date as participant_register_date, civicrm_participant.source as participant_source, civicrm_participant.is_pay_later as participant_is_pay_later, civicrm_participant.is_test as participant_is_test, civicrm_participant.registered_by_id as participant_registered_by_id, discount_name.label as participant_discount_name  FROM civicrm_contact contact_a LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id  INNER JOIN civicrm_event ON civicrm_participant.event_id = civicrm_event.id  LEFT JOIN civicrm_option_group option_group_event_type ON (option_group_event_type.name = 'event_type') LEFT JOIN civicrm_option_value event_type ON (civicrm_event.event_type_id = event_type.value AND option_group_event_type.id = event_type.option_group_id )  LEFT JOIN civicrm_discount discount ON ( civicrm_participant.discount_id = discount.id ) LEFT JOIN civicrm_option_group discount_name ON ( discount_name.id = discount.option_group_id )  LEFT JOIN civicrm_option_group option_group_participant_role ON (option_group_participant_role.name = 'participant_role') LEFT JOIN civicrm_option_value participant_role ON (civicrm_participant.role_id = participant_role.value
                               AND option_group_participant_role.id = participant_role.option_group_id )  LEFT JOIN civicrm_participant_status_type participant_status ON (civicrm_participant.status_id = participant_status.id)  WHERE  ( civicrm_event.id = 529 AND civicrm_participant.is_test = 0 )  AND (contact_a.is_deleted = 0)   ORDER BY participant_status_id asc  LIMIT 0, 50  [nativecode=1054 ** Unknown column 'participant_status_id' in 'order clause']
    [type] => DB_Error
    [user_info] => SELECT DISTINCT(contact_a.id) as contact_id, contact_a.contact_type  as `contact_type`, contact_a.contact_sub_type  as `contact_sub_type`, contact_a.sort_name  as `sort_name`, contact_a.display_name  as `display_name`, civicrm_event.id as event_id, civicrm_event.title as event_title, civicrm_event.start_date as event_start_date, civicrm_event.end_date as event_end_date, civicrm_participant.id as participant_id, civicrm_participant.fee_level as participant_fee_level, civicrm_participant.fee_amount as participant_fee_amount, civicrm_participant.fee_currency as participant_fee_currency, event_type.label as event_type, participant_status.label as participant_status, participant_role.label as participant_role, civicrm_participant.register_date as participant_register_date, civicrm_participant.source as participant_source, civicrm_participant.is_pay_later as participant_is_pay_later, civicrm_participant.is_test as participant_is_test, civicrm_participant.registered_by_id as participant_registered_by_id, discount_name.label as participant_discount_name  FROM civicrm_contact contact_a LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id  INNER JOIN civicrm_event ON civicrm_participant.event_id = civicrm_event.id  LEFT JOIN civicrm_option_group option_group_event_type ON (option_group_event_type.name = 'event_type') LEFT JOIN civicrm_option_value event_type ON (civicrm_event.event_type_id = event_type.value AND option_group_event_type.id = event_type.option_group_id )  LEFT JOIN civicrm_discount discount ON ( civicrm_participant.discount_id = discount.id ) LEFT JOIN civicrm_option_group discount_name ON ( discount_name.id = discount.option_group_id )  LEFT JOIN civicrm_option_group option_group_participant_role ON (option_group_participant_role.name = 'participant_role') LEFT JOIN civicrm_option_value participant_role ON (civicrm_participant.role_id = participant_role.value
                               AND option_group_participant_role.id = participant_role.option_group_id )  LEFT JOIN civicrm_participant_status_type participant_status ON (civicrm_participant.status_id = participant_status.id)  WHERE  ( civicrm_event.id = 529 AND civicrm_participant.is_test = 0 )  AND (contact_a.is_deleted = 0)   ORDER BY participant_status_id asc  LIMIT 0, 50  [nativecode=1054 ** Unknown column 'participant_status_id' in 'order clause']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT DISTINCT(contact_a.id) as contact_id, contact_a.contact_type  as `contact_type`, contact_a.contact_sub_type  as `contact_sub_type`, contact_a.sort_name  as `sort_name`, contact_a.display_name  as `display_name`, civicrm_event.id as event_id, civicrm_event.title as event_title, civicrm_event.start_date as event_start_date, civicrm_event.end_date as event_end_date, civicrm_participant.id as participant_id, civicrm_participant.fee_level as participant_fee_level, civicrm_participant.fee_amount as participant_fee_amount, civicrm_participant.fee_currency as participant_fee_currency, event_type.label as event_type, participant_status.label as participant_status, participant_role.label as participant_role, civicrm_participant.register_date as participant_register_date, civicrm_participant.source as participant_source, civicrm_participant.is_pay_later as participant_is_pay_later, civicrm_participant.is_test as participant_is_test, civicrm_participant.registered_by_id as participant_registered_by_id, discount_name.label as participant_discount_name  FROM civicrm_contact contact_a LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id  INNER JOIN civicrm_event ON civicrm_participant.event_id = civicrm_event.id  LEFT JOIN civicrm_option_group option_group_event_type ON (option_group_event_type.name = 'event_type') LEFT JOIN civicrm_option_value event_type ON (civicrm_event.event_type_id = event_type.value AND option_group_event_type.id = event_type.option_group_id )  LEFT JOIN civicrm_discount discount ON ( civicrm_participant.discount_id = discount.id ) LEFT JOIN civicrm_option_group discount_name ON ( discount_name.id = discount.option_group_id )  LEFT JOIN civicrm_option_group option_group_participant_role ON (option_group_participant_role.name = 'participant_role') LEFT JOIN civicrm_option_value participant_role ON (civicrm_participant.role_id = participant_role.value
                               AND option_group_participant_role.id = participant_role.option_group_id )  LEFT JOIN civicrm_participant_status_type participant_status ON (civicrm_participant.status_id = participant_status.id)  WHERE  ( civicrm_event.id = 529 AND civicrm_participant.is_test = 0 )  AND (contact_a.is_deleted = 0)   ORDER BY participant_status_id asc  LIMIT 0, 50  [nativecode=1054 ** Unknown column 'participant_status_id' in 'order clause']"]
)

Nov 09 17:25:19  [info] $backTrace = /var/www/citybibleforum/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 189
, handle,
/var/www/citybibleforum/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 931
/var/www/citybibleforum/sites/all/modules/civicrm/packages/DB.php, PEAR_Error, 968
/var/www/citybibleforum/sites/all/modules/civicrm/packages/PEAR.php, DB_Error, 564
/var/www/citybibleforum/sites/all/modules/civicrm/packages/DB/common.php, raiseError, 1903
/var/www/citybibleforum/sites/all/modules/civicrm/packages/DB/mysql.php, raiseError, 898
/var/www/citybibleforum/sites/all/modules/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/var/www/citybibleforum/sites/all/modules/civicrm/packages/DB/common.php, simpleQuery, 1216
/var/www/citybibleforum/sites/all/modules/civicrm/packages/DB/DataObject.php, query, 2411
/var/www/citybibleforum/sites/all/modules/civicrm/packages/DB/DataObject.php, _query, 1597
/var/www/citybibleforum/sites/all/modules/civicrm/CRM/Core/DAO.php, query, 145
/var/www/citybibleforum/sites/all/modules/civicrm/CRM/Core/DAO.php, query, 867
/var/www/citybibleforum/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php, executeQuery, 3355
/var/www/citybibleforum/sites/all/modules/civicrm/CRM/Event/Selector/Search.php, searchQuery, 281
/var/www/citybibleforum/sites/all/modules/civicrm/CRM/Core/Selector/Controller.php, getRows, 373
/var/www/citybibleforum/sites/all/modules/civicrm/CRM/Core/Selector/Controller.php, getRows, 322
/var/www/citybibleforum/sites/all/modules/civicrm/CRM/Event/Form/Search.php, run, 422
/var/www/citybibleforum/sites/all/modules/civicrm/CRM/Event/Form/Search.php, postProcess, 190
/var/www/citybibleforum/sites/all/modules/civicrm/CRM/Core/Form.php, preProcess, 314
/var/www/citybibleforum/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php, buildForm, 99
/var/www/citybibleforum/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
/var/www/citybibleforum/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
/var/www/citybibleforum/sites/all/modules/civicrm/CRM/Core/Controller.php, handle, 279
/var/www/citybibleforum/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 219
/var/www/citybibleforum/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 351, civicrm_invoke,
/var/www/citybibleforum/includes/menu.inc, call_user_func_array, 348
/var/www/citybibleforum/index.php, menu_execute_active_handler, 18

The complaint centres on the 'order by' clause which is meant to sort on Status Id which is not one of the query fields (though the Status text is).

Is this fixed by http://issues.civicrm.org/jira/browse/CRM-7045 ?

Ken

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: participant_status_id column not found when sorting by Participant Status
November 12, 2010, 05:09:09 am
ken :
This has been already fixed for 3.2.4 under http://issues.civicrm.org/jira/browse/CRM-6859
Here is the patch.

-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • participant_status_id column not found when sorting by Participant Status

This forum was archived on 2017-11-26.