CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2023-04-05T16:48:01Zhttps://lab.civicrm.org/dev/core/-/issues/4110Can't edit Activity source, targets, assignees in FormBuilder2023-04-05T16:48:01ZnoahCan't edit Activity source, targets, assignees in FormBuilder[As reported](https://chat.civicrm.org/civicrm/pl/eprjkpg4cbrcbbj7u64qnbsohc) by @guyiac on MM:
I'm trying to use a form to edit existing activities. I can pass the existing activity id successfully with an URL, and all the information ...[As reported](https://chat.civicrm.org/civicrm/pl/eprjkpg4cbrcbbj7u64qnbsohc) by @guyiac on MM:
I'm trying to use a form to edit existing activities. I can pass the existing activity id successfully with an URL, and all the information for the activity will pre-fill into the form, ***except*** the contacts (targets, assigned to, and created by). Am I missing something? Civi 5.54.0.https://lab.civicrm.org/dev/core/-/issues/810Non-primary details exported in primary-only exports, when the setting 'Searc...2023-04-05T05:03:18ZAndrew WestNon-primary details exported in primary-only exports, when the setting 'Search Primary Details Only' is set to 'no'If you run an export with 'Export PRIMARY fields', but you have the setting 'Search Primary Details Only' set to 'No', the primary filter is not applied and you simply get the first available row in the table. This also happens when you ...If you run an export with 'Export PRIMARY fields', but you have the setting 'Search Primary Details Only' set to 'No', the primary filter is not applied and you simply get the first available row in the table. This also happens when you select the 'Primary' option when exporting individual fields.
This definitely applies to postal addresses. I haven't tested emails but I think it'll happen there too.
It happens because of this line in CRM_Contact_BAO_Query:
https://github.com/civicrm/civicrm-core/blob/a2540ad336faf7fb0218055a485c1a702200293f/CRM/Contact/BAO/Query.php#L446
which defaults to using the value from the setting. If this is set to no, the result SQL clause doesn't include 'is_primary = 1'.
CRM_Export_BAO_ExportProcessor creates the Query object here:
https://github.com/civicrm/civicrm-core/blob/a2540ad336faf7fb0218055a485c1a702200293f/CRM/Export/BAO/ExportProcessor.php#L509
but doesn't pass through a value for 'primaryLocationOnly' to override the default setting.
I can presumably adapt the above to pass through primaryLocationOnly when users have selected the 'Export PRIMARY fields' option - that *seems* simple enough. I haven't had a chance to dig into how it works when the export specifies individual fields, though - that seems like it'd be more complicated.
To replicate on demo site:
1. Create a new tmp group
2. Find a contact with an existing primary address
3. Add a new address for them, and set it to primary
4. Add this contact to the tmp group
4. Turn off the setting 'Search Primary Details Only'
5. Search for all members of the tmp group, and export them using 'Export PRIMARY fields only'
6. The contact's address in the CSV will be the original address, which is non-primaryhttps://lab.civicrm.org/dev/core/-/issues/3937Importing "No" values to Boolean field results in empty2023-04-03T02:21:49ZelilisseckImporting "No" values to Boolean field results in emptyOverview
----------------------------------------
Contact imports to custom "Yes or No" fields work with values 1 or 0. "Yes" also appears to work.
If you import a "No" value, however, the field will be blank for that contact instead o...Overview
----------------------------------------
Contact imports to custom "Yes or No" fields work with values 1 or 0. "Yes" also appears to work.
If you import a "No" value, however, the field will be blank for that contact instead of having the "No"/0 label/value.
Technical details
----------------------------------------
["strtoboolstr"](https://github.com/civicrm/civicrm-core/blob/4ce53ba3de860a5d9aac1b1bbd22b7a29e839af2/CRM/Utils/String.php#L424) gets run twice on this data. [Once on the raw value returning a boolean](https://github.com/civicrm/civicrm-core/blob/902fc38d0d6cd9d09ee02f30cc6621747151a06a/CRM/Import/Parser.php#L1602) and [once later in the code here](https://github.com/civicrm/civicrm-core/blob/902fc38d0d6cd9d09ee02f30cc6621747151a06a/CRM/Contact/Import/Parser/Contact.php#L328)
When you run this on a boolean value (you shouldn't, according to the comments, but perhaps we should check for this), "Yes"/true will _look_ like it's working okay because the preg_match will match for (bool)true but it won't match for (bool)false. I'm sure this has something to do with a PHP oddity I know nothing about but related to the fact that `strlen((bool)true)` is `1` and `strlen((bool)false)` is `0`.
Proposed solution is:
1) Don't run strtoboolstr twice. We don't need that second iteration of it because it's already been run on the data. I'm not sure of any other impacts for this so also:
2) Write a test for importing to a Yes/No field with the 6 values that should work (1,0,yes,no,true,false). I've started writing this test following examples but i'm having trouble getting my import data actually in properly to run the assertEquals on. I will open a WIP PR with this test.
Any other thoughts welcome!
Reproduction steps
----------------------------------------
1. Create a custom field with data type "Yes or No"
2. Create a csv to import first,last,custom_fieldID with data for your custom field "Yes" and "No"
3. Run the import normally through the GUI in the Contacts > Import Contacts workflow
4. Observe custom field results on the imported contacts
Expected behaviour
----------------------------------------
According to code comments, this type of field import should accept "1", "0", "Yes", "No", "true", "false" and they should all fill a "Yes or No" field correctly.
Environment information
----------------------------------------
This was reproduced on the master branch in d9 (5.56.alpha1)5.61.0https://lab.civicrm.org/dev/core/-/issues/4149User editable Message Templates, the Contact Action: Send an Email and the Co...2023-03-29T21:09:22Zjustinfreeman (Agileware)User editable Message Templates, the Contact Action: Send an Email and the Contact Action: Print Merge/Document cannot use any Smarty Tokens with the crmDate function because CKEditor 4 unnecessarily HTML encodes single quotes (') and double quotes (")User editable Message Templates, the Contact Action: Send an Email and the Contact Action: Print Merge/Document cannot use any Smarty Tokens with the crmDate function because CKEditor 4 unnecessarily HTML encodes single quotes (') and do...User editable Message Templates, the Contact Action: Send an Email and the Contact Action: Print Merge/Document cannot use any Smarty Tokens with the crmDate function because CKEditor 4 unnecessarily HTML encodes single quotes (') and double quotes (").
So if you use a Smarty Token like:
```{contribution.receive_date|crmDate:"%E%f %B %Y"}```
```{contribution.receive_date|crmDate:'%E%f %B %Y'}```
When CKEditor 4 parses the HTML it converts this into:
```{contribution.receive_date|crmDate:"%E%f %B %Y"}```
```{contribution.receive_date|crmDate:'%E%f %B %Y'}```
Effectively rendering the crmDate function unusable in these situations.
Using CKEditor 5 does solve this specific problem, however CKEditor 5 introduces new problems such as the inability for users to resize images, loss of some formatting controls and importantly prevents the ability to view/edit the source HTML.
Agileware Ref: CIVICRM-21035.61.0https://lab.civicrm.org/dev/core/-/issues/1775civicrm_financial_trxn.fee_amount reversals mixed up2023-03-22T05:03:26ZJoeMurraycivicrm_financial_trxn.fee_amount reversals mixed upOverview
----------------------------------------
When doing reversal bookkeeping entry as part of changing a financial type, the fee_amount field does not have its sign reversed. This results in an incorrect net_amount field. See bug 1 ...Overview
----------------------------------------
When doing reversal bookkeeping entry as part of changing a financial type, the fee_amount field does not have its sign reversed. This results in an incorrect net_amount field. See bug 1 in https://gist.github.com/JoeMurray/6db6a82ff6c9e593ca5301b5f8708f52
Current behaviour
----------------------------------------
civicrm_financial_trxn.fee_amount has same value as original record in the reversal record. This results in net_amount not being a correct reversal of the original record's net_amount.
Expected behaviour
----------------------------------------
civicrm_financial_trxn.fee_amount has negative of value in original record in the reversal record. This results in net_amount being the negative in the reversal record of that field in the original record.
Comments
----------------------------------------
We should check for this issue wherever the code creates reversal transactions.
Make unit tests for all of the areas in the code where this occurs.seamusleeseamuslee2020-05-26https://lab.civicrm.org/dev/core/-/issues/1500Add system check for required PHP extensions (bcmath, curl, etc.)2023-03-21T05:03:21ZAllenShawAdd system check for required PHP extensions (bcmath, curl, etc.)I was recently bitten by the bcmath requirement (along the lines of https://civicrm.stackexchange.com/q/31932/907), on a system that (for unrelated reasons) was making error messages fairly hard to get to.
It occurs to me that since Civ...I was recently bitten by the bcmath requirement (along the lines of https://civicrm.stackexchange.com/q/31932/907), on a system that (for unrelated reasons) was making error messages fairly hard to get to.
It occurs to me that since CiviCRM core requires several php extensions (https://docs.civicrm.org/sysadmin/en/latest/requirements/#php-extensions), it would be helpful to have a system check that uses `extension_loaded()` to confirm these are installed, and presents a 'critical' error if any are missing.https://lab.civicrm.org/dev/core/-/issues/1921Remove unneccessary isoToDate function2023-03-20T01:39:56ZeileenRemove unneccessary isoToDate function**[CQ] Let's celebrate the recent 6 year anniversary of making isoToData unnecessary by getting it out of the code**
Prior to July 2014 the following would fail
```
$contribution->fetch();
$contribution->save();
```
because the fetch ...**[CQ] Let's celebrate the recent 6 year anniversary of making isoToData unnecessary by getting it out of the code**
Prior to July 2014 the following would fail
```
$contribution->fetch();
$contribution->save();
```
because the fetch format for dates was invalid for save.
However, that all changed once this was merged https://github.com/civicrm/civicrm-packages/commit/283da6111677fc2b0176902b4c9a5cbcf668a258
Except for the bits that provide handling for it still litter our codehttps://lab.civicrm.org/dev/core/-/issues/4068Running a Contact Summary report as a limited access user granted gives DB Er...2023-03-18T05:12:26ZtiminaustRunning a Contact Summary report as a limited access user granted gives DB Error: no such fieldOverview
----------------------------------------
Running a report as a limited access user based on a group that has ACL permissions granted gives ...
```
Sorry, due to an error, we are unable (etc)... DB Error: no such field
```
My par...Overview
----------------------------------------
Running a report as a limited access user based on a group that has ACL permissions granted gives ...
```
Sorry, due to an error, we are unable (etc)... DB Error: no such field
```
My particular use case was a Contact Summary report based on a smartgroup being run by a locked-down user who has acl access to that group (ie not all groups).
Reproduction steps (simplified from my actual use case).
----------------------------------------
1. Create a smart-group and set up ACL for a specific user that doesn't have global access to all contacts/groups.
2. Login as that user, create the report, select a couple of fields AND the smart-group.
3. Attempt to run the report.
Current behaviour
----------------------------------------
Report fails with DB Error: no such field as limited access user, but runs fine for full access user.
The following SQL was generated for the limited access user ...
```
SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name AS civicrm_contact_sort_name,
contact_civireport.id AS civicrm_contact_id,
email_civireport.email AS civicrm_email_email,
(address_civireport.street_number % 2) AS civicrm_address_address_odd_street_number,
address_civireport.postal_code AS civicrm_address_address_postal_code
FROM civicrm_contact contact_civireport
LEFT JOIN civicrm_address address_civireport ON
(contact_civireport.id = address_civireport.contact_id)
AND address_civireport.is_primary = 1
LEFT JOIN civicrm_email email_civireport ON
contact_civireport.id = email_civireport.contact_id
AND email_civireport.is_primary = 1
WHERE ((contact_civireport.contact_type IN ('Individual')))
AND contact_civireport.id IN
(SELECT DISTINCT cgroup_civireport.contact_id
FROM civicrm_group_contact cgroup_civireport
WHERE cgroup_civireport.group_id IN (11)
AND cgroup_civireport.status = 'Added'
UNION DISTINCT SELECT DISTINCT smartgroup_contact.contact_id
FROM civicrm_group_contact_cache smartgroup_contact
WHERE smartgroup_contact.group_id IN (11) )
AND (`contact_civireport`.`id` IS NULL
OR (`contact_civireport`.`id` IN
(SELECT contact_id FROM civicrm_acl_contact_cache WHERE user_id = 6)))
AND (`contact_civireport`.`is_deleted` IS NULL
OR (`contact_civireport`.`is_deleted` != 1))
AND (`cgroup_civireport`.`id` IS NULL
OR (`cgroup_civireport`.`id` IN (3, 7, 9, 11)))
ORDER BY contact_civireport.sort_name ASC
LIMIT 0, 50
```
The error is caused by the last where clause which is generated from buildPermissionClause(), which is trying to access 'contact_civireport' that only exists in the nested where/filter subquery.
The last 3 where clauses are not present for the full access user (ie buildPermissionsClause() return empty string).
Expected behaviour
----------------------------------------
The report should run correctly without the last where clause for limited access use.
Environment information
----------------------------------------
* __Browser: Firefox 108
* __CiviCRM: 5.57.0
* __PHP: 8.1
* __CMS: WordPress 6.1.1
* __Database: MariaDB 10.5
* __Web Server: Apache 2.4
Comments
----------------------------------------
The problem appears to be in civicrm/CRM/report/form.php.
From what I read ...
The last three where clauses in the above are generated by the function buildPermissionClause() which uses a BAO call to generate a user-specific clause for each table in the query where the user does not have full access.
This relies on function selectedTables() to generate the list of tables. The last part of selectedTables function searches all the filters an adds them to the list of tables, however for filters using $filterop 'in' or 'notin', the tables referenced by these clauses may not exist in the main query. It would seem likely that the selected tables list should not include tables where the filter uses these two constructs.
I am not sure apart from 'group' filter (which has specific handling), if any report filters would use 'in/not in (select...)' rather than 'in/out (value list)' so I am not sure the best way to fix this as I have only investigated my usage.
The solution may be to explicitly excluding contact group table (cgroup_civireport), or by updating to selecttables to exclude all 'in' and 'notin' filters as there is no guarantee the table exists in the main query for these types of filters.
Change in function selecttables (line ~4388) with
```
$this->_selectedTables[] = $tableName;"
```
to:
```
if ( ! in_array($filterOp, ["in","notin"] )) $this->_selectedTables[] = $tableName;
```
If the intent is to restrict access to acl enabled groups this would need the same clause added in function joinGroupTempTable(). There may be other places where this should apply.
(On a side issue as I am new here - in my sql query, civicrm_address_address_odd_street_number is not a column that is selectable - it seems to be preset as required and hidden for some reason and limited to a 'Walking Report' template. Having this would cause an unnecessary join to the address table if no address fields are being reported - only a little performance thing but should this be another problem or improvement request?).5.59.0https://lab.civicrm.org/dev/core/-/issues/4000only update `contributionRecur` when `templateContribution` is updated IF it ...2023-03-16T21:47:09Zeileenonly update `contributionRecur` when `templateContribution` is updated IF it is actively marked as suchIn https://github.com/civicrm/civicrm-core/pull/21473 code was added to update the Currency and Amount of the template contribution is updated. However, the code appears to me to be too aggressive and updating the amount or currency of A...In https://github.com/civicrm/civicrm-core/pull/21473 code was added to update the Currency and Amount of the template contribution is updated. However, the code appears to me to be too aggressive and updating the amount or currency of ANY contribution in the series causes it to update. There are good reasons to update individual contributions without any implicit template update.5.61.0https://lab.civicrm.org/dev/core/-/issues/4055Extension cannot found its own classes during install when opcache is enabled2023-03-16T13:12:50ZkainukExtension cannot found its own classes during install when opcache is enabledI start with the following configuration:
* PHP 8.1.7 _Using the docker image FROM php:8.1.7-apache-buster_
* OPCache enabled _standard configuration_
* Buildkit _CiviCRM install for Drupal 9_ see below:
````
civibuild create patch \
...I start with the following configuration:
* PHP 8.1.7 _Using the docker image FROM php:8.1.7-apache-buster_
* OPCache enabled _standard configuration_
* Buildkit _CiviCRM install for Drupal 9_ see below:
````
civibuild create patch \
--type drupal9-demo \
--civi-ver master \
--url http://patch.kainuk \
--cms-ver 9.5
````
Now, when I enable the Action Provider extension (just from the extension screen), the following error is thrown.
````
Error: Class "Civi\ActionProvider\Symfony\Component\DependencyInjection\DefinitionAdapter" not found in action_provider_civicrm_container() (line 15 of /buildkit/build/patch/web/sites/default/files/civicrm/ext/action-provider/action_provider.php)
````
`cv flush` lets the problem disappear, and for the Action Provider that is no problem because only code is installed (it does not change the database). However, other extensions can have more problems because the installation is interrupted, and possible incomplete.
The problem is, however, reproducible. When I disable the extension, and uninstall it, the error reappears after installing.
I did some duty time in the debugger and found the following code in the extension class loader (CRM_Extension_ClassLoader)
````php
$file = $this->getCacheFile();
if (file_exists($file)) {
$this->loader = require $file;
}
else {
$this->loader = $this->buildClassLoader();
$ser = serialize($this->loader);
file_put_contents($file,
sprintf("<?php\nreturn unserialize(%s);", var_export($ser, 1))
);
}
````
`$this->buildClassLoader()` is an expensive procedure, so after calculation the result is saved for reuse. When a new extension is installed, the saved file is removed because it does not contain the new extension configuration. A new classloader with all the extension stuff is calculated and an updated file is written.
For loading the class, the PHP construct `require` is used. This construct was designed for loading PHP code. The assumption is that PHP code does not change much, and OPCache used this assumption, to store the file in memory. The risk is here is that not the newly written configuration is used, but an old one from memory. On my configuration, I observed with the PHP debugger, that when the `hook_civicrm_container` the old classloader is loaded with require. Just put a breakpoint before the `$this->loader = require $file` line.
When the OPCache is disabled, the problem does not appear.5.59.0https://lab.civicrm.org/dev/core/-/issues/4124Past campaigns are not to be assigned via batch update/update contributions2023-03-15T06:27:08ZyashodhaPast campaigns are not to be assigned via batch update/update contributionsSteps to replicate :
- Create a campaign with end date in past
![campaign](/uploads/cefd27e11afe0c929803e28f58f67bbb/campaign.png)
- Create a profile configured for contribution fields (including the campaign field)
- Find Contribution...Steps to replicate :
- Create a campaign with end date in past
![campaign](/uploads/cefd27e11afe0c929803e28f58f67bbb/campaign.png)
- Create a profile configured for contribution fields (including the campaign field)
- Find Contributions, and select a few and use the created profile to update the campaign
- The campaign is NOT available in the drop down
![batch_update](/uploads/cfa7bee25d1cb7baa5bd1664b39e00e5/batch_update.png)
- On new/edit contributions, you are able to choose the past campaigns as well (which is the correct behavior).
![new_contribution](/uploads/82d4ddaaf86af46cab608ef26b333ece/new_contribution.png)yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/4160Convert html special chars to their ascii equivalent in ical file generation2023-03-07T07:26:05ZyashodhaConvert html special chars to their ascii equivalent in ical file generationWhen an event is set to public, the event registration receipt includes a link to download a .ics (ical) file of the event.
This ICS file is generated on the fly, and adds the description of the event to the description field in the .ics...When an event is set to public, the event registration receipt includes a link to download a .ics (ical) file of the event.
This ICS file is generated on the fly, and adds the description of the event to the description field in the .ics. All html tags are stripped from the text, however special chars that have been converted to their html code are not converted back to ASCII in the .ics.
We need to update the generation of the .ics file to include the conversion of html char code back to ASCII equivalent.
e.g.
- è ; > è
- " ; > "
- Â ; > Â
-   ; > [space]
(put the space before ; so that one can see the char code)
etc...yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/4070FlexMailer: Default Return Path not respected2023-02-27T13:47:09ZJonGoldFlexMailer: Default Return Path not respectedIn **Administer » CiviMail » Mail Accounts**, you can specify a default return path for your CiviMail mailings. This is important when, for instance, your bounce address's mailhost does not support VERP. This forces the `Return-Path` h...In **Administer » CiviMail » Mail Accounts**, you can specify a default return path for your CiviMail mailings. This is important when, for instance, your bounce address's mailhost does not support VERP. This forces the `Return-Path` header to a specific email address. The bounce processing code will find the `X-CiviMail-Bounce` header and process that instead of the bounce address.
However, this functionality was not ported to Flexmailer. You can see it at the very top of `CRM_Utils_Mail::send()` but not in `Civi\FlexMailer\Listener\BounceTracker::onCompose()`.
This causes the return-path to have the VERP address.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/667Deleting entities leaves obsolete EntityTag records2023-02-27T05:03:36ZjensschuppeDeleting entities leaves obsolete EntityTag records## Steps to reproduce
* Create a contact
* Assign a tag to the contact
* (Permantently) Delete the contact
## Expected result
The record in `civicrm_entity_tag` for the contact-tag relationship should have been removed.
## Actual res...## Steps to reproduce
* Create a contact
* Assign a tag to the contact
* (Permantently) Delete the contact
## Expected result
The record in `civicrm_entity_tag` for the contact-tag relationship should have been removed.
## Actual result
The record in `civicrm_entitiy_tag` for the contact-tag relationship retains and will never-ever be deleted.
## Technical background
Since a FK constraint `ON DELETE CASCADE` on the `civicrm_entity_tag` table for all possible entity ID tables is not possible, also due to the aggregated identification (`entity_table` and `entity_id`), this should be done in code when deleting any entity that may be assigned a tag.https://lab.civicrm.org/dev/core/-/issues/1125Custom fieldsets participants added twice2023-02-15T15:13:29ZwdecraeneCustom fieldsets participants added twiceWhen editing a participant, some custom fieldsets are added twice to the participant edit form. When saving, only the data in the second fieldset is saved (so users think nothing happened when they added the data in the first instance of...When editing a participant, some custom fieldsets are added twice to the participant edit form. When saving, only the data in the second fieldset is saved (so users think nothing happened when they added the data in the first instance of the fieldset).
This only happens with fieldsets linked to a specific event type.
In templates/CRM/Event/Form/Participant.tpl:
```smarty
CRM.buildCustomData( '{$customDataType}', null, null );
{if $eventID}
CRM.buildCustomData( '{$customDataType}', {$eventID}, {$eventNameCustomDataTypeID} );
{/if}
{if $eventTypeID}
CRM.buildCustomData( '{$customDataType}', {$eventTypeID}, {$eventTypeCustomDataTypeID} );
{/if}
```
* First buildCustomData : adds all custom field sets, except those linked to a specific event id
* Second buildCustomData : adds all custom field sets linked to a event id
* Third buildCustomData : adds all custom field sets linked to a specific event type id
So the combination of the first and third one is the cause of fieldsets added twice.
Solution? Altering template, changing arguments, fixing getTree() in CRM/Core/BAO/CustomGroup.php, ... ?
See also
* https://issues.civicrm.org/jira/browse/CRM-10983
* https://issues.civicrm.org/jira/browse/CRM-20633https://lab.civicrm.org/dev/core/-/issues/4080system workflow templates do not respect the selected pdf format anymore2023-02-15T05:27:10ZMariaVsystem workflow templates do not respect the selected pdf format anymoreI have noticed that system workflow templates no longer respect the formats.
pdf formats can be configured via communication > pdf formats.
In my case there are 2 pdf formats (and the default_invoice_pdf_format came together with an upd...I have noticed that system workflow templates no longer respect the formats.
pdf formats can be configured via communication > pdf formats.
In my case there are 2 pdf formats (and the default_invoice_pdf_format came together with an update probably a few months ago):
![grafik](/uploads/e7bce57400c26a7488c20f64a1d2b64d/grafik.png)
When I edit a system workflow template and choose - Standard - or DIN A4 it still chooses the default_invoice_pdf_format.
![grafik](/uploads/07affeecea4693e191b517e16700a854/grafik.png)
It is hardcoded in the code as you can see here:
https://lab.civicrm.org/dev/core/-/blob/master/CRM/Contribute/Form/Task/Invoice.php (line 236).
I do not know why this has been implemented. There might be a reason for it.
But it seems like a bug for me.
If I choose - Standard - in the system workflow templates I expect that this format will be choosed.
Such a change (without notice) could also led to major problems when sending invoices automatically.
Workaround for us for now was to change the default_invoice_pdf_format to the same values as our standard format.
(noticed on CiviCRM version 5.56.2)5.58.1https://lab.civicrm.org/dev/core/-/issues/4076Split up CRM_Utils_System_Base::theme2023-02-14T01:13:59ZherbdoolSplit up CRM_Utils_System_Base::themeSplit up this method into the different classes so it's specific per CMS.Split up this method into the different classes so it's specific per CMS.https://lab.civicrm.org/dev/core/-/issues/3923Search Kit does not populate Tag Name(s) when the condition is set to "Is One...2023-02-11T18:39:59ZbrienneSearch Kit does not populate Tag Name(s) when the condition is set to "Is One Of"Overview
----------------------------------------
When creating a search in Search Kit, the list of tag names to select does not populate when the Contact Tag entity is chosen and a condition of Tag Name "Is One Of"
Reproduction steps
-...Overview
----------------------------------------
When creating a search in Search Kit, the list of tag names to select does not populate when the Contact Tag entity is chosen and a condition of Tag Name "Is One Of"
Reproduction steps
----------------------------------------
1. Make sure that you have a Contact Tag with which to test (which can be set up via **Contacts >> Manage Tags >> Add Tag).
1. Go to **Search Kit** and click **New Search**
2. Make sure that the primary entity is *Contact*, then click **+Entity** and select **Contact Tags**
3. Under the *Contact Tags* entity, click **Add Condition** and select **Tag Name** and **Is One Of**
4. When you click in the select box to select the tag names, however, there are no drop down options nor auto-complete selects as you start typing.
Current behaviour
----------------------------------------
When you add a Contact Tag entity in Search Kit, and include a condition that uses "Is One Of" to limit the tag names, a list of those available tag names does not appear. While the features does still work if you type the full and exact name of the tag into the list, that shouldn't be necessary.
![Selection_076](/uploads/96c85e6ba9db93533b726f7bfa414c20/Selection_076.png)
*Note that in this photo, I am searching for a tag named "contact tag 1" that does not appear when typed into the text box, nor do any other options show before typing*
Expected behaviour
----------------------------------------
A drop down list of available tag names should appear when `Tag Name Is One Of` is set as the condition, and as you type in the text box the drop down list should filter accordingly.
Environment information
----------------------------------------
* __CiviCRM:__ _Master/5.55alpha1https://lab.civicrm.org/dev/core/-/issues/268PHP Warnings when 'name' of relationship types are duplicated2023-02-10T05:03:35ZJKingsnorthPHP Warnings when 'name' of relationship types are duplicatedThis is a tenuous edge-case, but:
Steps to recreate:
- Administer relationship types: https://dmaster.demo.civicrm.org/civicrm/admin/reltype?reset=1
- Add a new relationship type
- Enter 'Foo of' for both a-b and b-a labels, save
- Edit...This is a tenuous edge-case, but:
Steps to recreate:
- Administer relationship types: https://dmaster.demo.civicrm.org/civicrm/admin/reltype?reset=1
- Add a new relationship type
- Enter 'Foo of' for both a-b and b-a labels, save
- Edit the relationship, change the label for a-b to 'Foo not of'
- Save
- View a contact record, flush caches:
Warning: array_combine(): Both parameters should have an equal number of elements in CRM_Contact_BAO_Relationship::buildRelationshipTypeOptions() (line 2239 of .../civicrm/CRM/Contact/BAO/Relationship.php).
This is because the removeRelationshipTypeDuplicates method is removing the duplicate 'names' but not the duplicate 'labels', which creates an imbalance for the array_combine()
I'm pretty confused about why these methods are going to so much trouble to build and dedupe and list of relationship types anyway?
But the issue is, this means that CRM_Contact_BAO_Relationship::buildRelationshipTypeOptions() actually returns FALSE, when we're not on a form, because it couldn't combine the array. I haven't seen where this is causing a breakage yet, but it gives me the heebie-jeebies.
Related to https://github.com/civicrm/civicrm-core/pull/11853https://lab.civicrm.org/dev/core/-/issues/4028CMS Database Integration - Per-table prefixes are no longer supported2023-02-06T22:26:31ZolivierCMS Database Integration - Per-table prefixes are no longer supportedOverview
----------------------------------------
Since Drupal 8.2 per-table prefixes are no longer supported, so System Settings / CMS Database Integration menu should no longer display the 'Drypal 7' mapping table
Example use-case
---...Overview
----------------------------------------
Since Drupal 8.2 per-table prefixes are no longer supported, so System Settings / CMS Database Integration menu should no longer display the 'Drypal 7' mapping table
Example use-case
----------------------------------------
1. Click on **System Settings -> CMS Database Integration**.
Current behaviour
----------------------------------------
$databases['default']['default']['prefix']= [
'default' => 'drupal_',
'civicrm_acl' => '',
'civicrm_acl_cache' => '',
'civicrm_acl_contact_cache' => '',
'civicrm_acl_entity_role' => '',
'civicrm_action_log' => '',
'civicrm_action_mapping' => '',
'civicrm_action_schedule' => '',
'civicrm_activity' => '',
'civicrm_activity_contact' => '',
....
Proposed behaviour
----------------------------------------
$databases['civicrm']['default'] = [
'database' => 'xxxxxx',
'username' => 'xxxxxx',
'password' => 'set your db password',
'host' => '127.0.0.1',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
'namespace' => 'Drupal\Core\Database\Driver\mysql',
'collation' => 'utf8mb4_general_ci',
];
Comments
----------------------------------------
_Anything else you would like the reviewer to note._5.60.0