Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-12-15T15:29:01Zhttps://lab.civicrm.org/dev/core/-/issues/2607How to handle removed files2023-12-15T15:29:01Zaydunsaidan.saunders@squiffle.ukHow to handle removed filesSee [this SE question](https://civicrm.stackexchange.com/questions/39531/database-upgrade-script-failing-call-to-undefined-method-crm-upgrade-incrementa/39546#39546)
A file was removed from the installation tarball but [the Joomla upgr...See [this SE question](https://civicrm.stackexchange.com/questions/39531/database-upgrade-script-failing-call-to-undefined-method-crm-upgrade-incrementa/39546#39546)
A file was removed from the installation tarball but [the Joomla upgrade process](https://docs.civicrm.org/sysadmin/en/latest/upgrade/joomla/#install-the-extension) installs into existing directories meaning the 'removed' file was still present. In this case, it caused the upgrade to fail and will cause problems for any Joomla upgrades following the documented method.
More generally, the same problem applies to any files no longer included in releases.
Some possibilities:
- in the release notes say that files have been removed so don't follow the normal upgrade process
- add an upgrade step that removes old files (but note this problem occurred early in the upgrade process)
- change the upgrade instructions for Joomlahttps://lab.civicrm.org/dev/core/-/issues/4702Cannot clear country and state/province in contact summary address2023-12-13T20:24:15ZlarsssandergreenCannot clear country and state/province in contact summary address1. Open an address on a contact summary for editing.
2. Remove the country, which clears state/province (or remove state/province and then country).
3. Attempt to save.
Result: ![image](/uploads/4d69fc6535ffa916febbca831c393998/image.pn...1. Open an address on a contact summary for editing.
2. Remove the country, which clears state/province (or remove state/province and then country).
3. Attempt to save.
Result: ![image](/uploads/4d69fc6535ffa916febbca831c393998/image.png)
I think this a problem of the chain select not working correctly to deselect the option value, as it doesn't show a value, but the element still has a value when retrieved [here](https://github.com/civicrm/civicrm-core/blob/c911736f714c1bde28f6cdcc3b1bd0e1afbb894e/CRM/Core/Form.php#L2871). Maybe something between chain select and Select2?
If you save again, it does work.https://lab.civicrm.org/dev/core/-/issues/4231Contact Import will not accept State/Province outside the Default Country2023-12-13T20:08:15ZStoobContact Import will not accept State/Province outside the Default CountryTo reproduce on dmaster
1. within [Localization Settings](https://dmaster.demo.civicrm.org/civicrm/admin/setting/localization?reset=1)
a. set default country to United States
b. Ensure that for Available Countries box on the right i...To reproduce on dmaster
1. within [Localization Settings](https://dmaster.demo.civicrm.org/civicrm/admin/setting/localization?reset=1)
a. set default country to United States
b. Ensure that for Available Countries box on the right is blank in such that all countries are available for selection
2. go to Import Contacts
3. attempt import a file such as the one attached below that contains Country as a mapped column
4. note that Canada (and presumably another non-default) country is deemed invalid in the error report
[test-country.csv](/uploads/fb97a20935d51e0b9c72530fa12d663b/test-country.csv)
![import-errors-canada_province](/uploads/0b647875367fc261ff6a8fb134595d98/import-errors-canada_province.jpg)https://lab.civicrm.org/dev/core/-/issues/4859FormBuilder / Afform: Deleted options disappear when customizing options in a...2023-12-13T10:01:03ZJustin657FormBuilder / Afform: Deleted options disappear when customizing options in a date fieldOverview
----------------------------------------
In FormBuilder, when customizing the select options in a date field, the deleted options completely disappear.
![image](/uploads/30f5a2fbd00ec6dedb42319ee88b4a23/image.png)
Reproduction...Overview
----------------------------------------
In FormBuilder, when customizing the select options in a date field, the deleted options completely disappear.
![image](/uploads/30f5a2fbd00ec6dedb42319ee88b4a23/image.png)
Reproduction steps
----------------------------------------
Happening on my 5.67.3. I reproduced this on d10 demo site running 5.70.alpha1: https://d10-master.demo.civicrm.org/.
1. Add a **date field** (such as Contact Created Date) as a filter on a search form.
1. On the date field, click the Gear icon, then click **Customize options**.
1. In the list of options, find "Today" and **click the Trash icon** to remove it from the list. It moves to the bottom of the list under a section "Delete options."
1. Scroll to the top of the list and click the green **Done** button.
2. Save the form. (optional)
3. Now go to the Customize Options for that same date field, and search for the item "Today" which we deleted previously. It's gone. There is no list of "Deleted options" at the bottom.
Current behaviour
----------------------------------------
The "Deleted options" list disappears after saving the customized options for a date filter.
Expected behaviour
----------------------------------------
The list of "Deleted options" should always show if there are any options that have been removed.
![image](/uploads/7e94c9a534316fbe461972150cdb166a/image.png)colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/4854SearchKit: Update of multiselect custom field is working in non-obvious way, ...2023-12-13T09:58:58ZDetlev SieberSearchKit: Update of multiselect custom field is working in non-obvious way, which may result in data loss.## Overview
SearchKit allows to update the selected entities (especially: contacts). However, when updating a multiselect custom field, the old values are deleted when a new one is selected.
This might be how it was designed, but won'...## Overview
SearchKit allows to update the selected entities (especially: contacts). However, when updating a multiselect custom field, the old values are deleted when a new one is selected.
This might be how it was designed, but won't be (imho) the way the user would expect it to work: I would have expected to have this work such as "tagging" a contact - where one contact might get additional tags.
## Example use-case
1. Create a custom field for contacts as alphanumeric with multiselect, create at least two options.
2. Open a contact and check the multiselect with option 1.
3. Create a SearchKit where you can find the above contact.
4. Select the contact
5. Action: Update, check the multiselect with option 2
6. Result: Instead of adding option 2 to the multiselect custom field and leaving option 1 as is, option 1 is unchecked.
## Current behaviour
Instead of adding option 2 to the multiselect custom field and leaving option 1 as is, option 1 is unchecked.
This is not what a user might expect and will result in loss of data.
## Proposed behaviour
The value for option 1 should be kept and option 2 should be added.
## Comments
Perhaps it makes sense to add another action ("update add"), that will add new options.https://lab.civicrm.org/dev/core/-/issues/2991Proposal: rework name fields to make name entity2023-12-13T09:20:59ZAndie HuntProposal: rework name fields to make name entity## Overview
A recent [discussion with Guy](https://chat.civicrm.org/civicrm/pl/wwqowz635fbpifio7on4e8r8dw) and #2883, plus the ongoing mayhem of organization names and personal experience with a variety of great and terrible name handli...## Overview
A recent [discussion with Guy](https://chat.civicrm.org/civicrm/pl/wwqowz635fbpifio7on4e8r8dw) and #2883, plus the ongoing mayhem of organization names and personal experience with a variety of great and terrible name handling systems, have led me to think that the solution to names isn't creating more or better-labeled fields for more types of names but rather to make name its own entity akin to phone, email, address, website, etc.
Once name is an entity, each contact could have multiple names, one primary, but with a bunch of possible types:
- legal name
- trade name
- nickname
- former name
- name in other language/culture
- name in an external system
- common mistakes
There could also be a bunch of name renderings - ways the name is displayed or inserted:
- sort name
- display name
- name for greetings
- name for listings
The latter could generate the existing greetings and potentially others. In particular, I think there's a real gap for how you insert someone's name in emails where you don't want "Dear", "Hi", or any other greeting as such.
Finally, the duplicate matching process could look for any of the possible names, cutting down on duplicates.
## Example use-case
### Organization has multiple names
An organization has their corporate name, colloquial name, and the name of their main product. These all refer to the same contact, but employees might fill the current employer field as one of the various ways. As an admin, you want to avoid having to merge them all the time. As a routine user, you will want to know all the various ways an organization is termed. As a bookkeeper, you will want to send invoices, checks, receipts, etc. with the correct entity name.
In this case, there are three name entities:
| Organization name | Name type | Is primary |
| ------------------------ | --------- | ---------- |
| Widget Productions | General | true |
| Widget Productions, Inc. | Legal | false |
| WidgetPro | General | false |
| Widgetizer | Product | false |
There would be a couple of name renderings:
| Rendering type | Value |
| -------------- | ------------------------ |
| Display Name | Widget Productions |
| Sort Name | Widget Productions |
| Billing name | Widget Productions, Inc. |
### Minister has variety of prefixes
Someone's name is styled differently when it is listed versus when they are addressed. In this case, a minister is styled "The Reverend Sally Jones" or "Rev. Sally Jones" when listed somewhere but her salutation is "Ms. Jones".
I think she'd have only one entry as a name entity but several renderings:
| Prefix | Title | First name | Middle Name | Last name | Suffix | Name type | Is primary |
|--------|--------------|------------|-------------|-----------|--------|-----------|------------|
| Ms. | The Reverend | Sally | Lynn | Jones | *null* | General | true |
These values are going to depend upon your sitewide preferences and choices for this contact, but a reasonable default might produce the following:
| Rendering type | Value |
|-----------------|--------------------------|
| Display Name | Sally Lynn Jones |
| Sort Name | Jones, Sally Lynn |
| Addressee | The Reverend Sally Jones |
| Email greeting | Dear Sally |
| Postal greeting | Dear Ms. Jones |
| Short name | Sally |
### An organization has a different name in another language
This should be self-explanatory:
| Organization name | Name type | Is primary |
|--------------------------|-----------|------------|
| Médecins Sans Frontières | General | true |
| Doctors Without Borders | Localized | false |
| Rendering type | Value |
|----------------|--------------------------|
| Display Name | Médecins Sans Frontières |
| Sort Name | Médecins Sans Frontières |
| English Name | Doctors Without Borders |
### Someone's family name comes before their given name
I'm on the fence about how this should be handled, but all I know is that we currently handle it terribly (except maybe in translations that assume it?) One option might be to call the fields first, middle, and last names according to position (*Ai* being the family name, but it comes first):
| Prefix | Title | First name | Middle Name | Last name | Suffix | Name type | Is primary |
|--------|--------|------------|-------------|-----------|--------|-----------|------------|
| Mr. | *null* | Ai | *null* | Weiwei | *null* | General | true |
Alternatively, we could name the fields according to function:
| Prefix | Title | Given name | Additional name | Surname | Suffix | Name type | Is primary |
|--------|--------|------------|-----------------|---------|--------|-----------|------------|
| Mr. | *null* | Weiwei | *null* | Ai | *null* | General | true |
In either case, the renderings should be like
| Rendering type | Value |
|-----------------|---------------|
| Display Name | Ai Weiwei |
| Sort Name | Ai Weiwei |
| Addressee | Mr. Ai Weiwei |
| Email greeting | Dear Weiwei |
| Postal greeting | Dear Mr. Ai |
| Short name | Weiwei |
### Clinic needs to retain legal name for insurance billing
Someone's real name doesn't match their legal name, let alone their nickname. While most organizations wouldn't want or need to record a contact's dead name, a clinic might need it for billing correspondence. In this case, a patient is named Stephen, or Steve for short, but his legal name is Barbara.
| Prefix | Title | First name | Middle Name | Last name | Suffix | Name type | Is primary |
|--------|--------|------------|-------------|-----------|--------|-----------|------------|
| Mr. | *null* | Stephen | Wayne | Smith | *null* | General | true |
| Mr. | *null* | Steve | *null* | Smith | *null* | Nickname | false |
| *null* | *null* | Barbara | Wayne | Smith | *null* | Legal | false |
All of the name renderings would use the primary name or nickname, but the clinic could add an additional name rendering for how they refer to patients when billing to the insurance company.
| Rendering type | Value |
|-----------------|----------------------|
| Display Name | Stephen Wayne Smith |
| Sort Name | Smith, Stephen Wayne |
| Addressee | Mr. Stephen Smith |
| Email greeting | Dear Steve |
| Postal greeting | Dear Mr. Smith |
| Short name | Steve |
| Insurance name | Barbara Smith |
### Household name possibilities
The current household name field befuddles lots of people and, in my opinion, makes households less attractive to use. If a household can have multiple names, it might be more useful.
You might use a Household name field that has everyone all listed out, or you could use the Last name field.
| Household name | Last name | Name type | Is primary |
|-------------------------------------|----------------|-----------|------------|
| Katherine Williams and Kendra Green | *null* | General | true |
| *null* | Williams-Green | General | false |
| Rendering type | Value |
|-----------------|------------------------------------------|
| Display Name | Katherine Williams and Kendra Green |
| Sort Name | Katherine Williams and Kendra Green |
| Addressee | The Williams-Green Household |
| Email greeting | Dear Katherine Williams and Kendra Green |
| Postal greeting | Dear Katherine Williams and Kendra Green |
Or if everyone shares a last name, a single name entity could do it all:
| Given name | Surname | Name type | Is primary |
|---------------|---------|-----------|------------|
| Jack and Jill | Hill | General | true |
(If we don't feel the need to stick with the legacy name field names, there's really no reason that "Given name" couldn't replace Organization name and Household name, too, so this illustrates that.)
| Rendering type | Value |
|-----------------|-------------------------|
| Display Name | Jack and Jill Hill |
| Sort Name | Hill, Jack and Jill |
| Addressee | The Hill Household |
| Email greeting | Dear Jack and Jill |
| Postal greeting | Dear Jack and Jill Hill |
## Current behavior
Right now, each of these situations is pretty annoying. It might require a separate custom field, located away from the name fields. It might make it difficult to automatically and accurately generate greetings for many people.
Currently, there are fields in the `civicrm_contact` table for each name part, plus nickname and legal name.
The only name renderings are display name and sort name (set sitewide), and addressee and email and postal greetings (site-wide presets and defaults, with custom options).
There's no provision for additional renderings or any way to do fallbacks like pick a nickname and fall back to a first name.
There's a limited number of alternative names for a contact.
Alternative names are not compared against primary names when deduping.
## Proposed behavior
### Schema
The name fields would be gone from the contact entity, and a new `civicrm_contact_name` entity is added with one of the following sets of fields:
| Traditional | Radical |
|-------------------|-------------------|
| id | id |
| contact_id | contact_id |
| contact_name_type | contact_name_type |
| is_primary | is_primary |
| first_name | given_name |
| middle_name | additional_name |
| last_name | surname |
| prefix_id | prefix_id |
| suffix_id | suffix_id |
| formal_title | formal_title |
| household_name | |
| organization_name | |
The `contact_name_type` would have reserved options General, Nickname, Legal, and Localized, but more could be added.
A new `civicrm_contact_rendering` entity is added with the following set of fields:
| Fields |
|-------------------------------|
| id |
| contact_id |
| contact_rendering_type |
| contact_rendering_template_id |
| value |
The `contact_rendering_type` would have reserved options Display name, Sort name, Addressee, Email greeting, Postal greeting, and Short name, but more could be added.
The `contact_rendering_template_id` would be akin to the existing `addressee_id`, `email_greeting_id`, and `postal_greeting_id`, while `value` would be the actual generated or custom value.
### Upgrade
On upgrade, the `civicrm_contact_name` would be populated with the main name fields, with nickname and legal name as additional rows. On upgrade, the `civicrm_contact_rendering` would be populated with rows for each contact's display name, sort name, addressee, and greetings.
### Contact rendering templates
The contact rendering templates would have the option to specify a contact name type to provide the default value, with a fallback to the primary contact name. For example, email greeting might default to "Dear {nickname.first_name}", where it picks the value of `first_name` from a contact's name entry with the name type of Nickname, and if that isn't available, it picks the primary name entry's value for `first_name`.
### Dedupe
When matching contacts on any of the name fields, the dedupe process would compare against all rows in the `civicrm_contact_name` field, regardless of `contact_name_type` or if it's the primary name.
## Comments
This is all very early in the process: I think it's important to do something like this, but I don't have my heart on the specific mechanisms here. I think it would need to be evaluated for performance in a variety of ways, but I don't expect it would have too huge of an impact.https://lab.civicrm.org/dev/core/-/issues/2795PHP8: Use of error-suppression operator (@) behaves differently in error_hand...2023-12-12T19:51:20ZDaveDPHP8: Use of error-suppression operator (@) behaves differently in error_handler functions in php8Parking what's left in https://github.com/civicrm/civicrm-core/pull/21064 here for now since I've cleared out a bunch and am taking a break from it. The gist is that in php8 the error suppression operator (e.g. `@fopen('/nonexistent/file...Parking what's left in https://github.com/civicrm/civicrm-core/pull/21064 here for now since I've cleared out a bunch and am taking a break from it. The gist is that in php8 the error suppression operator (e.g. `@fopen('/nonexistent/file.txt', 'r')` works differently with respect to error_handler functions. In a stock install as of right now you won't notice any difference, just there will be more errors depending on what 3rd party/custom error_handlers you're using and may behave differently on different CMSs in future depending on how their error-handling may change.
### smarty default modifier
The smarty modifier `|default` is a tricky one because its whole purpose is to deal with the situation where the var might be missing, but the way smarty compiles it is something like `<?php $this->assign('to', ((is_array($_tmp=@$this->_tpl_vars['to'])) ? $this->_run_mod_handler('default', true, $_tmp, '_high') : smarty_modifier_default($_tmp, '_high'))); ?>` which uses the @ to try to silence the error. In addition to [templates/CRM/Core/DatePickerRange.tpl and templates/CRM/Core/DatePickerRangeWrapper.tpl](https://github.com/civicrm/civicrm-core/commit/f671f500b658aa772fedc682dbb320cf456bc904), the below are all instances of this. They could all be rewritten to not use the modifier, but the modifier itself is part of smarty so can't easily be prevented from being used in future.
* CRM_Core_InvokeTest::testInvokeDashboardForNonAdmin
* CRM/Contact/Page/DashboardDashlet.tpl - $communityMessages
* CRM_Core_SessionTest::testSetStatusWithTextOnly
* CRM/common/info.tpl
* CRM_Core_SessionTest::testSetStatusWithTitleOnly
* CRM/common/info.tpl
* CRM_Core_SessionTest::testSetStatusWithBoth
* CRM/common/info.tpl
### opendir
```
CRM_Utils_File::cleanDir
if ($dh = @opendir($target)) {
```
### unlink and mkdir
Various calls to `@unlink` and `@mkdir`
### httpclient
```
CRM_Utils_HttpClientTest::testFetchHttp_badOutFile
Exception: fopen(/ba/d/path/too/utput): Failed to open stream: No such file or directory
...\tests\phpunit\CiviTest\CiviUnitTestCase.php:253
...\CRM\Utils\HttpClient.php:79 <---- see here
...\tests\phpunit\CRM\Utils\HttpClientTest.php:77
...\tests\phpunit\CiviTest\CiviUnitTestCase.php:267
...\phpunit8:671
```
### angular changeset
Aside: The code in question here suggests phpQuery has its own debug setting which maybe could be turned on automatically in future if you have civi debugging enabled:
`$return = phpQuery::$debug === 2 ? this->document->loadHTML($markup) : @$this->document->loadHTML($markup);`
```
Civi\Angular\ChangeSetTest::testInsertAfter
Exception: DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity, line: 2
...\tests\phpunit\CiviTest\CiviUnitTestCase.php:253
...\vendor\electrolinux\phpquery\phpQuery\phpQuery\DOMDocumentWrapper.php:200
...\vendor\electrolinux\phpquery\phpQuery\phpQuery\DOMDocumentWrapper.php:542
...\vendor\electrolinux\phpquery\phpQuery\phpQuery\DOMDocumentWrapper.php:505
...\vendor\electrolinux\phpquery\phpQuery\phpQuery\DOMDocumentWrapper.php:469
...\vendor\electrolinux\phpquery\phpQuery\phpQuery\phpQueryObject.php:2066
...\vendor\electrolinux\phpquery\phpQuery\phpQuery\phpQueryObject.php:2010
...\tests\phpunit\Civi\Angular\ChangeSetTest.php:28
...\Civi\Angular\ChangeSet.php:59
...\Civi\Angular\ChangeSet.php:19
...\tests\phpunit\Civi\Angular\ChangeSetTest.php:39
...\tests\phpunit\CiviTest\CiviUnitTestCase.php:267
...\phpunit8:671
```
* not ok 103 - Error: Civi\Angular\PartialSyntaxTest::testConsistencyExamples with data set 6 `('<div ng-if="a && b"></div>', '<div ng-if="a && b"></div>')`
* not ok 104 - Error: Civi\Angular\PartialSyntaxTest::testAllPartials
* These are the same issue as the changeset tests.
### testing of deprecations
These deliberately test deprecations
* not ok 223 - Error: Civi\Payment\PropertyBagTest::testSetContactIDLegacyWay
* not ok 227 - Error: Civi\Payment\PropertyBagTest::testSetCustomProp
### testGetfieldsHasTitle
```
api_v3_SyntaxConformanceTest::testGetfieldsHasTitle with data set 32 ('Entity')
Failure in api call for Entity getactions: include_once(api/v3/batch_create.php): failed to open stream: No such file or directory
0 ...\api\v3\Entity.php(18): CiviUnitTestCase->letssee(2, 'include_once(ap...', '\path\to\...', 18, Array)
1 ...\api\v3\Entity.php(18): include_once()
2 ...\api\v3\utils.php(2461): _civicrm_api3_entity_deprecation(Array)
3 ...\api\v3\utils.php(251): _civicrm_api3_deprecation_check('Entity', Array)
4 ...\Civi\API\Provider\ReflectionProvider.php(108): civicrm_api3_create_success(Array, Array, 'Entity', 'getactions')
5 ...\Civi\API\Kernel.php(149): Civi\API\Provider\ReflectionProvider->invoke(Array)
6 ...\Civi\API\Kernel.php(81): Civi\API\Kernel->runRequest(Array)
7 ...\api\api.php(22): Civi\API\Kernel->runSafe('Entity', 'getactions', Array)
8 ...\Civi\Test\Api3TestTrait.php(292): civicrm_api('Entity', 'getactions', Array)
9 ...\Civi\Test\Api3TestTrait.php(173): CiviUnitTestCase->civicrm_api('Entity', 'getactions', Array)
10 ...\tests\phpunit\api\v3\SyntaxConformanceTest.php(1662): CiviUnitTestCase->callAPISuccess('Entity', 'getactions', Array)
11 phar://.../phpunit8/phpunit/Framework/TestCase.php(1213): api_v3_SyntaxConformanceTest->testGetfieldsHasTitle('Entity')
12 ...\tests\phpunit\CiviTest\CiviUnitTestCase.php(267): PHPUnit\Framework\TestCase->runTest()
13 phar://.../phpunit8/phpunit/Framework/TestCase.php(889): CiviUnitTestCase->runTest()
14 phar://.../phpunit8/phpunit/Framework/TestResult.php(577): PHPUnit\Framework\TestCase->runBare()
15 phar://.../phpunit8/phpunit/Framework/TestCase.php(663): PHPUnit\Framework\TestResult->run(Object(api_v3_SyntaxConformanceTest))
16 phar://.../phpunit8/phpunit/Framework/TestSuite.php(481): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
17 phar://.../phpunit8/phpunit/Framework/TestSuite.php(481): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
18 phar://.../phpunit8/phpunit/TextUI/TestRunner.php(462): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
19 phar://.../phpunit8/phpunit/TextUI/Command.php(129): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, Array, true)
20 phar://.../phpunit8/phpunit/TextUI/Command.php(101): PHPUnit\TextUI\Command->run(Array, true)
21 ...\phpunit8(671): PHPUnit\TextUI\Command::main()
22 {main}
Failed asserting that a integer is empty.
...\Civi\Test\Api3TestTrait.php:110
...\Civi\Test\Api3TestTrait.php:174
...\tests\phpunit\api\v3\SyntaxConformanceTest.php:1662
...\tests\phpunit\CiviTest\CiviUnitTestCase.php:267
...\phpunit8:671
```
### mailing testConcurrency
This doesn't run properly on windows even without the error_handler, and I don't feel like taking the time right now to deal with that:
not ok 1161 - Error: api_v3_JobProcessMailingTest::testConcurrency with data set #0 (array(20, 3, 10, 4, 1), array(2, 1), 4)https://lab.civicrm.org/dev/core/-/issues/4Link to css is hard-coded to the resource url link - problematic for server-s...2023-12-12T17:23:45ZeileenLink to css is hard-coded to the resource url link - problematic for server-side rendering with firewall or htaccess in playIn a few places in the code we add the print.css url with a section like this:
```
<head>
<title>{$pageTitle}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="{crmURL p="" a=1}" /><!--[if IE...In a few places in the code we add the print.css url with a section like this:
```
<head>
<title>{$pageTitle}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="{crmURL p="" a=1}" /><!--[if IE]></base><![endif]-->
<style type="text/css" media="screen, print">@import url({$config->userFrameworkResourceURL}css/print.css);</style>
</head>
```
That works fine from print.tpl & presumably the place in CiviCase where it is used but is problematic in CRM_Utils_PDF_Utils
When a pdf is being rendered internally & a firewall or htaccess is in play this css cannot be retrieved via http.
I also encountered someone struggling on chat the other day due to the print.css link written into a report instance being wallopped by the hard coded one when printing a CiviReport - going through that class.
@totten @bgm just trying to figure out the best way to handle this. I feel like in the pdf class it should try the file location FIRST if it does not appear to be customised - I think there might be some handy functions for that?
In the case of the report I think it's a bit trickier - we would need to figure out if a stylesheet is specified & only add one if not - or simply not add the <head> section. (I don't need to solve this but was thinking about it at the same time)
NB - this is the first issue I have logged in gitlab...https://lab.civicrm.org/dev/core/-/issues/4801[PHP 8.2] Access to an undefined property in CRM_Event_Badge_*2023-12-11T23:28:11Zjofranzfranz@systopia.de[PHP 8.2] Access to an undefined property in CRM_Event_Badge_*If I spot them correctly these are yet not covered by a unit test:
```
------ --------------------------------------------------------------------------------------
Line Logo.php ...If I spot them correctly these are yet not covered by a unit test:
```
------ --------------------------------------------------------------------------------------
Line Logo.php
------ --------------------------------------------------------------------------------------
17 Access to an undefined property CRM_Event_Badge_Logo::$format.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
31 Access to an undefined property CRM_Event_Badge_Logo::$lMarginLogo.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
32 Access to an undefined property CRM_Event_Badge_Logo::$tMarginName.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
40 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
41 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
43 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
51 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo::$border.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo::$lMarginLogo.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo::$lMarginLogo.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
54 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
54 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
56 Access to an undefined property CRM_Event_Badge_Logo::$border.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
56 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
56 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
58 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo::$border.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo::$tMarginName.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
60 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo::$border.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ --------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------
Line Logo5395.php
------ --------------------------------------------------------------------------------------
17 Access to an undefined property CRM_Event_Badge_Logo5395::$format.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
31 Access to an undefined property CRM_Event_Badge_Logo5395::$lMarginLogo.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
32 Access to an undefined property CRM_Event_Badge_Logo5395::$tMarginName.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
40 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
41 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
43 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
51 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo5395::$border.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo5395::$lMarginLogo.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo5395::$lMarginLogo.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
54 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
54 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
56 Access to an undefined property CRM_Event_Badge_Logo5395::$border.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
56 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
56 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
58 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo5395::$border.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo5395::$tMarginName.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
60 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo5395::$border.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ --------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------
Line NameTent.php
------ --------------------------------------------------------------------------------------
33 Access to an undefined property CRM_Event_Badge_NameTent::$lMargin.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
34 Access to an undefined property CRM_Event_Badge_NameTent::$tMargin.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
37 Access to an undefined property CRM_Event_Badge_NameTent::$format.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
55 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
62 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
62 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
65 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
65 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
66 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
67 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
68 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
68 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
69 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
70 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
78 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
79 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
79 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
79 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
79 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
81 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ --------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------
Line Simple.php
------ --------------------------------------------------------------------------------------
31 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
32 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
33 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
34 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
34 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
34 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
35 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
36 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
36 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
36 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
37 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
38 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
38 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
39 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
39 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
39 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
40 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
41 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
41 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
42 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
42 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
42 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ --------------------------------------------------------------------------------------
```
Related: #4072https://lab.civicrm.org/dev/joomla/-/issues/46KC Finder Not Working Under Joomla 42023-12-11T14:04:46ZcrusonwebKC Finder Not Working Under Joomla 4I have discovered that currently KC Finder will not work under Joomla 4. If you click the Browse Server button when inserting an image into the editor using CKEditor 4, CKEditor 5 or TinyMCE you get a 500 error. I have recreated this o...I have discovered that currently KC Finder will not work under Joomla 4. If you click the Browse Server button when inserting an image into the editor using CKEditor 4, CKEditor 5 or TinyMCE you get a 500 error. I have recreated this on multiple client sites running Joomla 4.2.7 and 4.2.8 and CiviCRM 5.57.0 and 5.58.1. I have also recreated it on the Joomla 4 demo site, although I had to turn off Mosaico to do so (since it is on by default).
I did some digging and the problem appears to rest in the authenticate_joomla function within /packages/kcfinder/integration/civicrm.php which is using JFactory::getApplication('administrator'). Under Joomla 4, getApplication doesn't work the same way it did under Joomla 3 so you get the non-descript 500 error screen. I updated the code with the following block and that worked in most of my cases:
```
if (version_compare(JVERSION, '4.0.0', 'lt')) {
$mainframe = JFactory::getApplication('administrator');
$mainframe->initialise();
$user_id = JFactory::getUser()->id;
} else {
// Boot the DI container.
$container = \Joomla\CMS\Factory::getContainer();
// Alias the session service key to the web session service.
$container->alias(\Joomla\Session\SessionInterface::class, 'session.web.site');
// Get the application.
$app = $container->get(\Joomla\CMS\Application\AdministratorApplication::class);
$user_id = Joomla\CMS\Factory::getUser()->id;
}
```
In all but one case this got KC Finder working, that last case I ended up with the folder and file fields both saying "Unknown Error" which I am thinking is due to something specific to that site and not Civi. However, I am not 100% confident my approach is the right one so I wanted to raise this as an issue so another set of eyes could confirm or correct my solution.Monish DebMonish Debhttps://lab.civicrm.org/dev/wordpress/-/issues/45Apply for listing in WordPress directory2023-12-11T12:27:09Zjoshjosh@civicrm.orgApply for listing in WordPress directoryIssue to track progress and outstanding issues related to listing CiviCRM in WP directory.Issue to track progress and outstanding issues related to listing CiviCRM in WP directory.https://lab.civicrm.org/dev/core/-/issues/3121The mysql session timezone that civi sets does not observe daylight saving (a...2023-12-09T05:04:30ZDaveDThe mysql session timezone that civi sets does not observe daylight saving (aka The Contact Logging civireport can show the wrong time)Pulling this out as a separate issue from #2122. It's also different from that issue in that here the value stored in the database is correct, just the display is wrong.
Mysql/mariadb often do not ship with named timezones populated (i....Pulling this out as a separate issue from #2122. It's also different from that issue in that here the value stored in the database is correct, just the display is wrong.
Mysql/mariadb often do not ship with named timezones populated (i.e. the mysql.time_zone table and related tables are empty). So when civi sets the mysql timezone for the session it calculates an offset instead (e.g. '+01:00'), based on "now". Offsets don't know about DST rules, so when it's converted for display based on that "now" offset, it will be wrong if "now" is on the other side of DST from the date that was stored in the database. Example:
Suppose log_civicrm_contact has a log_date with a value of March 8, 2022 12:34, created in timezone America/New_York. When viewed on March 9, 10, 11, etc it displays correctly.
When viewed on, say, March 16, civi will set the mysql timezone as '-04:00', which is different from what it was on March 8 ('-05:00'). Therefore when it displays, it shows 13:34 instead of 12:34.
This only affects timestamp columns. Datetime columns don't do any conversion based on session timezone.
The code where this happens is at https://github.com/civicrm/civicrm-core/blob/1754e1752eb8e516ec846a438005f6fcb55be247/CRM/Utils/System/Base.php#L760
Note also that getTimeZoneString() does different things for different CMSs, so you may experience the issue slightly differently depending on the install.https://lab.civicrm.org/dev/core/-/issues/4842Allow bulk-enabling extensions through UI2023-12-08T13:17:56ZnoahAllow bulk-enabling extensions through UICurrent behaviour
----------------------------------------
On Administer > System Settings > Extensions, only one extension can be acted on at a time.
Proposed behaviour
----------------------------------------
It should be possible to...Current behaviour
----------------------------------------
On Administer > System Settings > Extensions, only one extension can be acted on at a time.
Proposed behaviour
----------------------------------------
It should be possible to select multiple extensions and perform the same action (Install, Disable, Uninstall) on all of them.https://lab.civicrm.org/dev/core/-/issues/4788Inherited membership removed when relationship ended, but gets added back whe...2023-12-08T08:45:02Zrita_compucorpInherited membership removed when relationship ended, but gets added back when second relationship has endedSteps to reproduce:
1. Create a membership type that has 2 relationships enabled to inherit (eg. employer of, volunteer)
2. Create an organisation with the above membership
3. Create an individual
4. Create both of the relationships be...Steps to reproduce:
1. Create a membership type that has 2 relationships enabled to inherit (eg. employer of, volunteer)
2. Create an organisation with the above membership
3. Create an individual
4. Create both of the relationships between the individual and the organisation --> inherited relationship is created for individual
5. Then edit one of the relationships, and add an end date in the past --> relationship gets inactive which is correct, but **the inherited membership gets removed which is incorrect**
6. Then edit the second relationship, add an end date in the past and save --> relationship gets inactive which is correct, but **the inherited membership will be added back which is incorrect** as at this point there is no qualifying active relationship
This issue was reported by one of our clients who are using multiple relationship types with their membership types. See video grab from dmaster site https://nimb.ws/cIRBGjhttps://lab.civicrm.org/dev/core/-/issues/4779Contribution page receipt does not include on behalf of profile information w...2023-12-08T08:43:34ZalicefruminContribution page receipt does not include on behalf of profile information when a contact contributes on behalf of an organization that they are not an employee ofOverview
----------------------------------------
This is a really really edge case situation. You can configure a contribution page so that you can contribute on behalf of an organization. The list of organizations you can select from ...Overview
----------------------------------------
This is a really really edge case situation. You can configure a contribution page so that you can contribute on behalf of an organization. The list of organizations you can select from is all the organizations you have a permissioned relationship to (regardless of what the relationship type is), however the receipt will not include the on behalf of profile information unless the relationship type is "Employee of". This is an issue for a client of ours that has a membership type that is inherited thru a custom relationship type.
I think that the problem is this code: https://github.com/civicrm/civicrm-core/blob/5.67/CRM/Contribute/BAO/Contribution.php#L2306
I have a patch that deals with this for our clients specific issue but Im not sure its the best fit for core.
Reproduction steps
----------------------------------------
1. Create a Contribution Page where:
- on behalf of is turned on
- receipts are turned on
- A payment processor is available to use (the problem cannot be recreated if you do a pending pay later contribution)
2. For your user, create a relationship:
- to an organization
- of any relationship type besides "Employee of"
- that has view/update permissions in both directions.
- If your user has an employer make sure you are selecting an organization that is different than your employer.
3. Go to the contribution page on the frond end
4. In the on behalf of section, select the organization you have a relationship to that is not thru an "Employee of" relationship (that you created in step 2)
5. Make a "live" payment (you can use the dummy payment processor, just don't use the invoice option)
Current behaviour
----------------------------------------
The receipt does not include the on behalf of profile information.
Expected behaviour
----------------------------------------
The receipt should include the on behalf of profile information.
Environment information
----------------------------------------
I am able to replicate this in civicrm 5.67https://lab.civicrm.org/dev/core/-/issues/4850Recreate unit tests on core screens that are converted to search displays2023-12-08T08:42:44ZDaveDRecreate unit tests on core screens that are converted to search displaysCompanion to https://lab.civicrm.org/dev/core/-/issues/3912
Here's a start, found via https://github.com/civicrm/civicrm-core/pull/28558
- [ ] CRM_Activity_Form_SearchTest.testSearch
- [ ] CRM_Admin_Form_PaymentProcessorTest.testUpdate...Companion to https://lab.civicrm.org/dev/core/-/issues/3912
Here's a start, found via https://github.com/civicrm/civicrm-core/pull/28558
- [ ] CRM_Activity_Form_SearchTest.testSearch
- [ ] CRM_Admin_Form_PaymentProcessorTest.testUpdateAcceptCreditCard
- [ ] CRM_Core_FormTest.testOpeningForms with data set "Location Type"
- [ ] CRM_Core_FormTest.testOpeningForms with data set "Message Templates"
- [ ] CRM_Core_FormTest.testOpeningForms with data set "Scheduled Jobs"
- [ ] CRM_Core_OptionGroupTest.testSanitizeFromEmailAddress with data set 0
- [ ] CRM_Core_OptionGroupTest.testSanitizeFromEmailAddress with data set 1
- [ ] CRM_Core_OptionGroupTest.testSanitizeFromEmailAddress with data set 2https://lab.civicrm.org/dev/wordpress/-/issues/3Create CiviCRM Block for new Gutenberg Editor2023-12-07T22:18:11ZkcristianoCreate CiviCRM Block for new Gutenberg EditorWP is introducing a new editor in v 5.0 - https://github.com/WordPress/gutenberg
As of this post: https://make.wordpress.org/core/2018/07/06/whats-new-in-gutenberg-6th-july/ Gutenberg has been declared to be at the MVP stage and a me...WP is introducing a new editor in v 5.0 - https://github.com/WordPress/gutenberg
As of this post: https://make.wordpress.org/core/2018/07/06/whats-new-in-gutenberg-6th-july/ Gutenberg has been declared to be at the MVP stage and a merge proposal will be submitted "soon". The current target date is "august", but that can move.
Based on the above, it would be a good time to explore what will be needed to convert our CiviCRM shortcode button to a Gutenberg block.https://lab.civicrm.org/dev/core/-/issues/4838APIv3 call to GroupContact doesn't complete when using IN2023-12-07T14:24:57ZbrienneAPIv3 call to GroupContact doesn't complete when using INOverview
----------------------------------------
There is a bug within APIv3 when making a 'GET' call to 'GroupContact', where the Contact ID is set and the Group ID uses 'IN'.
Reproduction steps
--------------------------------------...Overview
----------------------------------------
There is a bug within APIv3 when making a 'GET' call to 'GroupContact', where the Contact ID is set and the Group ID uses 'IN'.
Reproduction steps
----------------------------------------
1. Click on **Support -> Developer -> API Explorer v3**.
1. Set *Entity* to **GroupContact** and *Action* to **get**
1. Add two parameters:
* Group ID IN (select at least one group)
* Contact ID = (select a contact)
1. Click **Execute**
1. Note that nothing is returned, only a spinning/loading wheel
Current behaviour
----------------------------------------
A call to APIv3 where the Contact ID is set and the Group ID uses IN does not finish executing. This seems to be happening because the validation doesn't support an array and fails in php 8.1.
```php
$result = civicrm_api3('GroupContact', 'get', [
'sequential' => 1,
'group_id' => ['IN' => ["Administrators"]],
'contact_id' => 203,
]);
```
Expected behaviour
----------------------------------------
The API call should be able to handle an arry and finish execution.
Environment information
----------------------------------------
* __CiviCRM:__ 5.67.0, 5.69.alpha1https://lab.civicrm.org/dev/core/-/issues/4837Saving a system workflow message template without making any changes still ma...2023-12-07T09:11:16ZDaveDSaving a system workflow message template without making any changes still makes civi think you changed itIt seems like it trims it so a trailing newline gets cut off, which technically is a change but not intentional.
I'm thinking the templates themselves shouldn't have trailing newlines. Or the comparison could take trimming into account.It seems like it trims it so a trailing newline gets cut off, which technically is a change but not intentional.
I'm thinking the templates themselves shouldn't have trailing newlines. Or the comparison could take trimming into account.https://lab.civicrm.org/dev/core/-/issues/3130Lack of hooks to detect when an Attachment is deleted2023-12-07T08:27:58ZhaystackLack of hooks to detect when an Attachment is deletedOverview
----------------------------------------
At present, when an Attachment is deleted via the CiviCRM UI (e.g. on "Edit Activity" dialogs/screens) only two CiviCRM hooks fire: the `civi.dao.preDelete` and `civi.dao.postDelete` Symf...Overview
----------------------------------------
At present, when an Attachment is deleted via the CiviCRM UI (e.g. on "Edit Activity" dialogs/screens) only two CiviCRM hooks fire: the `civi.dao.preDelete` and `civi.dao.postDelete` Symfony events triggered by `CRM_Core_BAO_EntityTag::del()`. All other deletions are done via direct SQL queries.
It would be great to:
* Have `hook_civicrm_pre` and `hook_civicrm_post` fire
* Have some way of retrieving the Attachment data prior to deletion
Reproduction steps
----------------------------------------
1. Set up CiviCRM to log all hooks
1. Click the "bin/trash" icon next to an Attachment (as per the screenshot below)
1. Inspect logged callbacks
![attachments-accordion](/uploads/9abded9e0e7f9cc602213b8b20de345d/attachments-accordion.png)
Current behaviour
----------------------------------------
The following callbacks are the only ones that will be seen (data trimmed for concision)
#### `civi.dao.preDelete`
```
[event] => Civi\Core\DAO\Event\PreDelete Object
(
[object] => CRM_Core_BAO_EntityTag Object
(
[id] =>
[entity_table] => civicrm_file
[entity_id] => 6
[tag_id] =>
)
)
```
#### `civi.dao.postDelete`
```
[event] => Civi\Core\DAO\Event\PostDelete Object
(
[object] => CRM_Core_BAO_EntityTag Object
(
[id] =>
[entity_table] => civicrm_file
[entity_id] => 6
[tag_id] =>
)
[result] => 0
)
```
It is possible to use the `entity_id` to retrieve the "File" data via the CiviCRM API. However, because of the order of deletions in [the `deleteEntityFile()` method](https://github.com/civicrm/civicrm-core/blob/6769e8bf8556701b81f914d30fc1bb913f8ed2ce/CRM/Core/BAO/File.php#L250), it is _not_ possible to retrieve the compound "Attachment" data via the API (because the "Entity File" data has already been deleted) and it is therefore not possible to find out which Entity/Entities the File was attached to.
It should also be noted that when the "Delete All Attachment(s)" checkbox is used, the `civi.dao.preDelete` and `civi.dao.postDelete` Symfony events fire *before* `hook_civicrm_pre` is fired for the Activity. To me, it would make more sense for `hook_civicrm_pre` to fire *before* the File deletion process is initiated so that `Activity.pre` and `Activity.post` "wrap" the entire process.
Expected behaviour
----------------------------------------
I would expect to be able to receive callbacks from `hook_civicrm_pre` and `hook_civicrm_post`, where `$op = "delete"` and `$objectName = "File"` along with some more contextual data about the "File" and the "Attachment" being deleted.
Comments
----------------------------------------
I'm going to open a PR that addresses the issue of retrieving the "Attachment" data via the API when using the Symfony hook, since that's pretty straightforward.
I'd appreciate any guidance from those more familiar with this class on the most sensible place(s) to add hooks during the deletion process - or whether deletion should more properly be done via `BAO` objects instead of direct queries.