Multiple fixes/improvements
I tried using this extension yesterday and it wasn't working for me. I found and fixed a number of bugs and also added a new feature:
Bugs
- In the AngularJS page that displays the records, the display name is linked to the contact record in a Drupal-specific way.
- If advanced logging is turned on, all entries are written to
log_civicrm_apirestlog
, which means that table grows indefinitely even ascivicrm_apirestlog
is trimmed. - WordPress has a different REST endpoint to account for modifications WP makes to the incoming data. Data set to the WP REST endpoint captures calling contact ID and timestamp, but not entity/action/parameters.
- The "Log to table" and "Log to database" settings are defined as booleans, but there's a strict check for whether their value is
1
. It's not obvious out of the box because the default value is "1" but saving any settings changes will cause nothing to be logged afterward.
New Feature
I added two new settings "Entities to include" and "Entities to exclude". While it's good that you can filter in AngularJS, my monitoring system makes a REST call to System.check
every 5 minutes. This means that traffic I want to log gets thrown out relatively quickly, and the logs get bloated. I only need to log a small number of entities.
MRs incoming.