Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-09-02T05:11:59Zhttps://lab.civicrm.org/dev/core/-/issues/4472Index not created for ACL priority on upgrade to 5.642023-09-02T05:11:59ZJonGoldIndex not created for ACL priority on upgrade to 5.64Once upon a time we had a "missing indexes" check that was removed because it wasn't always easy to auto-solve the issues.
I still run that check in an extension, and on every site I've upgraded to 5.64, I get a notification that `index...Once upon a time we had a "missing indexes" check that was removed because it wasn't always easy to auto-solve the issues.
I still run that check in an extension, and on every site I've upgraded to 5.64, I get a notification that `index_priority` hasn't been added to `civicrm_acl.priority`.5.64.1https://lab.civicrm.org/dev/core/-/issues/4471`updateRelatedMemberships` does not fire "pre" and "post" hooks2023-08-07T12:12:48Zmasetto`updateRelatedMemberships` does not fire "pre" and "post" hooksThe method `updateRelatedMemberships` in file `CRM/Member/BAO/Membership.php` does not call "pre" and "post" hooks. Is it a bug or is it intentional
This is the function:
```php
public static function updateRelatedMemberships($ownerMe...The method `updateRelatedMemberships` in file `CRM/Member/BAO/Membership.php` does not call "pre" and "post" hooks. Is it a bug or is it intentional
This is the function:
```php
public static function updateRelatedMemberships($ownerMembershipId, $params) {
$membership = new CRM_Member_DAO_Membership();
$membership->owner_membership_id = $ownerMembershipId;
$membership->find();
while ($membership->fetch()) {
$relatedMembership = new CRM_Member_DAO_Membership();
$relatedMembership->id = $membership->id;
$relatedMembership->copyValues($params);
$relatedMembership->save();
}
}
```
The effect is, because I'm using the `hook_civicrm_post` hook, I don't have the update hook of related memberships.
I propose to change it as:
```php
public static function updateRelatedMemberships($ownerMembershipId, $params) {
$membership = new CRM_Member_DAO_Membership();
$membership->owner_membership_id = $ownerMembershipId;
$membership->find();
while ($membership->fetch()) {
CRM_Utils_Hook::pre('edit', 'Membership', $membership->id, $params);
$relatedMembership = new CRM_Member_DAO_Membership();
$relatedMembership->id = $membership->id;
$relatedMembership->copyValues($params);
$relatedMembership->save();
CRM_Utils_Hook::post('edit', 'Membership', $membership->id, $relatedMembership);
}
}
```https://lab.civicrm.org/dev/core/-/issues/4470Allow disabling household contact type2023-08-04T03:59:56ZlarsssandergreenAllow disabling household contact typeCurrent proposal:
Make it possible to disable household contact type.
Initial: These cannot be disabled. It would be nice to be able to disable them, especially households as many orgs do not use them. I know Spark has households disab...Current proposal:
Make it possible to disable household contact type.
Initial: These cannot be disabled. It would be nice to be able to disable them, especially households as many orgs do not use them. I know Spark has households disabled, so at least disabling households shouldn't break anything. Organizations might be different though and less important to allow disabling. Maybe worth trying to allow disabling households first and then see.https://lab.civicrm.org/dev/core/-/issues/4469Add Price Field path is wrong2023-09-02T05:11:54ZlarsssandergreenAdd Price Field path is wrongIf you create a price set, afterwards you get a pop-up with the form to create a price set - but you should get the form to create a price field. Same if you go to an existing price set and click Add Price Field - you get the form to add...If you create a price set, afterwards you get a pop-up with the form to create a price set - but you should get the form to create a price field. Same if you go to an existing price set and click Add Price Field - you get the form to add a price set, not a price field.
This is due to [#26929](https://github.com/civicrm/civicrm-core/pull/26929), so paging @ayduns.https://lab.civicrm.org/dev/core/-/issues/4468CiviCRM 5.63.1, Existing Membership Pricesets no longer shows the fields to e...2023-08-03T23:59:47Zjustinfreeman (Agileware)CiviCRM 5.63.1, Existing Membership Pricesets no longer shows the fields to edit Membership Type, Number of TermsExisting Membership Pricesets no longer shows the fields to edit Membership Type, Number of Terms.
**Steps to reproduce**
1. Locate an existing Membership Priceset
2. Edit a Priceset field of type, radio
3. Edit the options for the fiel...Existing Membership Pricesets no longer shows the fields to edit Membership Type, Number of Terms.
**Steps to reproduce**
1. Locate an existing Membership Priceset
2. Edit a Priceset field of type, radio
3. Edit the options for the field
4. Note that the Membership Type, Number of Terms are not available, as shown below.
![image](/uploads/b97c87c388759b7d600f1d44bc5fb66b/image.png)
Adding a new price field to a Membership Priceset does have these options.
![image](/uploads/f5541d1120bb8a971fd89b0a39af100f/image.png)
Tested on **CiviCRM 5.63.1**
Tried to reproduce on https://dmaster.demo.civicrm.org/civicrm/admin/price?reset=1 - but that has even more problems, does not even progress to the adding individual fields screen for a priceset.
Agileware Ref: CIVICRM-2158https://lab.civicrm.org/dev/core/-/issues/4467Import caching issue2023-08-03T12:58:44ZeileenImport caching issueSteps to replicate
1) Enable Civi-import
2) Import the attached file 'import.csv' (Contributions-\>import contributions) - be sure to create an import template on the mapping screen
![image.png](/uploads/31373d18b7c61b4d81e17c3c256f6a7...Steps to replicate
1) Enable Civi-import
2) Import the attached file 'import.csv' (Contributions-\>import contributions) - be sure to create an import template on the mapping screen
![image.png](/uploads/31373d18b7c61b4d81e17c3c256f6a7f/image.png)
3) After doing that first import use the import template & try to import the second attached file (import_with_source.csv)
![image.png](/uploads/9c0149213e4c31c4eea70bd7e10ae5ca/image.png)
4) Update the mapping & choose to save it
![image.png](/uploads/3d4669537b10f7c947f716b47b862e18/image.png)
5) after updating try to re-use with the same csv & the error still pops up
![image.png](/uploads/7f24d75f78a4c71784b2f6eb35ff0f30/image.png)
6) I have ALSO been experiencing issues with the import template updates not 'saving' when the cache is warm. However, I couldn't replicate today when trying to - but the error in 5 was consistent. @larssg also reported it not saving here https://github.com/civicrm/civicrm-core/pull/26867#issuecomment-1640580102 & that day I couldn't replicate & then another day I could.... and now I can't
[import.csv](/uploads/35ffcf0f7778417e4ea63fe55f5165a3/import.csv)
[import_with_source.csv](/uploads/b60901676b4f90c480d9bba7c2b49cd5/import_with_source.csv)https://lab.civicrm.org/dev/core/-/issues/4466Roles - Define default taxonomy (for standalone deployments)2023-12-04T21:13:40ZtottenRoles - Define default taxonomy (for standalone deployments)Now that we have a mechanism for [defining users and roles in standalone](https://lab.civicrm.org/dev/core/-/issues/4053), there's another question: What roles should we define by default? How do we maintain those roles? A few ideas:
* ...Now that we have a mechanism for [defining users and roles in standalone](https://lab.civicrm.org/dev/core/-/issues/4053), there's another question: What roles should we define by default? How do we maintain those roles? A few ideas:
* __Light-touch with open taxonomy.__ This is what D7 does -- you just get 2-3 roles (anonymous, authenticated, admin). Then the site-builder can fill-in more roles to taste. When you upgrade, you may need to re-tune the roles.
* __Strong defaults with hackable taxonomy__ This is what WP does -- you get several roles out-of-the-box. Site-builders are not particularly encouraged to refine them, but it is possible (esp using APIs/add-ons). When you upgrade, it can (*I assume*) add or update roles.
* __Library of example roles__: This idea comes from looking at Google Cloud -- they have an extensive library of roles. Some of the roles are similar/overlapping (e.g. there are older and newer flavors of "File Admin"/"Storage Admin"). The upshot is that you get a presumption of continuity while still allowing the taxonomy to evolve. The downside is that the list is a bit overwhelming. But treating these as templates might mitigate that (*library of possible roles is long -- but the local site only enables a handful*).
There are some related questions - if you have strong defaults or a library of examples, then how do you deal with extensions (*i.e. the list of available perms may fluctuate depending on the extensions*).https://lab.civicrm.org/dev/core/-/issues/4465Afform - Default value for boolean filters not displayed correctly in all fie...2023-11-06T00:00:55Zxavi-xalocAfform - Default value for boolean filters not displayed correctly in all field types## Overview
A PR (https://github.com/civicrm/civicrm-core/pull/25605) has been merged to solve issues ( https://lab.civicrm.org/dev/core/-/issues/4113, for instance) with default values for booleans filters in Search Kit. Although that ...## Overview
A PR (https://github.com/civicrm/civicrm-core/pull/25605) has been merged to solve issues ( https://lab.civicrm.org/dev/core/-/issues/4113, for instance) with default values for booleans filters in Search Kit. Although that PR solves many of the issues identified, some problems still remain.
## Current behaviour
Although filter works fine when the field is of type "radio button", that's not the case when the type is "select" or "checkboxes":
- Select: Works fine when "yes" is the default value, but doesn't show default value when it is set to "no"
- Checkboxes: Doesn't get checked when default value is set to "yes".
## Environment information
* **CiviCRM:** _5\.61.2_Kurund JalmiKurund Jalmihttps://lab.civicrm.org/dev/core/-/issues/4464Authentication tokens: session already active - different user2023-08-04T12:51:21Zaydunsaidan.saunders@squiffle.ukAuthentication tokens: session already active - different userOverview
----------------------------------------
See #4463 and https://lab.civicrm.org/dev/core/-/issues/4462 This improvement issue relates to handling the case where the new user is different to that of the existing session.
From [t...Overview
----------------------------------------
See #4463 and https://lab.civicrm.org/dev/core/-/issues/4462 This improvement issue relates to handling the case where the new user is different to that of the existing session.
From [this chat](https://chat.civicrm.org/civicrm/pl/n4cr3jownifexnjda3k45qhura):
@totten says:
- if the active session is same user, then no problems. just proceed.
- if the active session user differs from the requested user, then you kinda have to choose between:
- killing the old session and starting a new one
- changing the userID of the live session. (but then you're liable to leak session-data in hard-to-predict ways)
- aborting the request
For the already active session with different user - I think it would be ideal to show a prompt and confirm that they want to logout/switch-user.https://lab.civicrm.org/dev/core/-/issues/4463Authentication tokens: session already active - same user2023-08-03T14:23:35Zaydunsaidan.saunders@squiffle.ukAuthentication tokens: session already active - same userOverview
----------------------------------------
If a user clicks an authenticated link a second time the result is an error message stating: `HTTP 401 Cannot login. Session already active.`
See [this chat](https://chat.civicrm.org/civ...Overview
----------------------------------------
If a user clicks an authenticated link a second time the result is an error message stating: `HTTP 401 Cannot login. Session already active.`
See [this chat](https://chat.civicrm.org/civicrm/pl/n4cr3jownifexnjda3k45qhura)
and https://lab.civicrm.org/dev/core/-/issues/4462
Reproduction steps
----------------------------------------
1. Create a FormBuilder form and enable the Token option
1. Send a mail using the form token. This link includes "_authx=Bearer..."
1. Click the link on the received mail. - Should work and creates an authenticated session.
1. Click the link again - fails with `HTTP 401 Cannot login. Session already active.`
Expected behaviour
----------------------------------------
There are two scenarios depending on whether it is the same user. This bug issue relates to the case where the user is the same. See #4464 for handling this where the user is different.
It the user is the same, it should just continue to the form without error.https://lab.civicrm.org/dev/core/-/issues/4462Transactional Authentication (Page-level auth tokens)2024-03-01T19:59:17Zaydunsaidan.saunders@squiffle.ukTransactional Authentication (Page-level auth tokens)Overview
----------------------------------------
Improve the support for transactional approaches in the authentication framework. The current implementation of authentication tokens is more suited to a portal approach than a transacti...Overview
----------------------------------------
Improve the support for transactional approaches in the authentication framework. The current implementation of authentication tokens is more suited to a portal approach than a transactional one.
See [this snippet](https://lab.civicrm.org/-/snippets/92 ) for the background describing how to use authenticated links with forms. This documents the resulting conversation with @totten [here](https://chat.civicrm.org/civicrm/pl/trubx7xwui878nsz3w6ujmf6oc):
(@totten says:) I'd like some language to describe two ways of approaching customized UX for constituents.
- Hypothetical scenario
- You send an email 12 months after a prior donation. You thank the donor for the previous contribution. The message includes some links to update communication preferences, browse past donations, or make a new donation.
- UX Approaches
1. **Transactional Approach / One form at a time / Strict Pageflow / Page-Level Auth**: The email has 3x hyperlinks. Each goes to different form/page. Each link has diff auth code (which confers access to exactly one form).
2. **Portal Approach / Multiple forms at discretion / Open Pageflow / Session-Level Auth**: The email has 3x hyperlinks. All go to pages within the same portal. The user opens the first page which takes their interest. On that page, there are more links (eg via prose or navbar) to go checkout the others.
I don't know a good/simple way to say that one is better than the other. but they are different. I suspect there's some Venn diagram of organizational-scenarios (some better suited to 1; some to 2; some to either 1 or 2)
The current auth-code mechanism is better for "Portal Approach/Open Pageflow" -- and it's worse for Transactional Approach/Strict Pageflow"
(that's not b/c "Open Pageflow" is better -- but at the time of its writing, it was the easier one to support)
From a low-level POV, the auth-codes for them would differ like this:
- For portal/open pageflow, it generates this token -- which is basically a login-token
- -The custom forms use "Role-based" security-(Maybe either security model is ok in this context...)
- For transactional/strict pageflow, you might expect...
- It needs a fine-grained token like this (pseudocode)
```
$bearerToken = "Bearer " . $jwt->encode([
'exp' => $expires,
'sub' => "cid:" . $contactId,
'scope' => 'api4',
'api4.whitelist' => [
['Afform', 'prefill', ['name' =>'xyz']],
['Afform', 'submit', ['name' =>'xyz']],
]);
```
- In PHP, need a mechanism to accept those tokens
- In JS/HTML, need a mechanism to relay that token
- The custom forms use "Form-based" security
See also
--------
- #4463: Authentication tokens: session already active - same user
- #4464: Authentication tokens: session already active - different userhttps://lab.civicrm.org/dev/core/-/issues/4461search kit: activity search with activity contacts no longer working2023-09-02T22:17:27ZDaveDsearch kit: activity search with activity contacts no longer workingJust set up a simple search on activities with activity contacts. No results and console has `TypeError: apiResults is undefined`
Happens on dmaster.demo too.
If you remove the "if contact role = ..." then it does work.
FYI @colemanwJust set up a simple search on activities with activity contacts. No results and console has `TypeError: apiResults is undefined`
Happens on dmaster.demo too.
If you remove the "if contact role = ..." then it does work.
FYI @colemanw5.65.0colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/4460Feature request: Force recurring-only2023-08-11T06:35:18ZMariaVFeature request: Force recurring-onlyI would like to propose a feature for contribution pages.
There is already an [extension (ca.civicrm.contributionrecur)](https://github.com/adixon/ca.civicrm.contributionrecur/) with this feature (and a lot more) but unfortunately it do...I would like to propose a feature for contribution pages.
There is already an [extension (ca.civicrm.contributionrecur)](https://github.com/adixon/ca.civicrm.contributionrecur/) with this feature (and a lot more) but unfortunately it does not work properly anymore.
It is possible to force recurring payments only - which is very useful for i.e. membership pages.
When this option is selected, it is not possible to uncheck the checkbox:
![image](/uploads/d3898e4c576b669018029e7b4da3cb08/image.png)https://lab.civicrm.org/dev/core/-/issues/4459Uncaught TypeError: Return value of CRM_Contact_Import_Form_MapField::getLoca...2023-08-04T12:51:55ZyurgUncaught TypeError: Return value of CRM_Contact_Import_Form_MapField::getLocationTypeLabel() must be of the type string, null returnedOverview
----------------------------------------
WordPress contacts import from CSV, CiviCRM 5.61.2. (not reproduceable on dmaster).
https://civicrm.stackexchange.com/questions/45332/contacts-import-issue-at-crm-contact-import-form-map...Overview
----------------------------------------
WordPress contacts import from CSV, CiviCRM 5.61.2. (not reproduceable on dmaster).
https://civicrm.stackexchange.com/questions/45332/contacts-import-issue-at-crm-contact-import-form-mapfieldgetlocationtypelabel
Reproduction steps
----------------------------------------
1. Click on **Contacts -> Import Contacts**.
2. Add a CSV file, leave all settings intact and click **Continue**.
3. Got a Wordpress WSOD and php error log message "**Uncaught TypeError: Return value of CRM_Contact_Import_Form_MapField::getLocationTypeLabel() must be of the type string, null returned in /data/sites/web/pedesdev/www/wp-content/plugins/civicrm/civicrm/CRM/Contact/Import/Form/MapField.php:480**".
Expected behaviour
----------------------------------------
Process to the next import step
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* CiviCRM: 5.61.2
* PHP: 7.4.3
Comments
----------------------------------------
Fixed by changing from
- protected function getLocationTypeLabel($type): string {
to
- protected function getLocationTypeLabel($type): ?string {
in www/wp-content/plugins/civicrm/civicrm/CRM/Contact/Import/Form/MapField.php:480
however not sure if this is the right way.https://lab.civicrm.org/dev/core/-/issues/4458Error when viewing contact-info profile without "view deleted contacts" permi...2023-08-07T12:11:55ZcolemanwError when viewing contact-info profile without "view deleted contacts" permissionThe change in b7edabe813db467aff6dd1ea083d798089198655 switched the profile to use APIv4 to fetch email id for constructing an email link. The API call looks like this:
```php
$emailID = Email::get()->setOrderBy(['is_primary' => 'DES...The change in b7edabe813db467aff6dd1ea083d798089198655 switched the profile to use APIv4 to fetch email id for constructing an email link. The API call looks like this:
```php
$emailID = Email::get()->setOrderBy(['is_primary' => 'DESC'])->setWhere([['contact_id', '=', $this->_id], ['email', '=', $email], ['on_hold', '=', FALSE], ['contact_id.is_deceased', '=', FALSE], ['contact_id.is_deleted', '=', FALSE], ['contact_id.do_not_email', '=', FALSE]])->execute()->first()['id'];
```
It was reported on SE that this fails for users without "view deleted contacts", however I'm unable to reproduce.
See https://civicrm.stackexchange.com/questions/45313/invalid-field-contact-id-is-deceased-apiv4
This should have already been double-fixed by:
- [Revert "Add permission metadata to contact is_deleted field" #22203](https://github.com/civicrm/civicrm-core/pull/22203)
- [APIv4 - Silently ignore non-permissioned fields instead of throwing exceptions #20724](https://github.com/civicrm/civicrm-core/pull/20724)https://lab.civicrm.org/dev/core/-/issues/4457Entity Reference Custom Field not working as filter in "regular" search2023-10-03T21:46:14ZjensschuppeEntity Reference Custom Field not working as filter in "regular" searchFollow-up to #3721. @fabian_SYSTOPIA found out that filtering doesn't work correctly.
Not sure this is to be fixed, as it's related to the "old-style" searches ...
## Steps to reproduce
* Create an Entity Reference Custom Field on the...Follow-up to #3721. @fabian_SYSTOPIA found out that filtering doesn't work correctly.
Not sure this is to be fixed, as it's related to the "old-style" searches ...
## Steps to reproduce
* Create an Entity Reference Custom Field on the *Participant* entity for referencing an *Event* entity
* Edit a participant and fill out the field by selecting an event
* Use the *Find Participants* search and try to limit the search result to participants with the event previously selected in that field
* Notice that all participants are being found, not only that one with the entity reference field being filledhttps://lab.civicrm.org/dev/core/-/issues/4456Saving event with custom file field gives fatal error2024-02-07T19:47:09ZwouterhSaving event with custom file field gives fatal error1. Create a file field for event(s).
1. Go to an existing event containing this custom file field – Press save.
1. Red alert box "network error" and the custom fields don't display.
`TypeError: Cannot access offset of type string on st...1. Create a file field for event(s).
1. Go to an existing event containing this custom file field – Press save.
1. Red alert box "network error" and the custom fields don't display.
`TypeError: Cannot access offset of type string on string in include() (regel 59 van /var/www/html/web/sites/default/files/civicrm/templates_c/nl_NL/%%1D/1DB/1DB03A28%%CustomField.tpl.php).`
Using CiviCRM 5.62.0 & PHP 8. Doesn't happen in PHP 7.5.71.0https://lab.civicrm.org/dev/core/-/issues/4455SearchKit: Arithmetic field transformation broken2023-08-03T02:16:13ZlarsssandergreenSearchKit: Arithmetic field transformation brokenSteps to replicate:
New SK search
Contributions
Add Total Amount column
Add Arithmetic field transformation
Click Search
Result:
![image](/uploads/581b34bde8138243b9ecdf5afaad3383/image.png)
This is a regression due to [#26065](https...Steps to replicate:
New SK search
Contributions
Add Total Amount column
Add Arithmetic field transformation
Click Search
Result:
![image](/uploads/581b34bde8138243b9ecdf5afaad3383/image.png)
This is a regression due to [#26065](https://github.com/civicrm/civicrm-core/pull/26065). @colemanw, one of yours.https://lab.civicrm.org/dev/core/-/issues/4454Proposal: Rename "Scheduled Reminders"2023-10-09T22:42:58ZJonGoldProposal: Rename "Scheduled Reminders"From a UX perspective, "Scheduled Reminders" is a poor name. It has uses far beyond reminders, and it's unintuitive to create a birthday email or "welcome series" of emails using a feature called "Scheduled Reminders".
I don't 100% h...From a UX perspective, "Scheduled Reminders" is a poor name. It has uses far beyond reminders, and it's unintuitive to create a birthday email or "welcome series" of emails using a feature called "Scheduled Reminders".
I don't 100% have a term decided on, though everyone loves a good bikeshed. I considered "Scheduled Messages" or "Scheduled Communications" - but I would expect a scheduled CiviMail or SMS to fall under that label (but maybe so does "Scheduled Reminders"?). "Automated Messages" overlaps with the System Messages. "Scheduled Message Rules" is better but long (if we ignore CiviRules momentarily).
Does anyone else have thoughts? I could live with "Scheduled Messages" as an improvement, but perhaps there's something better.https://lab.civicrm.org/dev/core/-/issues/4453Error on saving amounts on edit Contribution Page2023-08-08T22:21:55ZlarsssandergreenError on saving amounts on edit Contribution PageIf you are on PHP 8.1+, you'll hit a hard error if you try to save a Contribution Page - Amounts tab with a Fixed Contribution Option (not a Price Set). There is a name collision here on $name, funnily enough.
The problem is that CRM_Co...If you are on PHP 8.1+, you'll hit a hard error if you try to save a Contribution Page - Amounts tab with a Fixed Contribution Option (not a Price Set). There is a name collision here on $name, funnily enough.
The problem is that CRM_Contribute_Form_ContributionPage had a $name added recently in [#26259](https://github.com/civicrm/civicrm-core/pull/26259), which is now loaded in the $defaults for CRM_Contribute_Form_ContributionPage and then into CRM_Contribute_Form_ContributionPage_Amount. It turns out that in CRM_Contribute_Form_ContributionPage_Amount $defaults['name'] was already in use [here as an array](https://github.com/civicrm/civicrm-core/blob/6ecc4c3b032d38de4f4e6b5c3cb1fd573b0df5f4/CRM/Contribute/Form/ContributionPage/Amount.php#L237) for those fixed contribution price options.
The result is that $defaults['name'] already exists as a string when we try to add $defaults['name][0] for the first price option, giving the error (or a warning, depending on PHP version).
Maybe we could just change the Contribution Page $name to $pageName or something similar. @eileen, thoughts?