CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2023-01-10T09:30:32Zhttps://lab.civicrm.org/dev/core/-/issues/4067Contact dashboard - Pledges section always says "no pledges" when using checksum2023-01-10T09:30:32ZDaveDContact dashboard - Pledges section always says "no pledges" when using checksumIf a contact has pledges, then the contact dashboard (e.g. /civicrm/user?id=12) will show the pledges for the logged in user, or for logged in admins who have access. But when visiting as anonymous and using a checksum, the other section...If a contact has pledges, then the contact dashboard (e.g. /civicrm/user?id=12) will show the pledges for the logged in user, or for logged in admins who have access. But when visiting as anonymous and using a checksum, the other sections display the same but the pledges says "no pledges".
I can reproduce on master (note dmaster.demo does not set permissions for anonymous access to contact dashboard even with checksum so can't do it there), and it goes back to at least 5.35 so I don't know how old it is.https://lab.civicrm.org/dev/core/-/issues/4064Off-line Contribution receipts are sent to on hold emails2023-04-22T16:38:36ZlarsssandergreenOff-line Contribution receipts are sent to on hold emailsIf you record an off-line contribution for a contact with an email on hold, the option to send them a receipt at their on-hold email address is shown (with no indication that the email is on hold).
I would think the expected behaviour w...If you record an off-line contribution for a contact with an email on hold, the option to send them a receipt at their on-hold email address is shown (with no indication that the email is on hold).
I would think the expected behaviour would be to not show the receipt option if the contributor's email is on hold.https://lab.civicrm.org/dev/core/-/issues/4061Send letter in bulk to pledgers2023-01-10T09:34:22ZyashodhaSend letter in bulk to pledgersFunctional specifications:
- We are replicating the existing feature for contributions “Thank you letters - print or email” for the pledges.
- In menu Pledges, Find Pledges, make the Pledge statuses Pending, In progress and Overdue sele...Functional specifications:
- We are replicating the existing feature for contributions “Thank you letters - print or email” for the pledges.
- In menu Pledges, Find Pledges, make the Pledge statuses Pending, In progress and Overdue selected by default
- In menu Actions, add “Pledge Letters - print or email”
- When we select “Pledge Letters - print or email”, we land on a screen (replicate of the one for contributions)
- Replace Thank-you Letter for Contributions (PDF) by Pledge Letter
- Replace Update thank-you dates for these contributions by Update pledge letter dates for these pledges
- Remove Update receipt dates for these contributions
- Replace MAKE THANK-YOU LETTERS by MAKE PLEDGE LETTERS
The following tokens need to be available in the drop down Tokens so they can be included in a message template and resolved when included in the letter:
- Total pledge amount
- Total pledge payments
- Pledge balance
- Upcoming pledge payment amount
- Upcoming pledge payment due datehttps://lab.civicrm.org/dev/core/-/issues/4058Search Tasks limited by certain ACLs when they should not be2023-01-10T09:35:37ZRichSearch Tasks limited by certain ACLs when they should not beSometimes an incomplete list of search tasks are shown to a user whose access is ACL limited.
I think this problem is caused by this line:
https://lab.civicrm.org/dev/core/-/blob/5.56/CRM/ACL/BAO/ACL.php#L503
I think the loop `break`s...Sometimes an incomplete list of search tasks are shown to a user whose access is ACL limited.
I think this problem is caused by this line:
https://lab.civicrm.org/dev/core/-/blob/5.56/CRM/ACL/BAO/ACL.php#L503
I think the loop `break`s when it shouldn't. I think what's intended is to simply shift that `break` up within the `if {}` that ends on the line above it.
I think the intention of the code is:
- loop through the DAO results that lists permissions
- if the object_id is empty (typically, zero) then the permission applies to all "objects of that type" by which I think it means groups.
- there's an allowance that this record might be for a different permission type (e.g. View instead of Edit) which we would want to ignore
- if the type does match, then all groups are permissioned and we merge those onto our `$ids` array
However where it fails is if there are, say, 2 rows returned. The first says View all, the 2nd says Edit all, and we're asking about edit permission. Because of the `break` where it is, once the first row is looked at and discarded, we break and don't loko at the 2nd row!
Shifting the `break` up seems to fix this and seems to me to be probably what was intended.
Because this bug is highly sensitive to a load of stuff, it's likely that this shows up in weird situations and could be hard to reproduce.
If this makes sense to anyone I'll submit a PR.
In case it's helpful, my proposal is
```diff
diff --git a/sites/all/modules/civicrm/CRM/ACL/BAO/ACL.php b/sites/all/modules/civicrm/CRM/ACL/BAO/ACL.php
index 58b388b73..3d036a3a3 100644
--- a/CRM/ACL/BAO/ACL.php
+++ b/CRM/ACL/BAO/ACL.php
@@ -499,8 +499,8 @@ ORDER BY a.object_id
foreach ($allGroups as $id => $dontCare) {
$ids[] = $id;
}
+ break;
}
- break;
}
}
return $ids;
```https://lab.civicrm.org/dev/core/-/issues/4057Cannot remove contact from group from Groups tab UI within ACL environment2023-01-10T09:36:07ZRichCannot remove contact from group from Groups tab UI within ACL environmentHave a staff user, *Pebbles*, in an ACL, with access to a contact, *Wilma*.
When Pebbles views the Groups tab of Wilma's record, they are able to add Wilma to a group via the UI, but should they click **remove** or **delete** next to a ...Have a staff user, *Pebbles*, in an ACL, with access to a contact, *Wilma*.
When Pebbles views the Groups tab of Wilma's record, they are able to add Wilma to a group via the UI, but should they click **remove** or **delete** next to a group, an error shows:
> API permission check failed for GroupContact/delete call; insufficient permission: require access CiviCRM and edit all contacts
I don't think this is a security/permissions thing.
Pebbles is able to remove Wilma from the group by simply clicking Edit to get to the hideous edit-flippin-everything form, and then removing the group from the select2 element in the Groups accordion.
## Suggested fix (v1)
I think it's useful for ACL-ed staffers to be able to use groups; it's such a core feature of Civi. And it's fairly weird that they can add a contact to a group, but not remove one - or not by the main UI.
I implemented this as follows in a custom extension, but I'm sure there's a better way to do it upstream.
```
/**
* @see https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_alterAPIPermissions/
*/
function myextension_civicrm_alterAPIPermissions($entity, $action, &$params, &$permissions) {
if ($entity === 'group_contact' && $action == 'delete' && !empty($params['id'])) {
$gc = \Civi\Api4\GroupContact::get(FALSE)
->addWhere('id', '=', $params['id'])
->addSelect('contact_id', 'group_id.group_type:name')
->execute()->single();
$mayEditContact = \Civi\Api4\Contact::checkAccess()
->setAction('update')
->addValue('id', $gc['contact_id'])
->execute()->first()['access'] ?? FALSE;
$groupIsNotAcl = !in_array('Access Control', $gc['group_id.group_type:name'] ?? []);
if ($mayEditContact && $groupIsNotAcl) {
// Reduce the access permissions for this call.
$permissions['group_contact']['delete'] = 'access CiviCRM';
}
}
}
```https://lab.civicrm.org/dev/core/-/issues/4054Redis cache of Extensions persists between builds2023-01-05T21:57:54ZeileenRedis cache of Extensions persists between buildsI'm hitting an issue where if I run civibuild to rebuild a site shortly after enabling afform it fails - the reason is the Redis cache is used to retrieve enabled extensions, including afform so the afform alterMenu hook is called when i...I'm hitting an issue where if I run civibuild to rebuild a site shortly after enabling afform it fails - the reason is the Redis cache is used to retrieve enabled extensions, including afform so the afform alterMenu hook is called when installing CiviCRM - but the extension is not yet installed & hence the function fatals as it fails to find the Afform class it calls
When determining which hook is called we see
```
/**
* @param $moduleList
*/
public function requireCiviModules(&$moduleList) {
$civiModules = CRM_Core_PseudoConstant::getModuleExtensions();
```
This winds up at
![image](/uploads/e0a82bcf50371e56217b8a0d5c048e2a/image.png)
And it gets the previous build's module list here
![image](/uploads/69f06caeb86421b3923c41e152028f23/image.png)
The cache name is a bit convoluted - but it should be flushed on install to avoid this between-install leakage.
I'm not quite sure where though ... @tottenhttps://lab.civicrm.org/dev/core/-/issues/4047htmlspecialchars() issue on PHP8 and CiviReport2023-01-04T07:44:17ZJonGoldhtmlspecialchars() issue on PHP8 and CiviReport**Note** I've been seeing this `htmlspecialchars()` error on this line frequently on PHP 8. This is just the one instance I investigated thoroughly.
When attempting to use a particular CiviReport instance, we get a WSOD with this error...**Note** I've been seeing this `htmlspecialchars()` error on this line frequently on PHP 8. This is just the one instance I investigated thoroughly.
When attempting to use a particular CiviReport instance, we get a WSOD with this error in watchdog:
```
TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, array given in htmlspecialchars() (line 144 of /var/www/mysite/vendor/civicrm/civicrm-packages/HTML/Common.php)
#0 /home/jon/local/mysite/vendor/civicrm/civicrm-packages/HTML/Common.php(144): htmlspecialchars()
#1 /home/jon/local/mysite/vendor/civicrm/civicrm-packages/HTML/QuickForm/input.php(154): HTML_Common->_getAttrString()
#2 /home/jon/local/mysite/vendor/civicrm/civicrm-packages/HTML/QuickForm/Renderer/Array.php(307): HTML_QuickForm_input->toHtml()
#3 /home/jon/local/mysite/vendor/civicrm/civicrm-packages/HTML/QuickForm/Renderer/ArraySmarty.php(189): HTML_QuickForm_Renderer_Array->_elementToArray()
#4 /home/jon/local/mysite/vendor/civicrm/civicrm-core/CRM/Core/Form/Renderer.php(87): HTML_QuickForm_Renderer_ArraySmarty->_elementToArray()
#5 /home/jon/local/mysite/vendor/civicrm/civicrm-packages/HTML/QuickForm/Renderer/Array.php(221): CRM_Core_Form_Renderer->_elementToArray()
#6 /home/jon/local/mysite/vendor/civicrm/civicrm-packages/HTML/QuickForm/element.php(415): HTML_QuickForm_Renderer_Array->renderElement()
#7 /home/jon/local/mysite/vendor/civicrm/civicrm-packages/HTML/QuickForm.php(1705): HTML_QuickForm_element->accept()
#8 /home/jon/local/mysite/vendor/civicrm/civicrm-core/CRM/Core/Form.php(1136): HTML_QuickForm->accept()
#9 /home/jon/local/mysite/vendor/civicrm/civicrm-core/CRM/Core/QuickForm/Action/Display.php(95): CRM_Core_Form->toSmarty()
#10 /home/jon/local/mysite/vendor/civicrm/civicrm-core/CRM/Core/QuickForm/Action/Display.php(83): CRM_Core_QuickForm_Action_Display->renderForm()
#11 /home/jon/local/mysite/vendor/civicrm/civicrm-packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform()
#12 /home/jon/local/mysite/vendor/civicrm/civicrm-packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle()
#13 /home/jon/local/mysite/vendor/civicrm/civicrm-core/CRM/Core/Controller.php(355): HTML_QuickForm_Page->handle()
#14 /home/jon/local/mysite/vendor/civicrm/civicrm-core/CRM/Utils/Wrapper.php(98): CRM_Core_Controller->run()
#15 /home/jon/local/mysite/vendor/civicrm/civicrm-core/CRM/Report/Page/Instance.php(74): CRM_Utils_Wrapper->run()
#16 /home/jon/local/mysite/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(319): CRM_Report_Page_Instance->run()
#17 /home/jon/local/mysite/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem()
#18 /home/jon/local/mysite/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke()
#19 /home/jon/local/mysite/web/modules/contrib/civicrm/src/Civicrm.php(88): CRM_Core_Invoke::invoke()
#20 /home/jon/local/mysite/web/modules/contrib/civicrm/src/Controller/CivicrmController.php(80): Drupal\civicrm\Civicrm->invoke()
#21 [internal function]: Drupal\civicrm\Controller\CivicrmController->main()
#22 /home/jon/local/mysite/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#23 /home/jon/local/mysite/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#24 /home/jon/local/mysite/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#25 /home/jon/local/mysite/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#26 /home/jon/local/mysite/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#27 /home/jon/local/mysite/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#28 /home/jon/local/mysite/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#29 /home/jon/local/mysite/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#30 /home/jon/local/mysite/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#31 /home/jon/local/mysite/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#32 /home/jon/local/mysite/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#33 /home/jon/local/mysite/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#34 /home/jon/local/mysite/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#35 /home/jon/local/mysite/web/core/lib/Drupal/Core/DrupalKernel.php(707): Stack\StackedHttpKernel->handle()
#36 /home/jon/local/mysite/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#37 {main}
```
I tracked it down to my `form_values` which is this:
```
a:27:{s:6:"fields";a:4:{s:9:"sort_name";s:1:"1";s:8:"event_id";s:1:"1";s:9:"status_id";s:1:"1";s:7:"role_id";s:1:"1";}s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:8:"email_op";s:3:"has";s:11:"email_value";s:0:"";s:11:"event_id_op";s:2:"in";s:14:"event_id_value";a:0:{}s:6:"sid_op";s:2:"in";s:9:"sid_value";a:0:{}s:6:"rid_op";s:2:"in";s:9:"rid_value";a:0:{}s:34:"participant_register_date_relative";s:1:"0";s:30:"participant_register_date_from";s:0:"";s:28:"participant_register_date_to";s:0:"";s:6:"eid_op";s:2:"in";s:9:"eid_value";a:0:{}s:11:"custom_4_op";s:2:"in";s:14:"custom_4_value";a:0:{}s:16:"blank_column_end";s:0:"";s:11:"description";s:44:"Provides lists of participants for an event.";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:16:"access CiviEvent";s:6:"groups";s:0:"";s:7:"options";N;s:9:"domain_id";i:1;}
```
Unserialized:
```
array (
'fields' =>
array (
'sort_name' => '1',
'event_id' => '1',
'status_id' => '1',
'role_id' => '1',
),
'sort_name_op' => 'has',
'sort_name_value' => '',
'email_op' => 'has',
'email_value' => '',
'event_id_op' => 'in',
'event_id_value' => array (),
'sid_op' => 'in',
'sid_value' => array (),
'rid_op' => 'in',
'rid_value' => array (),
'participant_register_date_relative' => '0',
'participant_register_date_from' => '',
'participant_register_date_to' => '',
'eid_op' => 'in',
'eid_value' => array (),
'custom_4_op' => 'in',
'custom_4_value' => array (),
'blank_column_end' => '',
'description' => 'Provides lists of participants for an event.',
'email_subject' => '',
'email_to' => '',
'email_cc' => '',
'permission' => 'access CiviEvent',
'groups' => '',
'options' => NULL,
'domain_id' => 1,
)
```
The issue is `custom_4`, which is save as `in` `array()`. However, this is (and always has been) a free-entry text field, so "IN" should never have been an option. Pre-PHP8, this was ignored, now it's a fatal error.
I see @seamuslee made a [partial fix](https://github.com/civicrm/civicrm-packages/pull/346) but I'll submit a patch to handle the "empty array" case.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/4042Link to import search display goes to front end form in wordpress2022-12-20T10:02:03ZeileenLink to import search display goes to front end form in wordpressAfter doing an import with Civi-Import enabled there is a link from the import summary screen to the error page (perhaps not if there are no errors?) - that links to the search kit display, filtered for errors - but on Wordpress I'm lan...After doing an import with Civi-Import enabled there is a link from the import summary screen to the error page (perhaps not if there are no errors?) - that links to the search kit display, filtered for errors - but on Wordpress I'm landing on a front end url.
E.g you can go back to the contact summary screen via Reports->My imports
![image](/uploads/f729ec641ae159fdbf18e922fc4f12b9/image.png)
And I'm looking at the link to view errors
![image](/uploads/05b060cfa95c0b5371a3e104235db5c0/image.png)
On drupal I correctly end up at https://dmaster.localhost:32353/civicrm/search#/display/Import_5/Import_5?_status=ERROR
Currently it is being assigned [here](https://github.com/civicrm/civicrm-core/blob/da9cd2454fbca7e38a78f7cb1539decaa5c2f4ff/ext/civiimport/civiimport.php#L278) in a non-WP-friendly way
```
if ($formName === 'CRM_Contact_Import_Form_Summary') {
$form->assign('downloadErrorRecordsUrl', '/civicrm/search#/display/Import_' . $form->getUserJobID() . '/Import_' . $form->getUserJobID() . '?_status=ERROR');
}
```
On my WP site the search display url is
The correct url is
https://bepartoftheart.co.nz/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fsearch#/display/Import_36/Import_36
- with the `_status=Error` added - which doesn't seem to work...
But the things I tried to generate the url didn't work...
```
if ($formName === 'CRM_Contact_Import_Form_Summary') {
$form->assign('downloadErrorRecordsUrl', CRM_Utils_System::url('civicrm/search', ['_status'=> 'ERROR'], FALSE, '/display/Import_' . $form->getUserJobID() . '/Import_' . $form->getUserJobID(), FALSE, TRUE));
}
```
But wind up at
https://bepartoftheart.co.nz/civicrm/search/?_status=ERROR#/display/Import_36/Import_36
Or
```
if ($formName === 'CRM_Contact_Import_Form_Summary') {
$form->assign('downloadErrorRecordsUrl', CRM_Utils_System::url('civicrm/search/display/Import_' . $form->getUserJobID() . '/Import_' . $form->getUserJobID(), ['_status'=> 'ERROR'], FALSE, NULL, FALSE, TRUE));
}
```
But wind up at
https://bepartoftheart.co.nz/civicrm/search/display/Import_36/Import_36/?_status=ERRORdhttps://lab.civicrm.org/dev/core/-/issues/4030Searchkit: Escaping for regex breaks search with join2022-12-12T08:10:01ZlarsssandergreenSearchkit: Escaping for regex breaks search with joinIf you try a Searchkit search for Addresses with Street Address matching pattern `[a-z]\s`, the results will return as expected, with the regex pattern shown as `"[a-z]\\s"`. However, if you do a search for Contacts with or without Addre...If you try a Searchkit search for Addresses with Street Address matching pattern `[a-z]\s`, the results will return as expected, with the regex pattern shown as `"[a-z]\\s"`. However, if you do a search for Contacts with or without Addresses with Street Address matching pattern `[a-z]\s`, the results will be borked because the pattern will be `"\"[a-z]\\\\s\""`. Similar results are found with other fields or entities.
Tested on dmaster (5.58) and 5.49.5.https://lab.civicrm.org/dev/core/-/issues/4025Import Memberships: activity date set to date of import instead of Membership...2023-11-08T00:50:05ZcomposerjkImport Memberships: activity date set to date of import instead of Membership Start DateOverview
----------------------------------------
For _Memberships > Import Memberships_, I would expect that the _Activity Date_ for _Membership Signup_ would be the required _Membership Start Date_. Instead, when one views Activities,...Overview
----------------------------------------
For _Memberships > Import Memberships_, I would expect that the _Activity Date_ for _Membership Signup_ would be the required _Membership Start Date_. Instead, when one views Activities, the _Membership Signup_ activity date is the date/time of the import.
Query on chat.civicrm.org (no replies, yet): https://chat.civicrm.org/civicrm/pl/jgrmtpxr878w3fbtrm6iia4rsw
It looks like @petednz also mentioned this issue back in 2017: https://chat.civicrm.org/civicrm/pl/sbj5yeuccfr65yy9wwmam3mxte
Reproduction steps
----------------------------------------
1. _Memberships > Import Memberships_ for an existing contact with a Membership Start Date set to some date in the past.
1. View the Membership Signup activity, perhaps via _Search > Find Activities_.
Current behaviour
----------------------------------------
The listed Activity Date is the date of the import.
Expected behaviour
----------------------------------------
I would expect that the _Activity Date_ would be the _Membership Start Date_, similar to how the _Activity Date_ for a _Contribution_ is set to the _Payment Received Date_.
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.56.0, 5.55.2, 5.55.0, 5.54.0
- __CMS:__ WordPress 6.1.1
- __PHP:__ 8.1.13 (fpm-fcgi)
- __Database:__ 10.3.31-MariaDB engine: InnoDB 10 row format: Dynamic
- __Webserver:__ nginx/1.20.2
- __OS:__ Linux
Comments
----------------------------------------
In my case, part of this is maintaining history. At some point, I hope to import data for membership archives going back 80 years. From @petednz's mention, it sounds like the _Membership Dashboard_ will also look wrong.https://lab.civicrm.org/dev/core/-/issues/4024progress output on stdout when emails are processed as activities2022-12-08T09:43:19Zsebalisprogress output on stdout when emails are processed as activitiesOn a CiviCRM instance I administrate, the Civi cron job is run via “cv api job.execute” with appropriate user and cwd parameters. The output is normally in JSON, so I decided to parse the output to see if there have been any problems. If...On a CiviCRM instance I administrate, the Civi cron job is run via “cv api job.execute” with appropriate user and cwd parameters. The output is normally in JSON, so I decided to parse the output to see if there have been any problems. If there are no problems, I suppress the output completely, to prevent Linux cron (which triggers the whole thing) from sending an automatic email to the admins. This has worked well so far.
For a short while we have defined two new email accounts that we use for “email to activity”. When there are new emails, we now get output on stdout that makes it impossible to parse the output as JSON. This prevents making the automatic decision on whether there has been a problem, so I revert to sending an email and I keep the output.
I looked into the cause and found that CRM/Utils/Mail/EmailProcessor.php contains several lines that write to stdout. To me these outputs should better go to the CiviCRM log or to stderr. But I don’t know what standards you follow for this or other components, so at this point I am not able to submit a pull request.
You can find the output I am referring to by searching CRM/Utils/Mail/EmailProcessor.php for the string “echo”. I quote them here, together with my opinion of what I would do with them (biased because of my current problem of course):
```
212 catch (Exception $e) {
213 echo $e->getMessage();
214 $store->markIgnored($key);
215 continue;
216 }
```
This seems better placed on stderr or as an error entry in the Civi log.
```
229 echo "Failed Processing: {$mail->subject}. Reason: {$result['error_message']}\n";
```
Same as above.
```
234 echo "Processed as Activity: {$mail->subject}\n";
```
This is the line I regularly get. I think a Civi log entry with an appropriate level below warning should be enough, or it should go to stderr.
```
391 echo "Failed Processing: {$mail->subject}, Action: $action, Job ID: $job, Queue ID: $queue, Hash: $hash. Reason: {$r esult['error_message']}\n";
```
Same as earlier, error entry in the Civi log or stderr
These lines have been around for many years (I checked), and there might be similar examples in several other places. Again, I don’t know what your conventions are.https://lab.civicrm.org/dev/core/-/issues/4023Check Clean URLs check: Frequent error noise when no contribution pages and p...2022-12-08T09:42:33ZJonGoldCheck Clean URLs check: Frequent error noise when no contribution pages and public can't access events#### Replication Steps
* Be on WordPress.
* Have no contribution pages.
* Have at least 1 active event.
* Remove "CiviEvent: register for events" permission from anonymous user.
Get a bunch of these errors:
```
[error]
$Fatal Error De...#### Replication Steps
* Be on WordPress.
* Have no contribution pages.
* Have at least 1 active event.
* Remove "CiviEvent: register for events" permission from anonymous user.
Get a bunch of these errors:
```
[error]
$Fatal Error Details = array:3 [
"message" => "You do not have permission to access this page."
"code" => null
"exception" => CRM_Core_Exception {#8688
#message: "You do not have permission to access this page."
#code: 0
#file: "/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php"
#line: 615
#cause: null
-_trace: null
-errorData: array:1 [
"error_code" => 0
]
trace: {
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php:615 {
› $civicrm_wp_title = ts('You do not have permission to access this page.');
› throw new CRM_Core_Exception(ts('You do not have permission to access this page.'));
› }
}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php:62 { …}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Event/Page/EventInfo.php:42 { …}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:319 { …}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm.php:1199 { …}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/includes/civicrm.basepage.php:380 { …}
/home/jon/local/nmysite/web/wp-includes/class-wp-hook.php:308 { …}
/home/jon/local/nmysite/web/wp-includes/class-wp-hook.php:332 { …}
/home/jon/local/nmysite/web/wp-includes/plugin.php:565 { …}
/home/jon/local/nmysite/web/wp-includes/class-wp.php:797 { …}
/home/jon/local/nmysite/web/wp-includes/functions.php:1332 { …}
/home/jon/local/nmysite/web/wp-blog-header.php:16 { …}
/home/jon/local/nmysite/web/index.php:17 { …}
}
}
]
```
I want to ping Eli Lisseck but I don't think they're pingable?https://lab.civicrm.org/dev/core/-/issues/4019Contribution page with recurring payment and Separate membership payment fail...2023-11-23T06:52:26ZshaneonabikeContribution page with recurring payment and Separate membership payment fails to pass contributionRecurIDOverview
----------------------------------------
_Sorry for the long title_
Contribution pages which are setup with recurring memberships, additional contribution amounts, and separate membership payment result in no ```contributionRec...Overview
----------------------------------------
_Sorry for the long title_
Contribution pages which are setup with recurring memberships, additional contribution amounts, and separate membership payment result in no ```contributionRecurID``` being setup and therefore (in the case of [iATS](https://github.com/iATSPayments/com.iatspayments.civicrm/issues/397)) no recurring payment setup.
In the case of iATS, and probably other payment processors, this ID is actually used to setup the recurring payment. Ironicaly, the is_recur is being passed so this seems clearly a bug.
Reproduction steps
----------------------------------------
1. Create a Membership Contribution page
2. Check-off Contribution Amounts section enabled
2. Add a few additional contribution amounts
3. Don't set recurring for the Contribution Amounts (although another interesting testing scenario)
4. Add a Membership with the option to renew
5. Check off Separate Membership payment_ <== this is the key
6. Use this form (test or live)
7. Choose not to add an additional contribution
8. Choose your membership and check-off auto-renew
9. Process the form
10. No client code is returned, client is set as auto-renew but there is no payment token setup (```contributionRecurID```)
![201234614-daaba710-a38d-4628-a843-951a2152dcf8](/uploads/886562673d42fb45f1e1ebb38903b971/201234614-daaba710-a38d-4628-a843-951a2152dcf8.png)
Current behaviour
----------------------------------------
The following occurs:
+ Membership transaction is made with ```is_recur``` set, but no ```contributionRecurID``` set
+ Transaction completes, but no recurring account is created (at least for iATS) because of missing ID
Ironically, turning off the ```Separate Contribution Amount``` results in the ID to be created, and everything runs smoothly. The problem with this scenario is there are loads of people who might want to do a one-time donation, but not have that repeat each year.
```
nov. 10 19:06:12 [warning] params array (
'qfKey' => 'cut',
'entryURL' => 'cut',
'email-Primary' => 'cut',
'first_name' => 'Administrateur',
'last_name' => 'SymbioTIC',
'street_address-1' => '312312',
'city-1' => '312',
'postal_code-1' => '312',
'country-1' => '1039',
'state_province-1' => '1110',
'phone-Primary-1' => '321312',
'preferred_language' => 'fr_CA',
0 => '',
1 => '',
'group' =>
array (
2 => '',
3 => '',
),
'custom_11' => 'test',
'contact_sub_type_hidden' => 'Membre_ami',
'hidden_processor' => '1',
'credit_card_number' => 'testcc',
'cvv2' => '123',
'credit_card_exp_date' =>
array (
'm' => '5',
'Y' => '2032',
),
'credit_card_type' => 'Visa',
'billing_first_name' => 'Administrateur',
'billing_middle_name' => '',
'billing_last_name' => 'SymbioTIC',
'billing_street_address-5' => '312312',
'billing_city-5' => '312',
'billing_state_province_id-5' => '1110',
'billing_postal_code-5' => '312',
'billing_country_id-5' => '1039',
'payment_processor_id' => '4',
'auto_renew' => true,
'priceSetId' => '9',
'price_16' => '60',
'price_18' => '-1',
'selectProduct' => '',
'MAX_FILE_SIZE' => '83886080',
'ip_address' => 'cut',
'amount' => '30.000000000',
'amount_level' => 'null',
'selectMembership' => '4',
'year' => '2032',
'month' => '5',
'card_type_id' => 1,
'pan_truncation' => '2220',
'currencyID' => 'CAD',
'is_pay_later' => 0,
'is_recur' => 1,
'frequency_interval' => '1',
'frequency_unit' => 'year',
'invoiceID' => 'cut',
'is_quick_config' => 1,
'email-5' => 'cut',
'description' => 'Contribution en ligne: Adhésion Membre Ami',
'accountingCode' => NULL,
'is_test' => 1,
'campaign_id' => NULL,
'middle_name' => '',
'email' => 'cut',
'street_address' => '312312',
'city' => '312',
'state_province' => 'QC',
'postal_code' => '312',
'country' => 'CA',
'cms_contactID' => '2',
'skipLineItem' => 1,
'total_amount' => '30.000000000',
'tax_amount' => 0.0,
'contactID' => '2',
'financialTypeID' => '2',
'trxn_id' => NULL,
'contributionID' => 384,
)
nov. 10 19:06:12 [warning] is_recur: false
```
Expected behaviour
----------------------------------------
+ Choosing ```Separate Contribution Amount``` should not lead to a missing ContributionRecurID
+ ID is passed and a recurring account is created properlyhttps://lab.civicrm.org/dev/core/-/issues/4011Formbuilder: Error in date selection of grouped activities2022-11-30T08:39:02ZjmargrafFormbuilder: Error in date selection of grouped activitiesOverview
----------------------------------------
The data range picker of the Formbuilder does not work for Activities grouped by acitivity_type.
It should show the sum of activities per activity_type in a defined data range.
Instead th...Overview
----------------------------------------
The data range picker of the Formbuilder does not work for Activities grouped by acitivity_type.
It should show the sum of activities per activity_type in a defined data range.
Instead the result always shows the total sum of activities per activitiy_type - no matter what date range i select.
Reproduction steps
----------------------------------------
1. create a new Packaged Search with Searchkit. [saved-search.txt](/uploads/ecc2154067e2c15e2993679fd645ff54/saved-search.txt) with the following API Query Info:
```
{
"version": 4,
"select": [
"COUNT(subject) AS COUNT_subject",
"activity_type_id:label"
],
"orderBy": [],
"where": [],
"groupBy": [
"activity_type_id"
],
"join": [],
"having": []
}
```
2. Create an Table to view the Saved Search in a Table
3. Create a new Search Form with Formbuilder using this Saved Search Table
```
<div af-fieldset="">
<af-field name="activity_date_time" defn="{input_type: 'Select', search_range: true, input_attrs: {}}" />
<crm-search-display-table search-name="debug_activity" display-name=""></crm-search-display-table>
</div>
```
4. Add the date picker "date of the activity"
5. Use the Formbuilder and search for grouped data in a certain time range
Current behaviour
----------------------------------------
`COUNT_subject` does always show the same sum, no matter what date selection i choose
![data-range-2](/uploads/7612612fbe53450efee51373fa9f6000/data-range-2.png)
![issue-data-range-no-selection](/uploads/9dd3650f48840c5e1405db15433003c5/issue-data-range-no-selection.png)
![issue-data-range](/uploads/840e2efea6d12f4a6baf15b55bddf833/issue-data-range.png)
Expected behaviour
----------------------------------------
`COUNT_subject` should show the number of activities of a certain actitity_type in the defined data range.
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 107.0
* __CiviCRM:__ 5.50.4
* __PHP:__ 7.4.33
* __CMS:__ Drupal 9.4.8
* __Database:__ MySQL 5.7.7/MariaDB 10.4/..._
* __Web Server:__ _Apache 2.4/Nginx 1.16/..._
Comments
----------------------------------------
_Anything else you would like the reviewer to note._https://lab.civicrm.org/dev/core/-/issues/4003Adding contacts via profile should reflect in source2023-01-24T16:14:59ZyashodhaAdding contacts via profile should reflect in source It would be helpful to have source field reflect the date of creation of contact and profile used.
**Proposal**
When a contact is created via a standalone profile, this information is added to the source field of the contact.
It shou... It would be helpful to have source field reflect the date of creation of contact and profile used.
**Proposal**
When a contact is created via a standalone profile, this information is added to the source field of the contact.
It should show : Profile *'profile name'* on *added date*.
This would be helpful in searches and very relevant to source field.yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/3996Event Registration that has error in Profile should continue to propagate Lin...2022-11-22T14:36:05ZshaneonabikeEvent Registration that has error in Profile should continue to propagate Line ItemsTo be honest I didn't know how to clearly define this title so feel free to change it.
## Problem
We encountered an interesting situation whereby during an Event registration the actual payment went through, but the Line items were mis...To be honest I didn't know how to clearly define this title so feel free to change it.
## Problem
We encountered an interesting situation whereby during an Event registration the actual payment went through, but the Line items were missing. When I looked further I discovered that there was an error due to missing / incorrectly configured fields in a Profile that was part of the Event registration.
This Profile was throwing an Exception, because it could not insert the record into the DB. I realize it makes sense to actually return that Exception, but what I question is whether the line items shouldn't be recorded. In this case, the transaction is completed (below), but the line items aren't there because of the exception.
![Selection_002](/uploads/45666402495106c8814a8de1d2837f1b/Selection_002.png)
## Recreate
1. Create a Custom Field set associated to a Contact, and add several fields
2. Create profile and add those fields
3. Create an Event
4. Add that Profile to the Event
5. Add a custom Price Set with several fields
6. Save
From this point, I'm not certain how this came about but I'm guessing the next steps would be:
1. Create a new set of Custom Fields identical to above and recreate associated to Participant and your Event type
1. Delete the first original Custom Field set, but not the profile
2. Register for the Event
I think where this happens is when the actual ```entity_id``` clashes (well in my case it was). So you would need to register multiple times to make this happen. In the DB teh value table for us was
```
civicrm_value_collector_det_16 | CREATE TABLE `civicrm_value_collector_det_16` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Default MySQL primary key',
`entity_id` int(10) unsigned NOT NULL COMMENT 'Table that this extends',
`name_of_individual_collecting_th_50` varchar(255) DEFAULT NULL,
`is_someone_collecting_this_order_51` tinyint(4) DEFAULT NULL,
`phone_number_52` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_entity_id` (`entity_id`),
KEY `INDEX_phone_number_52` (`phone_number_52`),
KEY `INDEX_name_of_individual_collecting_th_50` (`name_of_individual_collecting_th_50`),
CONSTRAINT `FK_civicrm_value_collector_det_16_entity_id` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=140 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci |
```
## Actual Error
_DB Error: Constraint_ via
```
[debug_info] => INSERT INTO civicrm_value_collector_det_16 ( `is_someone_collecting_this_order_51`,
`name_of_individual_collecting_th_50`,`phone_number_52`,`entity_id` ) VALUES ( 0,'','',128 )
ON DUPLICATE KEY UPDATE `is_someone_collecting_this_order_51` = 0,
`name_of_individual_collecting_th_50` = '',`phone_number_52` = ''
[nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails
(`sitesite`.`civicrm_value_collector_det_16`, CONSTRAINT
`FK_civicrm_value_collector_det_16_entity_id` FOREIGN KEY (`entity_id`)
REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
```
## Possible improvements
1. Process the transaction
2. Process line items
3. Save to DB
4. Process Profiles after?
or
1. Process transaction
2. Process Profile (if an exception cache it)
3. Continue as before
4. Throw Exception at end?
I'm not sure, but the fact that the transaction is passed we should ensure that the line items are saved too.
Sorry for the long text!https://lab.civicrm.org/dev/core/-/issues/3987Scheduled reminders can't be used with memberships with autorenewal disabled2022-11-17T07:21:23Zaydunsaidan.saunders@squiffle.ukScheduled reminders can't be used with memberships with autorenewal disabledAs described in https://civicrm.stackexchange.com/q/42905/225 scheduled reminders can't be used for memberships where autorenewal is not offered. Autorenewal has to be optional or required.As described in https://civicrm.stackexchange.com/q/42905/225 scheduled reminders can't be used for memberships where autorenewal is not offered. Autorenewal has to be optional or required.https://lab.civicrm.org/dev/core/-/issues/3971SearchKit data segmentation: add Clone and Export actions2022-11-10T07:04:03ZherbdoolSearchKit data segmentation: add Clone and Export actionsCurrently there are Edit and Delete actions. It would be useful to also have Clone and Export actions, just like the main SearchKit tab.Currently there are Edit and Delete actions. It would be useful to also have Clone and Export actions, just like the main SearchKit tab.https://lab.civicrm.org/dev/core/-/issues/3970SearchKit data segmentation: ability to AND/OR conditions per item2022-11-10T16:53:45ZherbdoolSearchKit data segmentation: ability to AND/OR conditions per itemI'm guessing that the conditions are currently AND. I have a use case for needing an OR if this is possible.
For example, a field either has a specific string OR that same field is blank.I'm guessing that the conditions are currently AND. I have a use case for needing an OR if this is possible.
For example, a field either has a specific string OR that same field is blank.https://lab.civicrm.org/dev/core/-/issues/3969Notice: Undefined offset: 1 in /var/www/html/civicirm/wp-content/plugins/civi...2023-01-17T02:01:54ZyodatakNotice: Undefined offset: 1 in /var/www/html/civicirm/wp-content/plugins/civicrm/civicrm/CRM/Utils/Date.php on line 908Overview
----------------------------------------
I got this error showing in civicrm on PHP7.4 and civicrm 5.55.0, Wordpres 6.1 , Nginx
Reproduction steps
----------------------------------------
Go to a report and on top this show
N...Overview
----------------------------------------
I got this error showing in civicrm on PHP7.4 and civicrm 5.55.0, Wordpres 6.1 , Nginx
Reproduction steps
----------------------------------------
Go to a report and on top this show
Notice: Undefined offset: 1 in /var/www/html/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Utils/Date.php on line 908