christianwach / civicrm-wp-profile-sync

Keeps a WordPress User profile in sync with a CiviCRM Contact and integrates WordPress and CiviCRM Entities with data synced via Advanced Custom Fields.
https://wordpress.org/plugins/civicrm-wp-profile-sync/
GNU General Public License v2.0
14 stars 17 forks source link

ACF CiviCRM Contact Reference field broken since 6.3.10 #58

Open seamuslee001 opened 1 week ago

seamuslee001 commented 1 week ago

In ACF 6.3.10 based on the change log here https://www.advancedcustomfields.com/changelog/ the nonce is now prefixed

Like for select

$select['data-nonce'] = wp_create_nonce( 'acf_field_' . $this->name . '_' . $field['key'] )

This means that the validation here https://github.com/christianwach/civicrm-wp-profile-sync/blob/master/includes/acf/fields/cwps-acf-field-civicrm-contact.php#L349 has broken as we only pass in the field_key not the full prefixed nonce

christianwach commented 1 week ago

@seamuslee001 Thanks for the report. I helped Konrad fix ACF Extended, which broke with that update - didn't realise forgot that some of the fields in this plugin were also affected. I'll be working on an upgrade for ACFE form actions next week, so will fix then.

christianwach commented 1 week ago

@seamuslee001 You could use this MU Plugin in the meantime

https://gist.github.com/christianwach/608bf11926575e824012f1ea18a38e72

christianwach commented 5 days ago

@seamuslee001 Can you test the latest commits to master? They work for me when I've removed the MU Plugin I pointed to in my previous reply.