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) »
  • Unknown column 'price_field_' [...] on Price Set Details for Event Participants
Pages: [1]

Author Topic: Unknown column 'price_field_' [...] on Price Set Details for Event Participants  (Read 956 times)

dbenton

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.2
Unknown column 'price_field_' [...] on Price Set Details for Event Participants
September 12, 2011, 09:30:31 am
Hello,

I am experiencing an unusual issue with the custom search Price Set Details for Event Participants. When I search (selecting my client's only event which uses a price set), I get this:

Database Error Code - Unknown column 'price_field_' in 'field list', 1054

And:

UPDATE civicrm_temp_custom_b455c3578f805118642783dfd0aad8c9
SET price_field_ = 1
WHERE participant_id = 106;
 [nativecode=1054 ** Unknown column 'price_field_' in 'field list']
    [type] => DB_Error
    [user_info] =>
UPDATE civicrm_temp_custom_b455c3578f805118642783dfd0aad8c9
SET price_field_ = 1
WHERE participant_id = 106;
 [nativecode=1054 ** Unknown column 'price_field_' in 'field list']

It seems quite odd that the field name should not include an ID. The price set and event registration seem to be working fine otherwise. We have about 100 registered participants at this point. My client wants to export some of the data, but this error is standing in the way. Any ideas?

Thanks in advance.

P.S. Forum admins: wrapping my error info in code tags caused me to be told "Sorry, you are not allowed to post external links." That was pretty confusing, and kept me from formatting this post in a arguably more readable way. Also, I've never failed a CAPTCHA this many times...

--
David Benton

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: Unknown column 'price_field_' [...] on Price Set Details for Event Participants
September 12, 2011, 11:14:11 am

seems like something "unexpected" happened to the price field. Did u enable or disable some price fields?

Your best bet would be to investigate the code for this here:

CRM/Contact/Form/Search/Custom/PriceSet.php, (search for UPDATE)

please report back on your findings. If you find and fix a bug, pleae file an issue and attach the patch

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

dbenton

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Unknown column 'price_field_' [...] on Price Set Details for Event Participants
September 13, 2011, 08:35:08 am
Thanks, Lobo, for the direction. We have found a way to get at the data the client needs, and I am preparing to leave town. We are putting a pin in this issue, but I expect to revisit it later, and I will update here if I learn anything.

petbos157

  • I’m new here
  • *
  • Posts: 26
  • Karma: 2
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7
  • MySQL version: 5.1.71
  • PHP version: 5.3.3
Re: Unknown column 'price_field_' [...] on Price Set Details for Event Participants
April 13, 2012, 04:52:33 am
We had tesame issue, a "Unknown column 'price_field_1' in 'field list'" error occured.

Thanks to Lobo's direction we descovered that event-manager changed the price-list, after he add 3 persons to the event with the old price-list.

We solved it by :

1) looking into this query (in file PriceSet.php)
        $sql = "
SELECT c.id as contact_id,
       p.id as participant_id,
       l.price_field_value_id as price_field_value_id,
       l.qty
FROM   civicrm_contact c,
       civicrm_participant  p,
       civicrm_line_item    l       
WHERE  c.id = p.contact_id
AND    p.event_id = {$this->_eventID}
AND    p.id = l.entity_id
AND    l.entity_table ='civicrm_participant'
ORDER BY c.id, l.price_field_value_id;
";

2) We have changed the fields 'price_field_id' and 'price_field_value_id' in the table 'civicrm_line_item' where the 'entity_id' equals the 'participant_id' in your error message.
Look at the 'id' field into the tables 'civicrm_price_field' and 'civicrm_price_field_value' for the correct values you can use for the 'price_field_id' and 'price_field_value_id'

Peter


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Unknown column 'price_field_' [...] on Price Set Details for Event Participants

This forum was archived on 2017-11-26.