CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2023-02-27T12:35:41Zhttps://lab.civicrm.org/dev/core/-/issues/4109New `address_primary` tokens don't work2023-02-27T12:35:41ZJonGoldNew `address_primary` tokens don't workhttps://github.com/civicrm/civicrm-core/pull/25032 introduced a new standard, such that a postal code token should be: `{contact.address_primary.postal_code}`.
There is also what the tests call the "briefly popular" interim format: `{co...https://github.com/civicrm/civicrm-core/pull/25032 introduced a new standard, such that a postal code token should be: `{contact.address_primary.postal_code}`.
There is also what the tests call the "briefly popular" interim format: `{contact.primary_address.postal_code}`.
However, the `address_primary` variant only works if either the corresponding `primary_address` OR legacy token is also present. The tests pass because the legacy tokens and new tokens are tested together.
E.g. this won't render:
```
pa postal: {contact.address_primary.postal_code}
```
But these two will:
```
old postal: {contact.postal_code}
pa postal: {contact.address_primary.postal_code}
```
```
interim postal: {contact.primary_address.postal_code}
pa postal: {contact.address_primary.postal_code}
```5.58.1https://lab.civicrm.org/dev/core/-/issues/4108Missing field for state province is easily missed2023-02-02T07:52:59ZyashodhaMissing field for state province is easily missedSteps to replicate :
--------------------
- Go to main of any configured contribution pages
- Fill all the mandatory fields except postcode
- On submit, the page will have postcode field in view (no need to scroll) all the way down.
...Steps to replicate :
--------------------
- Go to main of any configured contribution pages
- Fill all the mandatory fields except postcode
- On submit, the page will have postcode field in view (no need to scroll) all the way down.
![dmaster_postcode](/uploads/66a33999f7035fd958cde632cf975f74/dmaster_postcode.png)
- Fill all the mandatory fields except state province
- On submit, the page will NOT have state province field in view (need to scroll)
![dmaster_state](/uploads/f8019eddec3cfd91bf6c5b77f0dfdd28/dmaster_state.png)
This is inconsistent and esp cumbersome when you have a lot of fields configured in profile.https://lab.civicrm.org/dev/core/-/issues/4107Disabling an extension should not remove associated permissions from the CMS2023-07-05T22:19:53ZlarsssandergreenDisabling an extension should not remove associated permissions from the CMSDisabling an extension doesn't erase any settings for the extension, except if there is an associated permission in the CMS, which is removed on disabling the extension. When you later re-enable the extension, no one has the permission w...Disabling an extension doesn't erase any settings for the extension, except if there is an associated permission in the CMS, which is removed on disabling the extension. When you later re-enable the extension, no one has the permission which is re-added. This is inconsistent with how all the other settings work and confusing for users and admins (who will wonder why they can't do what they used to be able to do). This came up for me with CDN Tax Receipts, but testing shows it seems to happen with other extensions too.
Is there any reason we couldn't just leave permissions in place on extension disable and remove them instead on uninstall?
Tested on 5.59 on D7.https://lab.civicrm.org/dev/core/-/issues/4106Add filter on pledge payment in contribution report templates2023-02-28T06:44:39ZyashodhaAdd filter on pledge payment in contribution report templates Add a filter on "contribution is a pledge payment Yes/No" in contribution report templates Add a filter on "contribution is a pledge payment Yes/No" in contribution report templatesyashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/4105Import contribution note does not accept emtpy string2023-03-10T23:41:49ZmasettoImport contribution note does not accept emtpy stringOverview
----------------------------------------
If in import contributions I map the field 'Note' and if there are rows with an empty value, I get this error:
**`"Mandatory values missing from Api4 Note::save: note"`**
Reproduction s...Overview
----------------------------------------
If in import contributions I map the field 'Note' and if there are rows with an empty value, I get this error:
**`"Mandatory values missing from Api4 Note::save: note"`**
Reproduction steps
----------------------------------------
1. Click on **Contributions -> Import contributions**.
1. Choose a CSV file. There must be a column for 'Notes'.
1. In Match Fields (step 2 of 3) for the column "Notes" choose "Note"
Current behaviour
----------------------------------------
For rows with emtpy notes I have this error:
**`"Mandatory values missing from Api4 Note::save: note"`**
Expected behaviour
----------------------------------------
It must also accept empty notes.
Environment information
----------------------------------------
* __CiviCRM:__ _5.57.3_
* __PHP:__ _8.1_
* __CMS:__ _Drupal 9_
* __Database:__ _MySQL 5.7.7_5.59.2https://lab.civicrm.org/dev/core/-/issues/4104SearchKit / API4 Explorer: Cannot select Contribution ID for ContributionSoft2023-02-02T00:47:08ZlarsssandergreenSearchKit / API4 Explorer: Cannot select Contribution ID for ContributionSoftSeems like something isn't right with the reference from ContributionSoft contribution id to the original contribution id. When trying to use the select2 for these, no matter what you enter, you'll get Loading failed and be unable to sel...Seems like something isn't right with the reference from ContributionSoft contribution id to the original contribution id. When trying to use the select2 for these, no matter what you enter, you'll get Loading failed and be unable to select a contribution id. API4 itself works as expected.
In Searchkit:
![image](/uploads/c34f072e4840d65f55069905d335ff3a/image.png)
In API4 Explorer:
![image](/uploads/58abb51db8b5ecf70e75bf9709244d2b/image.png)
Tested on dmaster (5.59).5.58.0https://lab.civicrm.org/dev/core/-/issues/4103Event price sets: Admin-only text field amount is shown in event registration...2023-05-05T15:52:20ZlarsssandergreenEvent price sets: Admin-only text field amount is shown in event registration test driveThis is a minor issue, but potentially confusing as it makes the event registration test drive page incorrect and different from the live registration page.
Steps to replicate:
1. Start with an event with a price set for registration o...This is a minor issue, but potentially confusing as it makes the event registration test drive page incorrect and different from the live registration page.
Steps to replicate:
1. Start with an event with a price set for registration options
2. Add a Text / Numeric Quantity field to the price set with Visibility = Admin.
3. Open Registration (Test Drive) in an Incognito / Private window.
4. Open Registration (Live) in an Incognito / Private window.
Note that the amount of the field is shown on a line on the test drive page, but not on the live page. The input field itself is not shown, just the amount. Nothing should be shown on the test drive page as this option is admin only.
This only happens with text fields, other field types are correctly not shown if set to admin only.
Tested on dmaster (5.59).
I will look into this when I have some time available.5.63.0https://lab.civicrm.org/dev/core/-/issues/4102Custom field content in a repeating event is not copied to all/subsequent ins...2023-02-02T07:45:34ZUpperholmeCustom field content in a repeating event is not copied to all/subsequent instances of the repeated eventOverview
----------------------------------------
I have set up a series of repeating events. I also have a set of custom fields for events. If I populate to a custom field in one instance of the repeating event, and save the change I a...Overview
----------------------------------------
I have set up a series of repeating events. I also have a set of custom fields for events. If I populate to a custom field in one instance of the repeating event, and save the change I am asked if I want to cascade that change to later events in the series, to all of the events, or to none. If I choose to save the change to either all of the events in the series or to later events in the series, I expect the custom field to be populated with an identical value in all of the selected events in the series. This doesn't happen. The change is on ly saved to the specific event that I have edited.
Reproduction steps
----------------------------------------
1. Create a custom field set for events with at least one field.
2. Create an event and specify that it be repeated more than once. Save.
3. Edit one instance of the event series (not the last one in the series). Edit a selected custom field for the event. Save and choose to apply the change to either all of the events in the series, or to later events.
4. Edit a later instance of the event, and note that the change has not been applied.
Current behaviour
----------------------------------------
The change to the selected custom field in only saved to the specific instance of the event.
Expected behaviour
----------------------------------------
I expect the custom field to be populated with an identical value in all of the selected events in the series.
Environment information
----------------------------------------
CiviCRM 5.57.1
Drupal 7.94https://lab.civicrm.org/dev/core/-/issues/4101CiviCRM session management contributing to (causing?) 30s login delays with J...2023-01-30T08:32:33ZTOCM_MMatthewsCiviCRM session management contributing to (causing?) 30s login delays with JetPack and non-default themesOverview
----------------------------------------
There is more info in the CiviCRM StackExchange thread at https://civicrm.stackexchange.com/questions/42896/civicrm-plugin-causes-a-30-second-login-delay/42901#42901. And this is also pro...Overview
----------------------------------------
There is more info in the CiviCRM StackExchange thread at https://civicrm.stackexchange.com/questions/42896/civicrm-plugin-causes-a-30-second-login-delay/42901#42901. And this is also probably related to an old issue that was closed as not being a real problem, https://lab.civicrm.org/dev/wordpress/-/issues/32.
WordPress 6.x (several versions), CiviCRM several versions (including 5.57.0), JetPack (several versions, including latest), and every theme that I tried that wasn't one included with WordPress (currently using Vantage). Note that I have another WP/CiviCRM/JetPack/Vantage site that does NOT have this problem, so it could be extension or plugin related but I haven't been able to figure out what that might be given all the permutations.
But after going several rounds with JetPack engineering & support taking xdebug traces, their conclusion was the session management from CiviCRM was interfering with sessions in general, causing one of their threads to hang. Logins indirectly depended on JetPack threads, so logins hung. The workaround now is to disable the 'Dedicated Sync' thread (which JetPack has to do on their end). Causes some other minor issues or delays in the background, but at least our logins are fast now.
Reproduction steps
----------------------------------------
Wish I could tell you.
Current behaviour
----------------------------------------
Any login takes 30s before finishing. Looking at web server log (modified ssl_request to include # of seconds), the POST /wp-admin/admin-ajax.php?callback=[stuff] call was the one taking 30s. Trace files give more info, which is what JetPack engineering used.
Expected behaviour
----------------------------------------
Quick logins, which are happening now that JetPack isn't trying to keep a dedicate sync thread running. But I'd like to not have to disable features that I'm paying for in JetPack to have a usable site.
Environment information
----------------------------------------
Browser: All. Personally I've used Safari (latest versions since Oct 2022) and Chrome (latest versions since Oct 2022) on MacOS, but this affected every user.
CiviCRM, all versions since 5.54.0.
PHP: Started with 7.4.x, now on 8.0.27.
WordPress: Latest version since Oct 2022.
Database: MySQL 8.0.30
Web Server: Apache 2.4.53
OS: CentOS Stream 9
Comments
----------------------------------------
Understand that this has no easy fix, but I do want to record the fact that it does in fact have a real world impact, and if there's anything else that can be done to solve/mitigate/whatever it, I am more than happy to help get more information.https://lab.civicrm.org/dev/core/-/issues/4100Add setting to disable Smarty in Scheduled reminders2023-04-11T12:40:41ZMichael McAndrewAdd setting to disable Smarty in Scheduled remindersUntil now, Smarty has been turned on in scheduled reminders.
This can cause problems when inline CSS is present in the scheduled reminder (e.g. when the html for the reminder was generated via Mosaico using the https://civicrm.org/exten...Until now, Smarty has been turned on in scheduled reminders.
This can cause problems when inline CSS is present in the scheduled reminder (e.g. when the html for the reminder was generated via Mosaico using the https://civicrm.org/extensions/mosaico-message-templates extension). It causes a fatal error when sending the messages which may not be detected and may cause other scheduled jobs to fail.
We could fix this by turning it off but some sites may want to preserve the current behaviour (those who actually use Smarty in their scheduled reminders - we don't now how many of these exist but we presume that they are in the minority - see https://github.com/civicrm/civicrm-core/pull/15436#issuecomment-541923948 for a discussion of why Smarty was enabled originally).
So we:
1. add a new setting `scheduled_reminder_smarty` which by default is null, i.e. we disable this feature for new sites.
2. enable this feature during the upgrade to preserve the existing behaviour
3. let people know they we might want to turn it off in a post upgrade message
We should also consider mentioning this in the https://civicrm.org/extensions/mosaico-message-templates documentation.
See https://github.com/civicrm/civicrm-core/pull/15436 and https://lab.civicrm.org/dev/core/-/issues/58 for relevant background.5.60.0https://lab.civicrm.org/dev/core/-/issues/4099Form Builder crashes trying to edit Mosaico Templates form.2023-01-30T08:31:04ZRichForm Builder crashes trying to edit Mosaico Templates form.Overview
----------------------------------------
Editing the "Mosaico Templates" form provided by the Mosaico extension causes an AngluarJS crash in Form Builder.
Reproduction steps
----------------------------------------
1. Use Civi...Overview
----------------------------------------
Editing the "Mosaico Templates" form provided by the Mosaico extension causes an AngluarJS crash in Form Builder.
Reproduction steps
----------------------------------------
1. Use Civi 5.57, mosaico ext 2.10.1665574809
1. Go to **Administer » Custom » Form Builder » Search Forms » Edit** on the `afsearchMosaicoTemplateList` one
2. Crash.
Current behaviour
----------------------------------------
Console log first error (there's lots, but I expect it's the first one that causes the others)
> Syntax Error: Token '{' invalid key at column 2 of the expression [{{ts('Configure template categories')}}] starting at [{ts('Configure template categories')}}].
Expected behaviour
----------------------------------------
Should be able to edit the form.
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __Browser:__ Firefox 110.0b5
* __CiviCRM:__ 5.57
* __PHP:__ 7.4
* __CMS:__ D7
Comments
----------------------------------------
If I edit the .html file in question and remove the {{ }} parts then it's happy. But those {{ }} parts do work when the form is presented; just not in the editor.
I believe this is a core bug and not to do with mosaico.
https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/blob/9ecdf84b65640c79c73162c4659e94e56442ccea/ang/afsearchMosaicoTemplateList.aff.html#L12https://lab.civicrm.org/dev/core/-/issues/4098Feature Request: Ability to hide FormBuilder Search Forms when there are no r...2023-01-30T08:30:41ZbrienneFeature Request: Ability to hide FormBuilder Search Forms when there are no results foundOverview
----------------------------------------
By the combined powers of SearchKit and FormBuilder, you can create Search Forms and display them on the Contact Summary Page. While you can limit the type of contact on which to display ...Overview
----------------------------------------
By the combined powers of SearchKit and FormBuilder, you can create Search Forms and display them on the Contact Summary Page. While you can limit the type of contact on which to display it, i.e. Organization or Individual, it is currently not possible to hide the display when there are no results returned from the SearchKit search.
Example use-case
----------------------------------------
Creating a display block on Organizations to display the "Primary Contact". If the Organization has a primary contact, then the user would want to see that displayed in the block. If they do not have a primary contact, then a user may want to hide that display altogether.
1. Make a SearchKit search with the following criteria:
* Search for *Contacts*
* With (required) *Contact Related Contacts* if Relationship to contact = *Primary Contact of*
* Contact Type = *Organization*
1. Make a Table display for that SearchKit and configure as desired.
2. Make a Form from that display, check the *Add to Contact Summary Page* option, and select **Organization** next to the *For* label.
Current behaviour
----------------------------------------
Currently, it is not possible to hide the display block when there are no results found. Instead, you get a bright blue box on the Contact Summary Page that states "None found".
![Selection_202](/uploads/d03094d0e269f5e8529084f9e3e91ca6/Selection_202.png)
Proposed behaviour
----------------------------------------
There should a variety of options for users to configure how these blocks are displayed/not displayed when there are no options (such as the "no results options with Drupal Views).
For example, there could be a checkbox on the FormBuilder section that adds the display to the Contact Summary Page that gives the option to hide the display when there are no results. This type of checkbox could also be on the SearchKit display options.
![Selection_204](/uploads/cf167a5469addcff5093897b850b790e/Selection_204.png)
![Selection_205](/uploads/004f81cdb74c390c5568a25cfec1ec5c/Selection_205.png)
Comments
----------------------------------------
This is an unfunded feature request of suggestions for UX improvements.https://lab.civicrm.org/dev/core/-/issues/4097CRM_Utils_Number::formatLocaleNumeric() method throws fatal error with empty ...2023-01-30T21:07:08ZbenmoreassyntCRM_Utils_Number::formatLocaleNumeric() method throws fatal error with empty string parameter.Overview
----------------------------------------
CRM_Utils_Number::formatLocaleNumeric() method throws fatal error due to string parameter.
Reproduction steps
----------------------------------------
1. Generate a report that uses cust...Overview
----------------------------------------
CRM_Utils_Number::formatLocaleNumeric() method throws fatal error due to string parameter.
Reproduction steps
----------------------------------------
1. Generate a report that uses custom fields with numeric values. In my case the custom fields were storing simple integer counts of family members.
1. The following fatal error is thrown: "Fatal error: Uncaught Error: NumberFormatter::format(): Argument #1 ($num) must be of type int|float, string given
in /path/to/civicrm/civicrm/CRM/Utils/Number.php on line 123"
Current behaviour
----------------------------------------
Fatal error is thrown. Error affects multiple reports. Full output follows.
```
Fatal error: Uncaught Error: NumberFormatter::format(): Argument #1 ($num) must be of type int|float, string given
in /path/to/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/Number.php on line 123
Call stack:
NumberFormatter::format()
wp-content/plugins/civicrm/civicrm/CRM/Utils/Number.php:123
CRM_Utils_Number::formatLocaleNumeric()
wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomField.php:1282
CRM_Core_BAO_CustomField::formatDisplayValue()
wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomField.php:1116
CRM_Core_BAO_CustomField::displayValue()
wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php:2388
CRM_Report_Form::alterCustomDataDisplay()
wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php:3293
CRM_Report_Form::sectionTotals()
wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php:2578
CRM_Report_Form::formatDisplay()
wp-content/plugins/civicrm/civicrm/CRM/Report/Form/Contact/Summary.php:154
CRM_Report_Form_Contact_Summary::postProcess()
wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php:956
CRM_Report_Form::preProcess()
wp-content/plugins/civicrm/civicrm/CRM/Report/Form/Contact/Summary.php:125
CRM_Report_Form_Contact_Summary::preProcess()
wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:668
CRM_Core_Form::buildForm()
wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php:76
CRM_Core_QuickForm_Action_Display::perform()
wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203
HTML_QuickForm_Controller::handle()
wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103
HTML_QuickForm_Page::handle()
wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:355
CRM_Core_Controller::run()
wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php:98
CRM_Utils_Wrapper::run()
wp-content/plugins/civicrm/civicrm/CRM/Report/Page/Instance.php:74
CRM_Report_Page_Instance::run()
wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:319
CRM_Core_Invoke::runItem()
wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69
CRM_Core_Invoke::_invoke()
wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36
CRM_Core_Invoke::invoke()
wp-content/plugins/civicrm/civicrm.php:1199
CiviCRM_For_WordPress::invoke()
wp-includes/class-wp-hook.php:308
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:332
WP_Hook::do_action()
wp-includes/plugin.php:517
do_action()
wp-admin/admin.php:259
```
Expected behaviour
----------------------------------------
A CiviCRM report of custom fields and data should be shown.
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.57.1
* __PHP:__ reproduced in 8.1 and 8.0
* __CMS:__ WordPress 6.6.1
* __Database:__ reproduced in MySQL 5.7 and MySQL 8.0
* __Web Server:__ Apache 2.4
Comments
----------------------------------------
Possible fix (submitted via pull request):
CRM/Utils/Number.php Insert the following after line 122.
```php
if ((int) $amount == $amount) {
$amount = intval($amount);
} else {
$amount = floatval($amount);
}
```5.59.0https://lab.civicrm.org/dev/core/-/issues/4096Proposal - change title for all `is_primary` fields to 'Is Primary'2023-02-06T03:57:46ZeileenProposal - change title for all `is_primary` fields to 'Is Primary'I just got REALLY confused trying to import to `Primary Email` - which turns out to be the `is_primary` field - I think we should maybe change to `Is Primary` - @colemanw ?I just got REALLY confused trying to import to `Primary Email` - which turns out to be the `is_primary` field - I think we should maybe change to `Is Primary` - @colemanw ?5.59.0https://lab.civicrm.org/dev/core/-/issues/40955.58 rc upgrade error2023-01-25T23:07:10Zeileen5.58 rc upgrade errorI hit an error in the 5.58rc upgrade script - although oddly enough the sql seems to run when run directly & column type seems to be text
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHan...I hit an error in the 5.58rc upgrade script - although oddly enough the sql seems to run when run directly & column type seems to be text
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => UPDATE `civicrm_option_group` SET `description`
= 'When recording mobile phone numbers for contacts, it may be useful
to include the Mobile Phone Service Provider (e.g. Cingular, Sprint,
etc.). CiviCRM is installed with the most commonly encountered
service providers. Administrators may define as many additional
providers as needed.' WHERE ( `civicrm_option_group`.`id` = 5 )
[nativecode=1406 ** Data too long for column 'description' at row 1]
[type] => DB_Error
[user_info] => UPDATE `civicrm_option_group` SET `description`
= 'When recording mobile phone numbers for contacts, it may be useful
to include the Mobile Phone Service Provider (e.g. Cingular, Sprint,
etc.). CiviCRM is installed with the most commonly encountered
service providers. Administrators may define as many additional
providers as needed.' WHERE ( `civicrm_option_group`.`id` = 5 )
[nativecode=1406 ** Data too long for column 'description' at row 1]5.58.0https://lab.civicrm.org/dev/core/-/issues/4094Admin UI: Attempting to delete custom field group with custom fields opens th...2023-08-12T05:12:29ZlarsssandergreenAdmin UI: Attempting to delete custom field group with custom fields opens the listing page in modal windowIf you:
1. Enable Admin UI
2. Attempt to delete a custom field group that contains at least one custom field
You will get a message that you cannot do this while the field group contains fields (makes sense), but also modal window will...If you:
1. Enable Admin UI
2. Attempt to delete a custom field group that contains at least one custom field
You will get a message that you cannot do this while the field group contains fields (makes sense), but also modal window will open with the main custom field groups listing page again (this should not happen).
![image](/uploads/539ce85d7607649fe04405e3f14c22bf/image.png)
Also, there is no timeout for the alert generated, so it never goes away. Standard 10s for this seems sufficient.
![image](/uploads/2a520630fe49b4290ba54e6167cc3cd3/image.png)
Verified on dmaster (5.59).https://lab.civicrm.org/dev/core/-/issues/4093Searchkit: Change in place edit fields to textarea2023-01-30T08:26:02Zlevi.kSearchkit: Change in place edit fields to textareaOverview
----------------------------------------
Replace some fields in search kit to textarea
Example use-case
----------------------------------------
1. in place editing on a search display can be frustrating when dealing with more ...Overview
----------------------------------------
Replace some fields in search kit to textarea
Example use-case
----------------------------------------
1. in place editing on a search display can be frustrating when dealing with more than a few words of text
2. The main page for Search Kit also suffers from this issue in the new description field (and same goes for label field altough the label field is usually only a few words)
![image](/uploads/ab66207368f4dd446dba6a8571dc5e72/image.png)
inspired by https://lab.civicrm.org/dev/core/-/issues/3893https://lab.civicrm.org/dev/core/-/issues/4092Resubscribe request processing crashes, blocks cron job2023-01-31T08:29:15ZBobSResubscribe request processing crashes, blocks cron jobOverview
----------------------------------------
When CiviCRM performs bounce processing, a resubscribe request email results in a call to CRM_Mailing_Event_BAO_Resubscribe::resub_to_mailing() which fails as that class does not exist. A...Overview
----------------------------------------
When CiviCRM performs bounce processing, a resubscribe request email results in a call to CRM_Mailing_Event_BAO_Resubscribe::resub_to_mailing() which fails as that class does not exist. As the error occurs before the offending email is removed from the Inbox, subsequent invocations of "civicrm-api job.execute" continue to fail.
Reproduction steps
----------------------------------------
1. Unsubscribe from an email list.
2. Receive confirmation email with the message ```You can re-subscribe by mailing mailto:bounce+e.[redacted]@mydomain.org```
3. Send an email to that address.
In addition, clicking the link in the email fails for the same reason.
Current behaviour
----------------------------------------
* Popup indicating "Cron not running".
* Mail processing (and presumably other scheduled jobs) not running.
* Drupal log entry: ```Error: Class 'CRM_Mailing_Event_BAO_Resubscribe' not found in civicrm_api3_mailing_event_resubscribe_create() (line 29 of /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/api/v3/MailingEventResubscribe.php).```
Expected behaviour
----------------------------------------
Contact resubscribed.
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 necessary. -->
* __CiviCRM:__ _5.57.0_
* __PHP:__ _7.4.33_
* __CMS:__ _Drupal 7.91_
* __Database:__ _MariaDB 10.4_
* __Web Server:__ _Apache 2.4_
Comments
----------------------------------------
* Most recent bounce+e email we've received before this one was in 11/21, and that caused no issues.
* Marking this Confidential as it could be used in a type of Denial of Service attack, preventing CiviCRM sites from sending email/SMS.5.57.3https://lab.civicrm.org/dev/core/-/issues/4091Smart group contacts from custom search show wrong results2023-02-06T04:26:31ZyashodhaSmart group contacts from custom search show wrong resultsSteps to replicate :
--------------------
- Create a smart group from any of the custom searches
- Remove a few contacts from the smart group
- Go to _Manage Groups_, the count is correct but when you click Contacts link it shows remove...Steps to replicate :
--------------------
- Create a smart group from any of the custom searches
- Remove a few contacts from the smart group
- Go to _Manage Groups_, the count is correct but when you click Contacts link it shows removed Contacts as well.
Count (correct)
![count](/uploads/0875a1556b0aa8bcd8a619d47e22d7fa/count.png)
Contacts link (wrong)
![wrong_results](/uploads/f4d8b04b546712f5166b3424c4263fe7/wrong_results.png)
- Go to _Find Contacts_, search for the smart group - it works as expected
![smart_](/uploads/a5491f1eea0ec5474d003c8aaa70a58a/smart_.png)yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/4090Managed Entity reconciliation fails if entity exists without Managed entity2023-06-08T16:37:28Zaydunsaidan.saunders@squiffle.ukManaged Entity reconciliation fails if entity exists without Managed entityOverview
----------------------------------------
Follow along now: "Managed Entities" involve both a `Managed` entity and the entity being managed. If the managed entity exists but the corresponding `Managed` entity does not, errors a...Overview
----------------------------------------
Follow along now: "Managed Entities" involve both a `Managed` entity and the entity being managed. If the managed entity exists but the corresponding `Managed` entity does not, errors are thrown.
For example, if an extension provides a `.mgd.php` file specifying a `PaymentProcessorType` entity, the reconciliation process will create the `PaymentProcessorType` entity and a `Managed` entity and then manage updates or deletion when the extension is updated or uninstalled.
In some (unknown) circumstances, the `Managed` entity does not exist but the managed (eg `PaymentProcessorType`) entity does exist. `CRM_Core_ManagedEntities::reconcile()` does not check for the existence of the `PaymentProcessorType` entity and so attempts to create a duplicate which fails. This happens any time a cache clear occurs.
Reproduction steps
----------------------------------------
I don't know how this has occurred on live systems, but to simulate:
1. Install Stripe (or other extension with `.mgd.php`)
2. Delete the `Managed` entity for Stripe: `cv api4 Managed.delete +w 'name = "Stripe"'`
3. `cv flush`
Current behaviour
----------------------------------------
```
$ cv flush
Flushing system caches
Error: API Call Failed: Array
(
[entity] => System
[action] => flush
[params] => Array
(
[debug] => 1
[version] => 3
)
[result] => Array
(
[trace] => #0 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(192): CRM_Core_ManagedEntities->onApiError()
#1 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(152): CRM_Core_ManagedEntities->insertNewEntity()
#2 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(113): CRM_Core_ManagedEntities->reconcileEntities()
#3 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(417): CRM_Core_ManagedEntities->reconcile()
#4 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/api/v3/System.php(33): CRM_Core_Invoke::rebuildMenuAndCaches()
#5 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_system_flush()
#6 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(158): Civi\API\Provider\MagicFunctionProvider->invoke()
#7 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest()
#8 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/api/api.php(22): Civi\API\Kernel->runSafe()
#9 phar:///opt/buildkit/bin/cv/src/Command/BaseCommand.php(63): civicrm_api()
#10 phar:///opt/buildkit/bin/cv/src/Command/FlushCommand.php(37): Civi\Cv\Command\BaseCommand->callApiSuccess()
#11 phar:///opt/buildkit/bin/cv/vendor/symfony/console/Command/Command.php(255): Civi\Cv\Command\FlushCommand->execute()
#12 phar:///opt/buildkit/bin/cv/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#13 phar:///opt/buildkit/bin/cv/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#14 phar:///opt/buildkit/bin/cv/src/Application.php(82): Symfony\Component\Console\Application->doRun()
#15 phar:///opt/buildkit/bin/cv/vendor/symfony/console/Application.php(149): Civi\Cv\Application->doRun()
#16 phar:///opt/buildkit/bin/cv/src/Application.php(49): Symfony\Component\Console\Application->run()
#17 phar:///opt/buildkit/bin/cv/bin/cv(27): Civi\Cv\Application::main()
#18 /opt/buildkit/bin/cv(14): require('phar:///opt/bui...')
#19 {main}
[is_error] => 1
[error_message] => API error: DB Error: already exists on PaymentProcessorType.create( entity name Stripe)
)
)
```
Expected behaviour
----------------------------------------
No error - or at least a helpful error message.
I think `reconcile()` could just create the missing `Managed` entity but there may be other ramifications of doing that.
Environment information
----------------------------------------
* __CiviCRM:__ _Master_
Comments
----------------------------------------
_Anything else you would like the reviewer to note._