1

Issue: After disabling an event price set field option that one or more participants had already selected in their registration, you are now unable to run the custom search "Price Set Details for Event Participants".

This has been an issue since 4.6 (at least), and reproduced today on the demo site (civicrm.demo.civihosting.com running 5.10.0), as well as the sandbox site (dmaster.demo.civicrm.org running 5.15.alpha1).

When might this happen? You've begun registration for an event, but due to lack of registrations or unforeseen circumstances, you need to cancel one the available options. You issue refunds to anyone who has already paid (not required to reproduce error), and disable the option so that no one else selects it.

How to reproduce:

  • Create an event price set, with a radio field with a couple of options (example: workshop 1, workshop 2)
  • Create an event and choose your price set
  • Register an event participant and select one of the price field options
  • Go to Search > Custom Searches > Price Set Details for Event Participants and get results for your event, all should be good
  • Edit the price field and disable the price field option your registrant selected
  • Repeat the Price Set search, you will now get an error

DB Error: no such field

Further detail in ConfigAndLog file:

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

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => 
UPDATE civicrm_temp_custom_06a7d4ad3c362837ef807a1493c88112
SET price_field_271 = 1.00,price_field_284 = 0.00,price_field_289 = 0.00,price_field_306 = 1.00,price_field_307 = 1.00
WHERE participant_id = 1562;
 [nativecode=1054 ** Unknown column 'price_field_289' in 'field list']
    [type] => DB_Error
    [user_info] => 
UPDATE civicrm_temp_custom_06a7d4ad3c362837ef807a1493c88112
SET price_field_271 = 1.00,price_field_284 = 0.00,price_field_289 = 0.00,price_field_306 = 1.00,price_field_307 = 1.00
WHERE participant_id = 1562;
 [nativecode=1054 ** Unknown column 'price_field_289' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="
UPDATE civicrm_temp_custom_06a7d4ad3c362837ef807a1493c88112
SET price_field_271 = 1.00,price_field_284 = 0.00,price_field_289 = 0.00,price_field_306 = 1.00,price_field_307 = 1.00
WHERE participant_id = 1562;
 [nativecode=1054 ** Unknown column 'price_field_289' in 'field list']"]
)

You'll find with investigation that the participant in question is the one registered, and the "Unknown column 'price_field_[id]'" will be the price option that you disabled.

The likely file to be updated is CRM/Contact/Form/Search/Custom/PriceSet.php

Workaround: temporarily reenable the option, run the report, disable the option again.

1 Answer 1

0

This is a core bug and have submitted a fix for it. Can you please try applying patch from here. If it works for you than please add a comment on PR.

Cheers

Pradeep

2
  • Thanks for this, I should be able to test later today. May 13, 2019 at 17:34
  • I've added my comments on the PR, almost there. Thanks again. May 17, 2019 at 0:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.