CiviMRF / cmrf_core

Drupal Core for CMRF
GNU Affero General Public License v3.0
2 stars 6 forks source link

Support CiviCRM APIv4 #59

Closed jensschuppe closed 1 year ago

jensschuppe commented 2 years ago

With CiviMRF/CMRF_Abstract_Core#18, this introduces support for CiviCRM APIv4 and partly resolves #57 (leaving out the Webform integration for now).

This will be backwards-compatible so that it can be released within the 2.x major version branch.

jensschuppe commented 2 years ago

@kainuk, @jaapjansma, @dontub - this would be happy to receive your review or test feedback!

dontub commented 2 years ago

The code in https://github.com/CiviMRF/cmrf_core/blob/dc975770bf36b7a9a609d1211da9b6aa68f42e29/cmrf_views/src/CMRFViews.php#L304 is only relevant for APIv3 and the index in the first check should be type as well and probably isset instead of empty.

https://github.com/CiviMRF/cmrf_core/blob/dc975770bf36b7a9a609d1211da9b6aa68f42e29/cmrf_views/src/CMRFViews.php#L315 The type check is only relevant for APIv3.

jensschuppe commented 2 years ago

Pending:

jensschuppe commented 2 years ago

I'm not sure whether File fields contain their URLs only with APIv4 or that changed for APIv3 as well (the File field handler in CiviMRF Views expects a CiviCRM Attachment entity ID instead), but downloading the file and displaying it with this handler might not work because of permission restrictions in CiviCRM, at least for some file fields. So this isn't fully working.

jensschuppe commented 1 year ago

This will be available with a 2.1.x version of the module.