Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S Search and Reporting - archived
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Development
  • Search and Reporting - archived
  • Issues
  • #16

Closed (moved)
(moved)
Open
Created Jul 04, 2019 by eileen@eileen🎱Owner

Unreleased regression - fee levels incorrectly show sold out (in code that will be 5.16)

Fees are incorrectly showing as sold out, blocking change fee selection.

This is an unexpected consequence of https://github.com/civicrm/civicrm-core/pull/14244

The path is that because $this->_id is now set it gets assigned to the form

https://github.com/civicrm/civicrm-core/blob/5774b54f47445de233daa85672ce4f793dff347a/CRM/Event/Form/Participant.php#L265

Which then gets passed to the call to load the fee block

https://github.com/civicrm/civicrm-core/blob/c4145dedecb1f3157ecf8fd85421f562e8128e73/templates/CRM/Event/Form/Participant.tpl#L411

which results in $_pid being set & as a result online being set

https://github.com/civicrm/civicrm-core/blob/90b461f1623e75e94e0f472a3c6bf23e01defbc1/CRM/Event/Form/EventFees.php#L350

which leads to the element being frozen

https://github.com/civicrm/civicrm-core/blob/90b461f1623e75e94e0f472a3c6bf23e01defbc1/CRM/Event/Form/EventFees.php#L393

which is interpretted as 'sold out'

https://github.com/civicrm/civicrm-core/blob/6b83d5bdd0f2ca546924feae6aa42aeddb1d40cf/templates/CRM/Price/Form/PriceSet.tpl#L93

This is an example of a code antipattern which is too prevalent in our codebase - ie. hanging various assumptions off a parameter.

I think the right answer is to assign a variable of online & then pass that through & make appropriate decisions based on that.

The first question is - do we revert https://github.com/civicrm/civicrm-core/pull/14244 out of the rc and then re-commit into master to give us more time given how awful this code path is

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking