Fatal Error (Regression) on PCP pages associated with Events
A client site reported all their URLs (of this format: URLs like: /civicrm/event/register?id=14&pcpId=204&reset=1 - all started producing Fatal Error post upgrade to 5.3.1;
Backtrace identified pcp_personal_note was involved.
Traced it to regression introduced in: https://github.com/civicrm/civicrm-core/pull/12056 I had originally submitted https://github.com/civicrm/civicrm-core/pull/12044 which was replaced by a more complex https://github.com/civicrm/civicrm-core/pull/12056 (in early May)
Reverting one line in /CRM/PCP/BAO/PCP.php
to what I had proposed in https://github.com/civicrm/civicrm-core/pull/12044 fixes the issue:
/CRM/PCP/BAO
[karin@louise BAO]$ diff PCP.php.dist PCP.php
456c456,459
< $page->addField('pcp_personal_note', array('entity' => 'ContributionSoft', 'context' => 'create', 'style' => 'height: 3em; width: 40em;'));
---
> $page->add('textarea', "pcp_personal_note", ts('Personal Note'), array('maxlength' => '250', 'style' => 'height: 3em; width: 40em;'));
> // regression caused by https://github.com/civicrm/civicrm-core/pull/12056
> // $page->addField('pcp_personal_note', array('entity' => 'ContributionSoft', 'context' => 'create', 'style' => 'height: 3em; width: 40em;'));
>