Development issueshttps://lab.civicrm.org/groups/dev/-/issues2022-07-10T22:43:09Zhttps://lab.civicrm.org/dev/core/-/issues/3726contact import - unresponsive queue runner - 5.512022-07-10T22:43:09ZUpperholmecontact import - unresponsive queue runner - 5.51Trying to get the contact import working. Everything seems to go well and then I'm presented with the queue runner screen which just sits there and nothing happens.
In the browser console I see a 404 for a file - progress.gif - for whi...Trying to get the contact import working. Everything seems to go well and then I'm presented with the queue runner screen which just sits there and nothing happens.
In the browser console I see a 404 for a file - progress.gif - for which the console provides the URL as : https://mydomain.org/core/misc/progress.gif
Also seeing : SyntaxError: JSON Parse error: Unexpected EOF
Clicking the available Retry button has no effect.
Clicking the other button, which looks to be labelled 'skip', presents a partially completed progress bar with a message like 'processed 5 out of 8 rows' (my import file has just 8 rows of data), but no records appear to get imported.
The temporary database table does appear to get created.
Additionally, I found that clicking the 'skip' button multiple times got me to a reporting page that looked like a summary of perhaps what was supposed to happen. It correctly reported the number of rows in the 'imported data' (although of course no data was actually imported, and it erroneously reported that 8 records were created or modified.5.51.1https://lab.civicrm.org/dev/core/-/issues/3725Contacts with "Access CiviContribute" but not "edit contributions" can no lon...2022-07-09T01:07:10ZJonGoldContacts with "Access CiviContribute" but not "edit contributions" can no longer view contributionsReplication steps are in the title!
This is a regression from [PR 22961](https://github.com/civicrm/civicrm-core/pull/22961).
That calls `CRM_Core_Permission::checkActionPermission()` which says in its description, "Check permissions f...Replication steps are in the title!
This is a regression from [PR 22961](https://github.com/civicrm/civicrm-core/pull/22961).
That calls `CRM_Core_Permission::checkActionPermission()` which says in its description, "Check permissions for delete and edit actions", but it's called even when viewing a contribution.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3724hook_managed(...CaseType,APIv4...): Exhausts memory (>256m)2022-07-07T21:12:23Ztottenhook_managed(...CaseType,APIv4...): Exhausts memory (>256m)Overview
----------------------------------------
If you export a `CaseType` with a real `definition` and then try to import it by way of `hook_managed(...CaseType,APIv4...)`, then it crashes due to memory exhaustion.
Reproduction step...Overview
----------------------------------------
If you export a `CaseType` with a real `definition` and then try to import it by way of `hook_managed(...CaseType,APIv4...)`, then it crashes due to memory exhaustion.
Reproduction steps
----------------------------------------
Install https://gist.github.com/totten/3ec8164c3f8ca9d3c51e768feab946da
(*Note: https://github.com/civicrm/civicrm-core/pull/23961 also includes a way to reproduce the problem within a test; but some of the key bits are commented-out, and it requires a `mixer` test harness. The gist may be easier for most folks to play with.*)
Current behaviour
----------------------------------------
```
$ cv en shimmy
Enabling extension "shimmy"
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 69632 bytes) in /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Error.php on line 818
```
Note: 256m is plenty generous for the task.
Expected behaviour
----------------------------------------
The extension should be enabled -- and the full/valid `CaseType` should be setup.
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __Browser:__ Firefox
* __CiviCRM:__ Master
* __PHP:__ 7.4
* __CMS:__ D7
* __Database:__ MySQL 5.7
* __Web Server:__ Apache 2.4
Comments
----------------------------------------
_Anything else you would like the reviewer to note._https://lab.civicrm.org/dev/core/-/issues/3723SearchKit: HTML fields display2022-08-18T16:28:35ZfrancescbassasSearchKit: HTML fields displayFields containing HTML code are displaying as plain text in the SearchKit results. For example, activity details
![htmlfields-as-plain-text](/uploads/61d34edd4d6a761ed5dad7c79866042d/htmlfields-as-plain-text.png)Fields containing HTML code are displaying as plain text in the SearchKit results. For example, activity details
![htmlfields-as-plain-text](/uploads/61d34edd4d6a761ed5dad7c79866042d/htmlfields-as-plain-text.png)colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/3722CaseType managed entity in mgd.php file gets caught in an infinite loop2023-09-16T13:59:04ZherbdoolCaseType managed entity in mgd.php file gets caught in an infinite loopOverview
----------------------------------------
When using mgd.php file for a CaseType managed entity it creates an infinite loop when flushing the cache (which is when managed entities get checked). In `CRM_Case_BAO_CaseType::add()` ...Overview
----------------------------------------
When using mgd.php file for a CaseType managed entity it creates an infinite loop when flushing the cache (which is when managed entities get checked). In `CRM_Case_BAO_CaseType::add()` it calls `CRM_Core_ManagedEntities::scheduleReconciliation()` which seems to create the loop.
Some chat here https://chat.civicrm.org/civicrm/pl/pmcn6sa9zpboigkh7f4ukxt8yr
Reproduction steps
----------------------------------------
1. Create a new Case Type in the UI.
1. Go to API4 and export the Case Type to PHP definition.
1. Save to mgd.php file in an extension.
2. Delete the custom case type.
3. Enable the extension and flush cache (`cv flush`).
Current behaviour
----------------------------------------
Gets caught in an infinite loop, where it keeps trying to create the same case type (as I've noticed when going over it in XDebug).
Expected behaviour
----------------------------------------
Just create it once and stop.
Environment information
----------------------------------------
* __CiviCRM: 5.50.0 and uphttps://lab.civicrm.org/dev/core/-/issues/3721Add Entity Reference custom field type (implementing EntityRef QuickForm elem...2023-07-28T15:04:53ZjensschuppeAdd Entity Reference custom field type (implementing EntityRef QuickForm element type)Overview
----------------------------------------
`EntityRef` ist a QuickForm element type being used to reference CiviCRM entities in several forms. But there is no custom field type implementing this, apart from the *ContactReference* ...Overview
----------------------------------------
`EntityRef` ist a QuickForm element type being used to reference CiviCRM entities in several forms. But there is no custom field type implementing this, apart from the *ContactReference* custom field type, which is (surprise!) restricted to referencing contacts.
Allowing users to model their "real world" use cases in CiviCRM using the UI without mis-using entity types for things they have not been intended for, just because you need some kind of relation between two things, would be a great improvement.
At this time, we are evaluating requirements for a current project where this might be needed, but wanted to discuss our thoughts with some Core people, especially @colemanw who already offered help with reviewing code, before we start, because this will have to be a PR to Core, probably with some refactoring involved.
Example use-case
----------------------------------------
With either Core or custom entities (such as multi-value custom field groups or [ECK entities](https://github.com/systopia/de.systopia.eck)), you might want to model references to different "things" in your business logic, not just contacts.
Imagine a *Project* entity that you would like to add references to contacts, but also to specific activities, contributions, etc. - without a *Project* having to be a contact type or a *Case*, or a *Campaign* because that might not be suitable because of reasons.
Current behaviour
----------------------------------------
Only contact entites can be referenced in custom fields.
Proposed behaviour
----------------------------------------
* Add a custom field type *Entity Reference* with configurable
* entity type
* label property (a property of the selected entity type that will be used for displaying the referenced entity when rendering the field value)
* entity filters (API parameters for the entity)
* Migrate the *Contact Reference* custom field type to be an *Entity Reference* field type with *Contact* as the referenceable entity type and the `display_name` as the label property
* Maybe allow custom field types be extendable, i.e. allow extensions to define additional custom field types
* Maybe add support for SearchKit (e.g. for defining filters or providing widget displays)
Technical Details
----------------------------------------
* *Contact Reference* fields currently store their API filters in the `filter` column of the `civicrm_custom_field` table. The entity itself might be just added there
* The label/title property might be stored in the `attributes` column, which is used for different stuff depending on the custom field type. Alternatively, a new column could be added to the `civicrm_custom_field` table (just as there are columns for other field types), although this is not that good of a design IMO
* Alternatively, all field-type-specific configuration could be migrated into a generic JSON-formatted `configuration` or `properties` column, at least for this new field type for now. There are many columns only needed for specific field types:
* `mask`
* `options_per_line`
* `text_length`
* `start_date_years`
* `end_date_years`
* `date_format`
* `time_format`
* `note_columns`
* `note_rows`
* `option_group_id`
* `filter`
I think adding a new custom field type that stores its configuration in existing columns would be a good first step. Any thoughts on that?
After storing information about a custom field in civicrm_custom_field, a table is created for each group or set of custom fields to store the value of each field for each instance of the set of custom fields. The name of this table is stored in custom_field_group.table_name. This table correlates each record of custom field values with the entity they extend using meta-data about the custom field set to identify the table extended (I think there is a translation of value in custom_field_group.extends to the table name of the entity extended) and the id of the instance extended.
It would be good to support regular CiviCRM entities that are implemented as tables as well as the higher order entities of Order and Payment that have id fields and APIs but not table implementations.
Funding
---------------------
Required: 40
Pledged:
- Third Sector Design - 8
- Systopia - 18
- Megaphone tech - 4 (depending on timeframe)
- JMA - 10
- Humanists UK - 55.60.0https://lab.civicrm.org/dev/core/-/issues/3720CiviCRM 5.50.4, New install on WordPress throws fatal error when installation...2024-03-08T05:03:25Zjustinfreeman (Agileware)CiviCRM 5.50.4, New install on WordPress throws fatal error when installation completes - InstallationCanary.php. Error message: Uncaught CRM_Core_Exception: [0: Found installation canary.CiviCRM 5.50.4, New install on WordPress throws fatal error when installation completes - InstallationCanary.php. Error message: Uncaught CRM_Core_Exception: [0: Found installation canary.
Triggers the WordPress email error: Your Site i...CiviCRM 5.50.4, New install on WordPress throws fatal error when installation completes - InstallationCanary.php. Error message: Uncaught CRM_Core_Exception: [0: Found installation canary.
Triggers the WordPress email error: Your Site is Experiencing a Technical Issue
```
WordPress version 6.0
Active theme: Twenty Twenty-Two (version 1.2)
Current plugin: CiviCRM (version 5.50.4)
PHP version 7.4.30
Error Details
=============
An error of type E_ERROR was caused in line 37 of the file /var/www/vhosts/httpdocs/wp-content/plugins/civicrm/civicrm/Civi/Core/InstallationCanary.php. Error message: Uncaught CRM_Core_Exception: [0: Found installation canary. This suggests that something went wrong with tracking installation process. Please post to forum or JIRA.
```
Agileware Ref: CIVICRM-2010https://lab.civicrm.org/dev/core/-/issues/3719API4 - UserJob.get for job_type:label does not return a string2022-07-07T06:34:39ZtschuettlerAPI4 - UserJob.get for job_type:label does not return a stringOverview
----------------------------------------
The pseudoconstant for `job_type:label` from `UserJob` does not return the label by itself.
Reproduction steps
----------------------------------------
1. Create some user job, e.g. by s...Overview
----------------------------------------
The pseudoconstant for `job_type:label` from `UserJob` does not return the label by itself.
Reproduction steps
----------------------------------------
1. Create some user job, e.g. by starting a contact import
1. Execute https://dmaster.demo.civicrm.org/civicrm/api4#/explorer/UserJob/get?select=%5B%22job_type:label%22%5D
Current behaviour
----------------------------------------
Result will be
``` json
(1) [
{
"id": 1,
"job_type:label": {
"id": "contact_import",
"name": "contact_import",
"label": "Contact Import",
"class": "CRM_Contact_Import_Parser_Contact"
}
}
]
```
Side effect:
The contact import summary screen will have no title and there is a warning + notice:
>>>
Warning: strip_tags() expects parameter 1 to be string, array given in template_preprocess_html() (line 2641 of /opt/buildkit/build/rc/web/includes/theme.inc).
Notice: Array to string conversion in include() (line 46 of /opt/buildkit/build/rc/web/themes/garland/page.tpl.php).
>>>
![grafik](/uploads/6521dbc32a669660de94a330b23df681/grafik.png)
Expected behaviour
----------------------------------------
Result should be
``` json
(1) [
{
"id": 1,
"job_type:label": "Contact Import"
}
]
```
The contact import summary screen will have a proper title.
Comments
----------------------------------------
I guess that this is a side effect of converting in the user job type entity to string in https://github.com/civicrm/civicrm-core/pull/23888.
PR attempt here: https://github.com/civicrm/civicrm-core/pull/239445.51.0https://lab.civicrm.org/dev/core/-/issues/3718Profile listings fail to show email addresses when their location type Name d...2024-03-09T05:03:24ZspalmstromProfile listings fail to show email addresses when their location type Name differs from its Display NameOverview
----------------------------------------
If you create a location type and have different Names and Display Names, then a profile listing uses it fails to display the data.
Reproduction steps
-----------------------------------...Overview
----------------------------------------
If you create a location type and have different Names and Display Names, then a profile listing uses it fails to display the data.
Reproduction steps
----------------------------------------
1. Create a new location type with Name say TestingTesting and Display Name 'Testing Testing'.
2. Create a listing profile to display that location type.
3. Assign an email address of that type to a user.
4. Use the profile to display that user.
Current behaviour
----------------------------------------
Erik Adams detail viewed:
![image](/uploads/f1cda7c22218f4983bad7b1afadbeec6/image.png)
The email address does not show in the listing:
![image](/uploads/bacb9d89a6156a1504a64b7781be4838/image.png)
Expected behaviour
----------------------------------------
_What should happen._
![image](/uploads/c08545abfca4db63e1e3143ac52698b6/image.png)
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __Browser:__ _MS Edge_ but probably not relevant
* __CiviCRM:__ _ 5.52.alpha1._ It is the Demo system<!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __PHP__ _Whatever Demo is running_
* __CMS:__ _Drupal 9_ the version Demo is running.
* __Database:__ _Whatever Demo is running_.
* __Web Server:__ _Whatever runs Demo_
Comments
----------------------------------------
I have spent a few hours attempting to debug on a local system, but haven't been able to discover where the SELECT statement is being created. What appears to be happening is that the SELECT statement is has the Name of the Location Type as a column, whilst the Profile is expecting the Display Name, so when they don't match, the latter displays nothing.
You should note that if the Name is say Testing_Testing and the Display Name is 'Testing Testing', that the data are displayed. This is because somewhere in the Profile display spaces are replaced by underscores. It is how I was able to obtain the expected behaviour.
I am flagging this up in the hope that someone with more expertise than I can more easily identify where the solution lies.https://lab.civicrm.org/dev/core/-/issues/3717Sorting on import/export Mapping page is not sorted by mapping type2022-07-05T20:50:09ZtschuettlerSorting on import/export Mapping page is not sorted by mapping typeOverview
----------------------------------------
Sorting in the mapping page does not work as intended by the source code inhttps://github.com/civicrm/civicrm-core/blob/3cf2f2b0a0c5b499a0064be725887ec5b2fdfe47/CRM/Admin/Page/Mapping.php...Overview
----------------------------------------
Sorting in the mapping page does not work as intended by the source code inhttps://github.com/civicrm/civicrm-core/blob/3cf2f2b0a0c5b499a0064be725887ec5b2fdfe47/CRM/Admin/Page/Mapping.php#L126, instead it is sorted by name only.
Reproduction steps
----------------------------------------
1. Create mappings for different mapping types (e.g. contact and participant)
2. Visit: https://dmaster.demo.civicrm.org/civicrm/admin/mapping?reset=1
Current behaviour
----------------------------------------
List is sorted by mapping name
Expected behaviour
----------------------------------------
List is sorted by mapping type, followed by name
Comments
----------------------------------------
https://github.com/civicrm/civicrm-core/pull/239425.52.0https://lab.civicrm.org/dev/core/-/issues/3716E-Notice on Import/Export Mapping Page2022-07-11T07:41:34ZtschuettlerE-Notice on Import/Export Mapping PageReproduction steps
----------------------------------------
1. Enable Debugging: https://dmaster.demo.civicrm.org/civicrm/admin/setting/debug?reset=1
1. Save a field mapping when doing an import
1. Got an e-notice on the import/export ma...Reproduction steps
----------------------------------------
1. Enable Debugging: https://dmaster.demo.civicrm.org/civicrm/admin/setting/debug?reset=1
1. Save a field mapping when doing an import
1. Got an e-notice on the import/export mapping page (https://dmaster.demo.civicrm.org/civicrm/admin/mapping?reset=1):
`Notice: Undefined index: description in include() (line 22 of /srv/buildkit/build/dmaster/web/sites/default/files/civicrm/templates_c/en_US/%%B7/B7D/B7D2F296%%Mapping.tpl.php).`
## Current behaviour
The e-notice will appear for every field mapping without a description.
## Expected behaviour
No e-notice shown.
## Comments
No recent regression
~https://github.com/civicrm/civicrm-core/pull/23941~
https://github.com/civicrm/civicrm-core/pull/239455.52.0https://lab.civicrm.org/dev/core/-/issues/3715vounteer singup form not working properly2024-03-10T05:03:22Zdev@inboundvounteer singup form not working properlyOverview
----------------------------------------
On submission of volunteer signup form. we get a fatal error. "This page isn’t working" and "HTTP ERROR 500" and messages like "www.site.com is currently unable to handle this request."
...Overview
----------------------------------------
On submission of volunteer signup form. we get a fatal error. "This page isn’t working" and "HTTP ERROR 500" and messages like "www.site.com is currently unable to handle this request."
And sometime it gives an eroor like "Could not find valid value for needs"
Reproduction steps
----------------------------------------
1. Click on volunteer now -> selected an opportunity.
1. Entered **First Name** and **Last Name** and clicked **submit**.
1. Got an error "**Fatal error: This page isn’t working and HTTP ERROR 500".
Current behaviour
----------------------------------------
Currently there is fatal error occurred when we submit volunteer signup form. sometime it says the could not find valid value for need.
And when i tried to search for the opportunity it gives an error message like "need 1 bu found 25"
![Screenshot_2022-07-05_at_11.49.27_AM](/uploads/cbe07cd6cfa94e1bf6bb9abcd8e18744/Screenshot_2022-07-05_at_11.49.27_AM.png)
Expected behaviour
----------------------------------------
There should be no error when we submit the volunteer singup form.
And when we search for opportunities then it should display available opportunites list.
And there should be option to check volunteer singup form fields, we should able to add,edit this form fields.
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __Browser:__ Version 103.0.5060.53
* __CiviCRM:__ Version 5.17.0 <!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __CiviEvent Widget:__ Version 3.2
* __civiVolunteer :__ Version 4.7.31-3.2.3.1
* __CMS:__ WordPress 5.0.15https://lab.civicrm.org/dev/core/-/issues/3713AbstractTokenSubscriber and custom token processors stopped being called?2022-10-03T02:44:25ZAdam WoodAbstractTokenSubscriber and custom token processors stopped being called?I have been tearing my hair out over this for over a week now...
Sometime between 24 November 2021 and 11 May 2022 (these are the last 'good' and first 'bad' scheduled reminders on file), the token processor (implemented as an `Abstract...I have been tearing my hair out over this for over a week now...
Sometime between 24 November 2021 and 11 May 2022 (these are the last 'good' and first 'bad' scheduled reminders on file), the token processor (implemented as an `AbstractTokenSubscriber`) in our custom CiviCRM extension stopped working, in that the tokens were no longer processed and simply omitted from the resulting emails. I suspect this happened when we upgraded to 5.47.3 on 3 April 2022. The custom token processor code did not change in the meantime.
It seems that the token subscriber methods are simply no longer called from the Symfony system at all. With judicious use of `error_log()` and `debug_backtrace()`, I can see that the `getSubscribedEvents()` method of the token processor object is called when CiviCRM is invoked, but thereafter the event dispatcher never calls any of the methods in the token processor:
- The `registerTokens()` and `evaluateTokens()` methods of the token processor are never called.
- The dispatcher never fires the `civi.token.list` or `civi.token.eval` events for the subscribed processor (although I can see these events being dispatched to other token processors in core).
In fact the extension has three token processor objects, all affected in the same way.
The token processors are set up in the extension config routine as follows:
```php
function civicses_civicrm_config(&$config) {
_civicses_civix_civicrm_config($config);
if (isset(Civi::$statics[__FUNCTION__])) { return; }
Civi::$statics[__FUNCTION__] = 1;
Civi::dispatcher()->addSubscriber(new CRM_Civicses_TokensSite());
Civi::dispatcher()->addSubscriber(new CRM_Civicses_TokensEvent());
Civi::dispatcher()->addSubscriber(new CRM_Civicses_TokensParticipant());
}
```
I tried resetting the cache and deleting the cached container multiple times, all to no avail. I also tried disabling and re-enabling the extension.
To make sure I wasn't going mad, I even tried re-implementing some of the simple tokens using `..._civicrm_container()`, `..._register_tokens()` and `..._evaluate_tokens()` as described in https://docs.civicrm.org/dev/en/latest/framework/token/#defining-tokens but the same issue occurred: the methods were never called. Even after purging the cached container.
Aware that various parts of CiviCRM are (or were) still in flux with regards to token processor migration, I tried generating both a mass mailing and a scheduled reminder. Neither worked.
An upgrade to 5.50.4 has not fixed the issue. I think I am going mad after all! I have read and re-read the documentation several times now and can't see what I'm doing wrong (and in any case it worked before), so I suspect this is a genuine issue.
Any and all help gratefully received.
<details><summary>Code from the token processor that worked until earlier this year, if anyone is interested. It provides Joomla routed frontend URLs to the event pages (note deprecated hook included for earlier CiviCRM version).</summary>
```php
class CRM_Civicses_TokensEvent extends \Civi\Token\AbstractTokenSubscriber
{
/* Public methods */
/**
* Class constructor.
*/
public function __construct()
{
parent::__construct('event', self::getTokens());
}
/**
* @inheritDoc
*/
public function checkActive(\Civi\Token\TokenProcessor $processor)
{
// Copied from CRM_Event_Tokens
return !empty($processor->context['actionMapping'])
&& $processor->context['actionMapping']->getEntity() === 'civicrm_participant';
}
/**
* @inheritDoc
*/
public function evaluateToken(\Civi\Token\TokenRow $row, $entity, $field, $prefetch = NULL)
{
$info = ($field == 'info_url_frontend');
$registration = ($field == 'registration_url_frontend');
if ($info || $registration)
{
$actionSearchResult = $row->context['actionSearchResult'];
$path = ($registration ? 'civicrm/event/register' : 'civicrm/event/info');
// Default URL using original logic in CRM_Event_Tokens (but with $frontend set to TRUE)
$event = [
'event_id' => $actionSearchResult->event_id,
'url' => \CRM_Utils_System::url($path, 'reset=1&id='.$actionSearchResult->event_id, TRUE, NULL, TRUE),
];
// Use same URL logic as for upcoming event emails, if possible
CRM_Civicses_Events::fixEventURL($event, 0, $registration);
$row->tokens($entity, $field, $event['url']);
}
}
/* CiviCRM hook implementations */
/**
* Implements hook_civicrm_tokens().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_tokens
*
* NEEDED TO ENSURE LISTING IN ADMINISTRATOR FORMS (uses method ref'd below not registerTokens event).
* @see CRM_Core_SelectValues::eventTokens()
*/
static public function civicrm_tokens(&$tokens)
{
foreach (self::getTokens() as $key => $value)
{
$tokens['event']['event.'.$key] = $value;
}
}
/* Private methods */
/**
* Get token names.
* @return array
*/
static private function getTokens() : array
{
return [
'info_url_frontend' => ts('Event Info URL (front-end)'),
'registration_url_frontend' => ts('Event Registration URL (front-end)'),
];
}
}
```
</details>https://lab.civicrm.org/dev/core/-/issues/3712Errors with multiple-contact reference field handling2022-08-13T13:33:41ZAdam WoodErrors with multiple-contact reference field handlingFurther to #2939, another issue has come to light with the way CiviCRM core handles contact reference fields with multiple selection.
In `_civicrm_api3_custom_data_get()`, the possibility of multiple selection is not allowed for. This m...Further to #2939, another issue has come to light with the way CiviCRM core handles contact reference fields with multiple selection.
In `_civicrm_api3_custom_data_get()`, the possibility of multiple selection is not allowed for. This means that an array of values can be passed to `CRM_Core_DAO::getFieldValue()` which fails because it expects a scalar `$searchValue`.
```php
// Shim to restore legacy behavior of ContactReference custom fields
if (!empty($fieldInfo[$id]) && $fieldInfo[$id]['data_type'] === 'ContactReference') {
$returnArray['custom_' . $id . '_id'] = $returnArray[$key . '_id'] = $val;
$returnArray['custom_' . $id] = $returnArray[$key] = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $val, 'sort_name');
}
```
You also get a PHP warning `Warning: Illegal offset type`, and on PHP 8 this would result in a fatal error.
Suggested modification to code:
```php
// Shim to restore legacy behavior of ContactReference custom fields
if (!empty($fieldInfo[$id]) && $fieldInfo[$id]['data_type'] === 'ContactReference') {
$returnArray['custom_' . $id . '_id'] = $returnArray[$key . '_id'] = $val;
if (is_array($val)) {
$lookupValues = [];
foreach ($val as $contactId) {
$lookupValues[] = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $contactId, 'sort_name');
}
$returnArray['custom_' . $id] = $returnArray[$key] = $lookupValues;
}
else {
$returnArray['custom_' . $id] = $returnArray[$key] = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $val, 'sort_name');
}
}
```5.53.0https://lab.civicrm.org/dev/core/-/issues/3710Grants not shown for contact2022-08-02T04:13:05ZAdam WoodGrants not shown for contactSince the migration of CiviGrant to an extension, grants are no longer showing for a contact:
![image](/uploads/724db8ea7bf8523e2de84820d5aa4411/image.png)
This has been observed persistently on versions 5.47.3 and 5.50.4. I have tried v...Since the migration of CiviGrant to an extension, grants are no longer showing for a contact:
![image](/uploads/724db8ea7bf8523e2de84820d5aa4411/image.png)
This has been observed persistently on versions 5.47.3 and 5.50.4. I have tried various obvious things e.g. purging caches, disabling / re-enabling CiviGrant.https://lab.civicrm.org/dev/core/-/issues/3709Feature request - Filter case activities to only activity types in civicase2022-07-08T04:10:23ZkristinecFeature request - Filter case activities to only activity types in civicaseOverview
----------------------------------------
When viewing a case, users should only be able to filter on activity types available to the civicase.
Example use-case
----------------------------------------
1. Find any case and click...Overview
----------------------------------------
When viewing a case, users should only be able to filter on activity types available to the civicase.
Example use-case
----------------------------------------
1. Find any case and click on "Manage". Or, just view a contact's case.
2. Click on Search Filters to expand options. See Activity type dropdown (see attached image)![case_activity_filter](/uploads/57d7278ac571f0db3e2aa2632f8204fa/case_activity_filter.png).
Current behaviour
----------------------------------------
Currently, click on the Activity Type dropdown will list all activity types in civicase.
Proposed behaviour
----------------------------------------
Users should only be able to see activity types that are part of the case. For example: here's two case types with their activity types:
Housing Support: Medical evaluation, secure temporary housing
Adult Day Care Referral: Medical evaluation, mental health evaluation, ADC referral
When viewing John Doe's "Housing Support" case, it doesn't seem to make sense that users can filter on the activity type "ADC referral" if this activity type will never appear on this case. The "ADC referral" was not added as an option in the "Housing Support" case.
Comments
----------------------------------------
Not sure if this would be considered an extension or part of civicore. Also, wouldn't mind marking this as a paid issue in case others might be interested in contributing.5.52.0https://lab.civicrm.org/dev/core/-/issues/3708Feature request - Add link type to case activity setup2024-03-10T05:03:23ZkristinecFeature request - Add link type to case activity setupOverview
----------------------------------------
In CiviCase, create an option to add an internal/external link on the list of activity types.
Example use-case
----------------------------------------
1. Click on **Administer -> CiviC...Overview
----------------------------------------
In CiviCase, create an option to add an internal/external link on the list of activity types.
Example use-case
----------------------------------------
1. Click on **Administer -> CiviCase -> Case Types -> Edit Housing Support**.
2. Click on **Activity Types** tab
Current behaviour
----------------------------------------
Currently, admins can only add activity types in civicrm (using the "Add activity type" dropdown).
Proposed behaviour
----------------------------------------
Admin users could really benefit from an "add link type" setting. I propose two fields: title and path/url. This would allow admins to link to webforms/afforms in the future for additional data entry but leveraging their features (e.g., conditional fields, layout control, etc.). For example, user clicks on a case and in the dropdown, sees "Benefits Evaluation", but this is an internal path link rather than a civicase form.
Comments
----------------------------------------
Not sure if this would be considered an extension or part of civicore. Also, wouldn't mind marking this as a paid issue in case others might be interested in contributing![Link_Type](/uploads/fb77e6502f97f54e0ef323cd6abaf71e/Link_Type.png).https://lab.civicrm.org/dev/core/-/issues/3707Rc import with Wordpress goes to the right url but doesn't 'refresh'2022-07-05T15:47:07ZeileenRc import with Wordpress goes to the right url but doesn't 'refresh'After doing an import in WP the queue runner seems to redirect to the right url but doesn't seem to refresh to it - see how the url is correct but the page below it is the civicrm homepage
![image](/uploads/dd1c1ac79bfac977086c271c762f1...After doing an import in WP the queue runner seems to redirect to the right url but doesn't seem to refresh to it - see how the url is correct but the page below it is the civicrm homepage
![image](/uploads/dd1c1ac79bfac977086c271c762f1ea6/image.png)
If I hit enter on the url I get
![image](/uploads/badd5f37ab99e3e3b6d99474f055a938/image.png)5.51.0https://lab.civicrm.org/dev/core/-/issues/3706RC regression: Valid URLs failing URL validation2022-09-29T14:42:49ZJonGoldRC regression: Valid URLs failing URL validation### Steps to replicate
* Have `php-intl` installed.
* On the master branch, try adding this website to a contact:
```
https://mysite.org/index.php/apps/files/?dir=/Talk/Test%20Folder1/Test%20Folder%202&fileid=597195
```
On 5.50, this sa...### Steps to replicate
* Have `php-intl` installed.
* On the master branch, try adding this website to a contact:
```
https://mysite.org/index.php/apps/files/?dir=/Talk/Test%20Folder1/Test%20Folder%202&fileid=597195
```
On 5.50, this saves correctly, on master branch it fails validation.
In [PR 23755](https://github.com/civicrm/civicrm-core/pull/23755) URL validation uses `idn_to_ascii` ([CRM_Utils_Rule line 224](https://github.com/eileenmcnaughton/civicrm-core/blob/8b3f43f48bdc91c7ed07237f2d8ef1033ffe24b2/CRM/Utils/Rule.php#L224)).JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3704APIv4 'Invalid field' but really permission problem2024-03-07T05:03:20Zaydunsaidan.saunders@squiffle.ukAPIv4 'Invalid field' but really permission problemI used APIv4 Explorer to create this:
```
$results = \Civi\Api4\Email::update()
->addValue('on_hold', 0)
->addWhere('email', '=', 'test@example.org')
->addWhere('contact_id.is_deleted', '=', FALSE)
->addWhere('on_hold', '=', 1)
...I used APIv4 Explorer to create this:
```
$results = \Civi\Api4\Email::update()
->addValue('on_hold', 0)
->addWhere('email', '=', 'test@example.org')
->addWhere('contact_id.is_deleted', '=', FALSE)
->addWhere('on_hold', '=', 1)
->execute();
```
I copied it into a script, ran it and got the message:
```
Invalid field 'contact_id.is_deleted'
```
That caused a bit of head-scratching and double-checking I hadn't got weird characters in there until trying `update(FALSE)` - it worked.
An error message about lack of permission would be much more helpful than the current 'Invalid field'.
CiviCRM: 5.50.3