-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
bugSomething isn't workingSomething isn't workingstatus:fixedThe issue has been resolved (usually by committing/merging code)The issue has been resolved (usually by committing/merging code)
Milestone
Description
This issue may be related to #56.
When opening the Twingle API - Generic Settings page, an error message is displayed:
contact_type is an array, but only strings are allowed in $attributes.
The problem is the twingle_protect_recurring_activity_assignee selection field, which seems to pass an invalid array structure to $this->addEntityRef().
de.systopia.twingle/CRM/Twingle/Form/Settings.php
Lines 92 to 99 in 1b68462
| $this->addEntityRef( | |
| 'twingle_protect_recurring_activity_assignee', | |
| E::ts('Assigned To'), | |
| [ | |
| 'contact_type' => ['IN' => ['Individual', 'Organization']], | |
| 'check_permissions' => 0, | |
| ] | |
| ); |
According to the documentation, the array passed to $this->addEntityRef() must be structured as follows:
// Use the 'option_value' entity for most "option" lists, e.g. event types, activity types, gender, individual_prefix, custom field options, etc.
$this->addEntityRef('field_5', ts('Activity Type'), [
'entity' => 'option_value',
'api' => [
'params' => ['option_group_id' => 'activity_type'],
],
'select' => ['minimumInputLength' => 0],
]);If the array is structured correctly, the problem is solved:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingstatus:fixedThe issue has been resolved (usually by committing/merging code)The issue has been resolved (usually by committing/merging code)


