Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-04-05T14:36:26Zhttps://lab.civicrm.org/dev/core/-/issues/4214Too many CiviCRM custom fields breaks logging resulting in mysterious errors2023-04-05T14:36:26Zluke.stewartToo many CiviCRM custom fields breaks logging resulting in mysterious errorsOverview
----------------------------------------
If for some strange reason you decide to create **_a lot_** of custom fields - and use detailed logging you can break stuff rather badly without getting a nice warning.
Reproduction ...Overview
----------------------------------------
If for some strange reason you decide to create **_a lot_** of custom fields - and use detailed logging you can break stuff rather badly without getting a nice warning.
Reproduction steps
----------------------------------------
1. Turn on detailed logging
1. Create yourself a custom field group - or use one you've prepared earlier.
1. Add a lot of text fields with max length. This probably depends on database settings - for mariadb what your database innodb_page_size variable is set to.
1. At some point you will be able to add new fields to the custom group - but the row size will be exceeded when these fields are added to the log_custom_group_value_thing_table.
1. From this point on any operation attempting to write data into that table will result in errors when Detail logging is turned on. However due to the joys of detailed logging it will say something like field X doesn't exist - however it does - but field Y will exist on that table but not on the log_table.
1. You will possibly notice a small error message showing when turning detailed logging on.
Current behaviour
----------------------------------------
You get errors like this when turning
```
[nativecode=1118 ** Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs]
```
Expected behaviour
----------------------------------------
You should probably not be able to create custom fields after a certain point. however perhaps more to the point - if there is an error turning detailed logging on and it relates to a schema mismatch then perhaps it would be better to - turn the detailed logging back off - return a Computer says no message - along with a list of log tables that don't match what they should.https://lab.civicrm.org/dev/core/-/issues/4213Make frontend_title consistently required and use it in all front end present...2023-04-04T08:46:17ZeileenMake frontend_title consistently required and use it in all front end presentationsWhen we added frontend_title it was an optional override for title, which would fall back to title but this has been confusing to manage and means things like the token `{group.frontend_title}` token don't work and usage is inconsistent....When we added frontend_title it was an optional override for title, which would fall back to title but this has been confusing to manage and means things like the token `{group.frontend_title}` token don't work and usage is inconsistent.
The affected entities are
- Contribution Page
- Group
- Profile (UFGroup)
- PaymentProcessor - but this already follows the schema in this proposal
We need to get to a more consistent space. Front end title is currently effectively required (as it falls back to title) & holds the contents of title, or frontend title so the scope of this change is to make that the case at the DB / form level and then fix front end usages to display the front end title (only).
This addresses the inconsistencies and means that by requiring people to enter front end title they will be prompted to think about what the public see when creating the title.
There are some requests to permit title to be blank - the difficulties around handling this are what has caused us not to embark on addressing the consistencies to date. However, part of that request is better addressed through Wordpress - ie https://lab.civicrm.org/dev/core/-/issues/4212 and the other articulated reason is to ensure people are not accidentally exposing inappropriate names (which making it required will do).
There might be other reasons that an 'allow blank' feature might make sense - but I think we need to separate that feature request from our need to get to a sane place with frontend titles - so the plan is for 5.61 we will
1) make all frontend title fields required at the DB level & form level
2) do a db upgrade to populate these fields with the values in title
3) ensure that front end references always just display frontend_title.https://lab.civicrm.org/dev/core/-/issues/4212Wordpress - allow suppressing CiviCRM title in profiles / contribution pages?...2023-04-04T08:45:49ZeileenWordpress - allow suppressing CiviCRM title in profiles / contribution pages? when displaying via short codeThere is a problem @justinfreeman has been reporting whereby you wind up with double-titles because the title is not optional on the CiviCRM or the Wordpress level.
I think the right fix for this is to handle in within the short code co...There is a problem @justinfreeman has been reporting whereby you wind up with double-titles because the title is not optional on the CiviCRM or the Wordpress level.
I think the right fix for this is to handle in within the short code configuration - do you have any thoughts on how to do that @kcristiano @haystack ?
![image](/uploads/e40555c9a25d0948ca0dc5f8d60daa1f/image.png)
![image](/uploads/0a1231cdc2be7d04feeb0801163b0d38/image.png)https://lab.civicrm.org/dev/core/-/issues/4210Only possible to add A-B relationships types or B-A relationship types (not b...2023-04-04T08:45:11ZScottMasonOnly possible to add A-B relationships types or B-A relationship types (not both) to new contact using Form BuilderWhen using Form Builder to create a new contact and then add relationships to that contact using a single form it appears that it is only possible to select to add A-B relationship or B-A relationships but not both. For example, if creat...When using Form Builder to create a new contact and then add relationships to that contact using a single form it appears that it is only possible to select to add A-B relationship or B-A relationships but not both. For example, if creating a new Individual the form can be configured to allow users to add 'Child of' relationships or 'Parent of' relationships but not both.
1. Create a new contact form using form builder
2. Add a relationship fieldset
3. Set as a default value either Contact A or Contact B as 'Organisation1' (i.e. the new contact being created) - see image below.
![image](/uploads/49caec4139d87f8e17878e4785fabec3/image.png)
4. Quite understandably if Organisation1 is set as 'Contact A' only A-B relationship types can be selected in the form and if Organisation1 is set to 'Contact B' only B-A relationship types can be selected. For example, in our case if adding a new company it is possible to add 'Parent of' relationships to the new company but not 'Subsidiary of' relationships.
![image](/uploads/bf24ad54c5fff2ff4c3011d7c8900ca4/image.png)
This is logical given the way the form has been configured, so I am not sure if this is necessarily a 'bug' but I wondered if there was a way of configuring the form so that I user can select both A-B and B-A relationship types when adding relationships using form builder?
Thanks
Scotthttps://lab.civicrm.org/dev/core/-/issues/4209Form builder does not load activity 'details' in pop-up edit mode2023-04-04T08:44:40ZScottMasonForm builder does not load activity 'details' in pop-up edit mode1. Create a form builder for an activity including the 'details' field
2. Add an activity using the form
3. Create a SK display for activities with a menu item 'edit' configured to load the form in popup mode
4. Select edit from the SK d...1. Create a form builder for an activity including the 'details' field
2. Add an activity using the form
3. Create a SK display for activities with a menu item 'edit' configured to load the form in popup mode
4. Select edit from the SK display - the form is loaded with all data except for the details field which is blank.
Strangely when tested on dmaster demo the popup appears to load the details data on the first load but not any subsquent attempts.
![image](/uploads/9149c476f4563d457425512dd024398a/image.png)https://lab.civicrm.org/dev/core/-/issues/4208Generating invoices generates an error with version >= 0.12.6 of wkhtmltopdf.2023-04-04T08:44:14ZeileenGenerating invoices generates an error with version >= 0.12.6 of wkhtmltopdf.Full detail in https://github.com/civicrm/civicrm-core/pull/23055 - am creating this to track that issue as the patch is not mergeable as isFull detail in https://github.com/civicrm/civicrm-core/pull/23055 - am creating this to track that issue as the patch is not mergeable as ishttps://lab.civicrm.org/dev/core/-/issues/4203add end date to petition2023-03-27T06:52:21Zjamieadd end date to petitionOverview
----------------------------------------
This proposed feature would add a new field to petitions called: End date. If someone tries to sign a petition that has an end date in the past, they would get a friendly error warning t...Overview
----------------------------------------
This proposed feature would add a new field to petitions called: End date. If someone tries to sign a petition that has an end date in the past, they would get a friendly error warning them that the petition is no longer active.
Current behaviour
----------------------------------------
Now, we can create petitions and manually disable them. However there are two problems:
1. If you disable a petition it no longer shows up in advanced search so you can no longer find signatories.
2. It's easy to forget to disable a petition. That means these potentially spam-collecting forms can live on for too long
3.
Proposed behaviour
----------------------------------------
By adding an end date when you create the petition, you can set it up and forget about it.
Comments
----------------------------------------
I'm open to taking a crack at implementing, but wanted to first get feedback to see if this is the best way to go about it or if there are any potential pitfalls.https://lab.civicrm.org/dev/core/-/issues/4199SearchKit: DB Error: no such field a.total_amount when adding Tax Exclusive A...2023-03-24T03:46:42ZherbdoolSearchKit: DB Error: no such field a.total_amount when adding Tax Exclusive Amount and Balance (starting with Line Items : Contributions)Overview
----------------------------------------
There's an "Unknown column `a.total_amount` when trying to add these fields onto a SearchKit search that starts with `Line Items` and with `Contributions`:
Line Item Contribution: Tax Ex...Overview
----------------------------------------
There's an "Unknown column `a.total_amount` when trying to add these fields onto a SearchKit search that starts with `Line Items` and with `Contributions`:
Line Item Contribution: Tax Exclusive Amount
Line Item Contribution: Balance
**Note this only happens when starting with Line Items and *not* when starting with Contributions (and optionally adding Line Items).**
It's adding a field like this:
```
COALESCE(a.total_amount, 0) - COALESCE(a.tax_amount, 0) AS `LineItem_Contribution_contribution_id_01.tax_exclusive_amount`
```
and like this:
```
a.total_amount - COALESCE((SELECT SUM(ft.total_amount) FROM civicrm_financial_trxn ft
INNER JOIN civicrm_entity_financial_trxn eft ON (eft.financial_trxn_id = ft.id AND eft.entity_table = 'civicrm_contribution')
WHERE eft.entity_id = a.id AND ft.is_payment = 1 AND ft.status_id IN (1,7)), 0) AS `LineItem_Contribution_contribution_id_01.balance_amount`
```
where `a` is `civicrm_line_item`. It's assuming, I think, that the first table is `civicrm_contributions`.
Current behaviour
----------------------------------------
_What happens currently. Please provide error messages, screenshots or gifs ([LICEcap](http://www.cockos.com/licecap/), [SilentCast](https://github.com/colinkeenan/silentcast)) where appropriate._
Environment information
----------------------------------------
* __CiviCRM:__ 5.58.1 (but I looked through the release notes and I don't think it was fixed in 5.59.x)https://lab.civicrm.org/dev/core/-/issues/4198Access to undeclared variable in merge code2023-03-23T14:06:20ZRichAccess to undeclared variable in merge codeAt:
https://lab.civicrm.org/dev/core/-/blob/96d550c70dd1f406851895ddfe236fbfd718ab77/CRM/Dedupe/Merger.php#L1376
we reference `$migrationData` which is not declared. I have a hunch it should be `$migrationInfo`?
Ping @eileenAt:
https://lab.civicrm.org/dev/core/-/blob/96d550c70dd1f406851895ddfe236fbfd718ab77/CRM/Dedupe/Merger.php#L1376
we reference `$migrationData` which is not declared. I have a hunch it should be `$migrationInfo`?
Ping @eileenhttps://lab.civicrm.org/dev/core/-/issues/4196hook_civicrm_links - are the docs wrong or the code?2023-03-23T20:11:09ZJonGoldhook_civicrm_links - are the docs wrong or the code?The docs for `hook_civicrm_links` provides this signature:
```php
hook_civicrm_links(string $op, string $objectName, int $objectID, array &$links, int &$mask, array &$values)
```
However, the type hinting isn't always correct. I've fo...The docs for `hook_civicrm_links` provides this signature:
```php
hook_civicrm_links(string $op, string $objectName, int $objectID, array &$links, int &$mask, array &$values)
```
However, the type hinting isn't always correct. I've found:
* PCP pages pass `NULL` for `$mask`.
* The extensions page passes a string for `$objectID`.
Should we change the docs or the code?https://lab.civicrm.org/dev/core/-/issues/4195Cannot reach custom fields on Contributions from SearchKit2023-03-23T14:29:20ZRichCannot reach custom fields on Contributions from SearchKitNot sure if this is a bug or a feature request. Is it a bug if SK can't do what advanced search can?
Custom fields (1-1) on Contributions can be used in Api4, but are not reachable in SK; the fields are not listed in the "With/on" field...Not sure if this is a bug or a feature request. Is it a bug if SK can't do what advanced search can?
Custom fields (1-1) on Contributions can be used in Api4, but are not reachable in SK; the fields are not listed in the "With/on" fieldsets, and I couldn't find a CustomValues or such entity to add as a second "With".https://lab.civicrm.org/dev/core/-/issues/4194Proposal - remove some fields from dedupe field options2023-03-27T02:42:05ZeileenProposal - remove some fields from dedupe field optionsWhen creating dedupe rules there are some fields in the drop down that don't make sense to me
![image](/uploads/87e8fe511a5e795ce362dd7027705505/image.png)
Specifically
**Irrational (technical term)**
(if these are present the dedupe...When creating dedupe rules there are some fields in the drop down that don't make sense to me
![image](/uploads/87e8fe511a5e795ce362dd7027705505/image.png)
Specifically
**Irrational (technical term)**
(if these are present the dedupe rule functionality won't apply)
- 'id' => 'Contact ID',
- 'external_identifier' => 'External Identifier',
**Dumb (technical term)**
- Contact.is_deceased
- 'addressee_id' => 'Addressee',
- 'addressee_custom' => 'Addressee Custom',
- 'do_not_email' => 'Do Not Email',
- 'do_not_mail' => 'Do Not Mail',
- 'do_not_phone' => 'Do Not Phone',
- 'do_not_sms' => 'Do Not Sms',
- 'do_not_trade' => 'Do Not Trade',
- 'email_greeting_id' => 'Email Greeting',
- 'email_greeting_custom' => 'Email Greeting Custom',
- 'external_identifier' => 'External Identifier',
- 'image_URL' => 'Image Url',
- 'is_opt_out' => 'No Bulk Emails (User Opt Out)',
- 'postal_greeting_id' => 'Postal Greeting',
- 'postal_greeting_custom' => 'Postal Greeting Custom',
- 'preferred_communication_method' => 'Preferred Communication Method',
- 'communication_style_id' => 'Communication Style',
- 'signature_html' => 'Signature Html',
- 'signature_text' => 'Signature Text',
**Marginal (laymans' term) **
- 'geo_code_1' => 'Latitude',
- 'geo_code_2' => 'Longitude',
- 'master_id' => 'Master Address ID',
<details>
<summary>Full list - excluding custom fields</summary>
```
/**
* Get the list of supportedFields to test against.
*
* This is a statically maintained (in this test list).
*
*/
public function getSupportedFields() {
return [
'civicrm_address' =>
[
'name' => 'Address Name',
'city' => 'City',
'country_id' => 'Country',
'county_id' => 'County',
'geo_code_1' => 'Latitude',
'geo_code_2' => 'Longitude',
'master_id' => 'Master Address ID',
'postal_code' => 'Postal Code',
'postal_code_suffix' => 'Postal Code Suffix',
'state_province_id' => 'State',
'street_address' => 'Street Address',
'supplemental_address_1' => 'Supplemental Address 1',
'supplemental_address_2' => 'Supplemental Address 2',
'supplemental_address_3' => 'Supplemental Address 3',
],
'civicrm_contact' =>
[
'addressee_id' => 'Addressee',
'addressee_custom' => 'Addressee Custom',
'id' => 'Contact ID',
'source' => 'Contact Source',
'contact_sub_type' => 'Contact Subtype',
'do_not_email' => 'Do Not Email',
'do_not_mail' => 'Do Not Mail',
'do_not_phone' => 'Do Not Phone',
'do_not_sms' => 'Do Not Sms',
'do_not_trade' => 'Do Not Trade',
'email_greeting_id' => 'Email Greeting',
'email_greeting_custom' => 'Email Greeting Custom',
'external_identifier' => 'External Identifier',
'image_URL' => 'Image Url',
'legal_identifier' => 'Legal Identifier',
'legal_name' => 'Legal Name',
'nick_name' => 'Nickname',
'is_opt_out' => 'No Bulk Emails (User Opt Out)',
'organization_name' => 'Organization Name',
'postal_greeting_id' => 'Postal Greeting',
'postal_greeting_custom' => 'Postal Greeting Custom',
'preferred_communication_method' => 'Preferred Communication Method',
'preferred_language' => 'Preferred Language',
'sic_code' => 'Sic Code',
'user_unique_id' => 'Unique ID (OpenID)',
'sort_name' => 'Sort Name',
'communication_style_id' => 'Communication Style',
],
'civicrm_email' =>
[
'email' => 'Email',
'signature_html' => 'Signature Html',
'signature_text' => 'Signature Text',
],
'civicrm_im' =>
[
'name' => 'IM Screen Name',
],
'civicrm_note' =>
[
'note' => 'Note',
],
'civicrm_openid' =>
[
'openid' => 'OpenID',
],
'civicrm_phone' =>
[
'phone_numeric' => 'Phone',
'phone_ext' => 'Phone Extension',
],
'civicrm_website' =>
[
'url' => 'Website',
],
];
}
```
</details>
'sic_code' => 'Sic Code',
'user_unique_id' => 'Unique ID (OpenID)',https://lab.civicrm.org/dev/core/-/issues/4193Possible issue with recursive locks2023-03-24T09:24:48ZeileenPossible issue with recursive locksI've brought this over from [pr 22013](https://github.com/civicrm/civicrm-core/pull/22013) because it needs to be discussed in gitlab before it can be reviewed as a PR & hence doesn't belong in the PR queue at this stage.
Note that par...I've brought this over from [pr 22013](https://github.com/civicrm/civicrm-core/pull/22013) because it needs to be discussed in gitlab before it can be reviewed as a PR & hence doesn't belong in the PR queue at this stage.
Note that part of the confusion is the recursion is within a process / connection from my understanding - which is where php statics would be used. Mysql locks are our protection against other processes.
On a version of Maria DB > 10.0.2 I can reserve a lock in one process (recursively if I want)
![image](/uploads/1e3a1f2b6bd34391fcff9225cc15ca44/image.png)
But cannot get it in the other process unless it times out
![image](/uploads/9f45a6eba869d2fda0c748365940aedc/image.png)
What moved the other along was an explanation as to how a problem could arise (e.g like https://lab.civicrm.org/dev/core/-/issues/3988#note_87911 ).
----------------FROM gitlab
From MariaDB 10.0.2 it is possible to recursively set the same lock. This completely breaks the locking mechanism in CRM_Core_Lock because it assumes that GET_LOCK can only be called once for a named lock.
See: https://mariadb.com/kb/en/get_lock/ "From MariaDB 10.0.2, it is also possible to recursively set the same lock".
This is certainly the case on MariaDB 10.3. But I ran some tests on 10.5 and it doesn't seem to allow you to recursively set the same lock anymore. So I think this goes a long way to explaining why locking doesn't seem to be working properly on some sites.
Before
CiviCRM locking mechanism doesn't work on versions of MariaDB (between 10.0.2-10.4.x?) as multiple locks of the same name can be acquired.
After
CiviCRM locking mechanism works on mariaDB to limit each lock to a single named lock.
Technical Details
Described above.https://lab.civicrm.org/dev/core/-/issues/4192Improvement: Required? when creating Custom Field2023-03-23T08:14:19ZStoobImprovement: Required? when creating Custom FieldAfter many years in my position working with clients, and even explicit training on this issue, clients continue to flummox themselves by not reading the 'help text' and clicking **Required? [ ]** in a Custom Data field ... when that in ...After many years in my position working with clients, and even explicit training on this issue, clients continue to flummox themselves by not reading the 'help text' and clicking **Required? [ ]** in a Custom Data field ... when that in fact isn't their intent.
Proposal Pt 1: Expanding the caution to the label itself like so: **[ ] Always require a value?**
Proposal Pt 2: Clarifying the help text like so. **This forces a value in this field to create or edit this type of record. To make a field required on a specific form, use a Profile.**
In a comparison other software:
Salesforce:
`[ ] Always require a value in this field in order to save a record`
Network for Good:
`[ ] Required?` same as Civi but I like their help text a bit better than Civi's `If "Yes" this custom field will be required when manually adding/editing contacts.`https://lab.civicrm.org/dev/core/-/issues/4185Single quote in contribution amount label breaks text receipt emails2023-11-23T07:47:01Zchrisgaraffachris@aghstrategies.comSingle quote in contribution amount label breaks text receipt emailsSteps to reproduce:
- Configure a confirmation page to use contribution amounts without a price set.
- Have a single quote in a Contribution Label. Example: "Provides a family with a month's worth of groceries"
- Make a contribution sele...Steps to reproduce:
- Configure a confirmation page to use contribution amounts without a price set.
- Have a single quote in a Contribution Label. Example: "Provides a family with a month's worth of groceries"
- Make a contribution selecting that contribution option
Expected result:
- Contribution receipt email is sent
Actual result:
- PHP error: `"Message was not parsed due to invalid smarty syntax : Smarty error: [in evaluated template line 55]: syntax error: (secure mode) 's' not allowed in if statement (Smarty_Compiler.class.php, line 1398)"`
Can also be triggered by finding the contribution and sending a receipt email.
Full PHP error details from ConfigAndLog: https://lab.civicrm.org/-/snippets/86
Observations:
- This line in the default Contributions - Receipt (on-line) text template seems to be the issue: `{ts}Amount{/ts}: {contribution.total_amount} {if '{contribution.amount_level}'} - {contribution.amount_level}{/if}`
- Adding `{assign var="contributionAmountLevel" value="{contribution.amount_level}"}` and then changing that line to `{ts}Amount{/ts}: {contribution.total_amount} {if $contributionAmountLevel} - {contribution.amount_level}{/if}` is a workaround
- Doesn't seem to be an issue if a Price Set is used where the label has the same character.
- I was able to reproduce on 5.59.2, 5.58.1, 5.56.2, 5.49.5https://lab.civicrm.org/dev/core/-/issues/4182Create a generic copy or clone api2023-03-17T07:50:37ZeileenCreate a generic copy or clone apiThis is a spin off of https://lab.civicrm.org/dev/core/-/issues/4130
I was looking at supporting import job templates & thought a clone or copy api makes sense.
I'm no longer prioritising this part & I think putting the code in the fo...This is a spin off of https://lab.civicrm.org/dev/core/-/issues/4130
I was looking at supporting import job templates & thought a clone or copy api makes sense.
I'm no longer prioritising this part & I think putting the code in the form layer or BAO layer for the specific entity is enouugh for now.
In order to clone the job the code looks something like
```
$userJob = UserJob::get()->addWhere('id', '=', $templateID)->execute()->first();
unset($userJob['metadata']['DataSource']['table_name'], $userJob['metadata']['submitted_values']['uploadFile'], $userJob['id'], $userJob['created_id'], $userJob['created_date'], $userJob['expires_date']);
$userJobID = UserJob::create(FALSE)->setValues($userJob)->execute()->first()['id'];
```
I feel like there is a case for a generic `Copy` api - in the `DAO` we have [a function with a signature that I think is probably 'a bit much'](https://github.com/civicrm/civicrm-core/blob/8bf6c5853cf76da43765cd8ef79d4323a442f350/CRM/Core/DAO.php#L1845-L1868) - so it might make sense to migrate to a new function... & create a generic API
I checked what Entities implement `Copy` and found a handful -the non static ones are not in the BAO - so we just have one non-std signature which is unused https://github.com/civicrm/civicrm-core/pull/25594
![image](/uploads/c4e1bbdf63fb79efaa06b03bca44fde4/image.png)
One option would be to add a parameter to the schema eg.
'is_not_clonable'
And then we could add that to fields like `created_id` and they would not need to be in the params. We already have the title of the entity so can assume that should be prefixed with `Copy Of`. The `UserJob` would have to override to set some of the deeper valueshttps://lab.civicrm.org/dev/core/-/issues/4181Custom fields on multiple entities2023-10-13T15:42:00Zaydunsaidan.saunders@squiffle.ukCustom fields on multiple entitiesOverview
----------------------------------------
Currently Custom Fields 'extend' one type of entity, possibly limited to one or more subtypes(*) of that entity.
Sometimes it would be useful to allow a set of Custom Fields to be linked...Overview
----------------------------------------
Currently Custom Fields 'extend' one type of entity, possibly limited to one or more subtypes(*) of that entity.
Sometimes it would be useful to allow a set of Custom Fields to be linked to multiple entities.
[(*) - "subtypes" in a broad sense. In the case of Contacts, the fields can be linked to sub-types. For entities like Activities, fields can be linked to say Phone Calls and Meetings which are not strictly subtypes]
Example use-case
----------------------------------------
1) Suppose we want to create custom fields for 'service providers'. Some 'service providers' are Organizations (subtype SP-O), some are Individuals (subtype SP-I).
Current options are:
- link the fields to Contacts - but the fields are only relevant to small proportion of Contacts.
- duplicate the custom fields for each subtype - need to search multiple similar fields that logically should be one.
2) Suppose we want to create a field common to multiple entities (eg 'is_validated' on Memberships, Contributions & Participants). This would require separate field sets per entity.
Current behaviour
----------------------------------------
The current model comes from a single inheritance background: this set of fields 'extends' a particular entity.
Proposed behaviour
----------------------------------------
A more flexible model is to think of a set of fields 'attached' to a selection of entities.
(Vaguely like PHP traits vs class inheritance.)
Comments
----------------------------------------
Looking for feedback on this in two main areas:
1) Is this desirable?
2) How practical is it? Custom fields are used very widely so figuring out a transition plan is key. If APIv4 can bridge the gap between the current situation and a new world then it becomes feasible. @colemanw - I know you've already done a load of work with APIv4 and Custom Fields and probably best placed to answer this bit.https://lab.civicrm.org/dev/core/-/issues/4180SearchKit does not respond to campaigns in mailings2023-03-17T07:47:36ZMariaVSearchKit does not respond to campaigns in mailingsI am trying to build a SearchKit where contacts who have received a mailing with a specific campaign within the last 6 months will no longer be displayed.
**My workaround at the moment:**
- First I enabled the option (CiviMail settings)...I am trying to build a SearchKit where contacts who have received a mailing with a specific campaign within the last 6 months will no longer be displayed.
**My workaround at the moment:**
- First I enabled the option (CiviMail settings) that for each mailing there will be also an activity added.
- The I have a second SearchKit that finds all contacts that have an activity with the campaign within the last 180 days and creates a smart group:
![image](/uploads/7fa530aae317f148486a460c1f63ca26/image.png)
- In my initial SearchKit I choose:
where "in Groups" Not One of "just mentioned smart group"
This works but it has the disadvantage of having 2 SearchKits and another smart group PLUS having an additional activity for each mailing.
**Expected behavior:**
- Having a "without" "Kontakt Mailing" entity where I can just filter those contacts out:
![image](/uploads/753b1ad0c824da4a7794d752ae7c6146/image.png)
I am also confused by the 3 options I have for Mailings:
![image](/uploads/5791966ad972bbc5194e7f796818f0ab/image.png)
What is the difference? Why are 3 options needed? It seems there is no option for the receiver. I have tried all 3 but when I sent out the mailing all the contacts remain in the SearchKit Table.
Is there any other solution that I might have missed?
Thanks in advance for any hint.https://lab.civicrm.org/dev/core/-/issues/4179Event online registration validation error under narrow conditions related to...2023-05-01T22:13:11ZAllenShawEvent online registration validation error under narrow conditions related to multiple participant, $0 fee, and contact reference field permissions: "Your payment information looks incomplete. Please go back to the main registration page, to complete ..."Under a very specific set of circumstances, users are unable to complete online event registration because of the validation error:
```
Please correct the following errors in the form fields below:
Your payment information looks incompl...Under a very specific set of circumstances, users are unable to complete online event registration because of the validation error:
```
Please correct the following errors in the form fields below:
Your payment information looks incomplete. Please go back to the main registration page, to complete payment information.
```
**Setup:**
To reproduce this you will need:
1. An event with the following characteristics:
* Configured for online registration, with multiple participants, and with pricing that allows for a $0 amount on the first participant.
* Includes a profile which contains a required contact reference field.
2. A user role with permissions to register for this event, but **without** the "access contact reference fields" permission.
**Repro steps:**
Once you have that set up you can reproduce as follows:
1. As a user with the given role, open the online registration form for this event.
2. Indicate that you are registering for two participants.
3. On the registration form for either of these two participants, you will notice that the contact reference field is not displayed, as expected in light of the user's permissions.
4. For the first participant, ensure that you select price options totaling $0.
5. Proceed to register the second participant, and for this participant ensure that you select a fee amount of greater than $0.
6. Submit the registration form for the second participant.
**Expected** behavior: The event registration is submitted without error (confirmation page or thank-you page is displayed, as appropriate per event configuration)
**Actual incorrect** behavior: Submission of the final participant form results in the above-stated validation error.
**Strict requirements for repro:**
It's worth noting that you can avoid this error by making any one or more of the following changes to the above steps or set up:
- as admin:
- Change permission so that this user can access contact reference fields.
- Do not make the contact reference field required in the profile.
- as user:
- For the first participant, select fees totaling greater than $0.
- For the second participant, select fees totalling $0.
**How the code allows this wackiness to happen:**
- [This line in CRM_Core_Form::validateMandatoryFields](https://github.com/civicrm/civicrm-core/blob/503cdb20e74866ffc68311c7c2be3cf9577a23bf/CRM/Core/Form.php#L2332) adds a validation error to the form if the required contact reference field has no value, without regard for whether the user had permissioned access to the field.
- [This line in CRM_Event_Form_Registration_AdditionalParticipant::validatePaymentValues](https://github.com/civicrm/civicrm-core/blob/master/CRM/Event/Form/Registration/AdditionalParticipant.php#L522) avoids calling `CRM_Core_Form::validateMandatoryFields()` if the first participant had a fee of more than $0.
(Joinery internal ticket reference: F#1041)https://lab.civicrm.org/dev/core/-/issues/4177Auto-generation of recurring contribution template ignores recurring amount2023-07-20T09:34:15ZAlanDixonAuto-generation of recurring contribution template ignores recurring amountOverview
----------------------------------------
When a recurring contribution does not have a corresponding template, sometimes one is generated implicitly (e.g. when viewing the 'template' and clicking 'done').
That 'implicit generat...Overview
----------------------------------------
When a recurring contribution does not have a corresponding template, sometimes one is generated implicitly (e.g. when viewing the 'template' and clicking 'done').
That 'implicit generation' does not pay attention to the amount in the recurring contribution record.
Reproduction steps
----------------------------------------
1. As an administrator, create a new recurring contribution for $1.
1. Observe that only the recurring contribution and contribution record are created, no recurring template contribution (requires mysql access to see this!).
1. Edit the recurring amount to $2. Note that there is still no recurring template.
1. View the recurring 'template' and click done. This implicitly creates the recurring record based on the $1 contribution, ignoring the $2 recurring contribution record amount, and as a side effect, modifies the recurring contribution record amount back to $1.
Current behaviour
----------------------------------------
The implicit generation of the recurring template does not respect the amount in the recurring record total.
Expected behaviour
----------------------------------------
It should! Of course, it's complicated. e.g. maybe that recurring template should get generated when the original recurring contribution is created?
I would note that I've only described one way that the template gets created, it appears there may be others. So regardless of whether we avoid this specific way of implicitly-generating the template, it should behave better than it does ...
Environment information
----------------------------------------
CiviCRM version: likely all versions since last June 2022.
Relevant docs link https://docs.civicrm.org/dev/en/latest/financial/recurring-contributions/