veda-consulting-company / uk.co.vedaconsulting.gdpr

Other
11 stars 55 forks source link

Fix 'Update Comms Prefs' on Civi 5.60+ #325

Closed MegaphoneJon closed 1 year ago

MegaphoneJon commented 1 year ago

Submitting a communication preferences update on Civi 5.60+ results in this error:

php Error: Call to undefined method CRM_Gdpr_Form_UpdatePreference::isEntityReferenceContactCreateMode() in CRM_Profile_Form::handleDuplicateChecking() (line 204 of /var/www/mysite/web/sites/all/modules/civicrm/CRM/Profile/Form.php).

This extension uses the formRule of CRM_Profile_Form but without extending it - so with CRM_Profile_Form calling a new function in its own class, the GDPR extension fails.

I tried to make CRM_Gdpr_Form_UpdatePreference extend CRM_Profile_Form but that just led to problems, so instead I copied the missing function into this class.