CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2023-08-12T05:12:29Zhttps://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/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/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._https://lab.civicrm.org/dev/core/-/issues/4089Batch Data Entry for Membership2024-02-09T02:31:39ZmollconsBatch Data Entry for MembershipSee https://chat.civicrm.org/civicrm/pl/43n5d1d8tfr5xkc1ptmqhpn7iw for detail of issue.
I have created the contacts successfully and am now attempting to perform a "Batch Data Entry for Memberships". I have created the membership types ...See https://chat.civicrm.org/civicrm/pl/43n5d1d8tfr5xkc1ptmqhpn7iw for detail of issue.
I have created the contacts successfully and am now attempting to perform a "Batch Data Entry for Memberships". I have created the membership types (3 types) and when I attempt to "Enter Records" the error occurs.
If I delete all of the member type records, then I am able to enter the batch entry. But then I am not able to select any member type.
I am using Chrome browser on Joomla 4.2.6 and with CiviCRM 5.57.0 (or 5.57.1).https://lab.civicrm.org/dev/core/-/issues/4088Regression - CiviCRM core unit tests interfere with running non-CiviCRM tests2023-02-09T22:51:30ZeileenRegression - CiviCRM core unit tests interfere with running non-CiviCRM testsWe run our own unit tests on CiviCRM, using the tarball in our CiviCRM folder. We use a set up that @totten did many many years back when `civibuild` was first created.
It ran fine on 5.54 & does not on 5.58 due to changes in core
The ...We run our own unit tests on CiviCRM, using the tarball in our CiviCRM folder. We use a set up that @totten did many many years back when `civibuild` was first created.
It ran fine on 5.54 & does not on 5.58 due to changes in core
The error is
```
Error: Class 'api\v4\Api4TestBase' not found in include() (line 12 of /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/ext/afform/core/tests/phpunit/Civi/Afform/AfformContactSummaryTest.php).
```
We are not trying to run this test & the file does not ship with CiviCRM.
There are 2 recent changes in play
1) Class scanning was touched mid last year - this may not be relevant as the net effect of the code may not have changed
![image](/uploads/b7520bb506f68e8bc34301deb7dc0373/image.png)
2) A dependency was added by @colemanw in tests that DO ship with core on files that do NOT ship with core.
![image](/uploads/e2b1ecbc9b5666d9ec484a7a8b75f56c/image.png)
The net effect is that if tries & fails to load these unit test classes despite them being out-of-scope for what we are testing.
I think the basic principle is either the tests should not ship at all in the tarball or they should be shipped with their dependencies.
In this case it seems likely we should consider whether the `Api4TestBase` class is mature enough to ship under `Civi\Test` (with the implied support for extensions that creates). I would probably prefer to offer a trait over a `BaseClass` if we do that - although there might be blockers on that.https://lab.civicrm.org/dev/core/-/issues/4087Offline Event confirmation receipt prints waitlist message2023-01-19T18:32:47ZPradeep Nayakpradpnayak@gmail.comOffline Event confirmation receipt prints waitlist messageReplicate:
1. Register for Event
2. View participant record
3. Click on Change selection link under selections
4. Select on Send Confirmation and add confirmation text and Save
Expected result:
Email should display confirmation text
Ac...Replicate:
1. Register for Event
2. View participant record
3. Click on Change selection link under selections
4. Select on Send Confirmation and add confirmation text and Save
Expected result:
Email should display confirmation text
Actual result:
Waitlist message displayed in email
```You have been added to the WAIT LIST for this event. If space becomes available you will receive an email with a link to a web page where you can complete your registration.```
Regression from: [5.53.0](https://github.com/civicrm/civicrm-core/commit/a0b74a905e2)5.58.0https://lab.civicrm.org/dev/core/-/issues/4084Assign participant_status_id in both edit/create modes2023-01-19T22:46:24ZyashodhaAssign participant_status_id in both edit/create modesAssign participant_status_id in both edit/create modes to template.
Right now, it is assigned in just edit mode.Assign participant_status_id in both edit/create modes to template.
Right now, it is assigned in just edit mode.5.59.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/4083Cannot fill in FormBuilder fields when using Existing Contact autocomplete2023-01-20T00:07:09ZbrienneCannot fill in FormBuilder fields when using Existing Contact autocompleteOverview
----------------------------------------
On FormBuilder forms that use autocomplete option "Existing Contact", users cannot fill in other fields. If it is a text box that was not filled in by the autocomplete, then the user is u...Overview
----------------------------------------
On FormBuilder forms that use autocomplete option "Existing Contact", users cannot fill in other fields. If it is a text box that was not filled in by the autocomplete, then the user is unable to type anything. If the text box was filled out by the autocomplete, then any changes made to that field are temporarily visible, but disappear. Selects and checkboxes may be clicked, but those changes are also temporary. Even if the user does not search/select a contact, then they still cannot fill out the form.
Reproduction steps
----------------------------------------
1. Create a FormBuilder form based on a contact (i.e. Organization)
1. Add an "Existing Contact" field, as well as one text box field for testing (i.e Email)
1. Save, and click **View Page**
2. Try to type into the text box field, both before and after selecting a contact
Here is the markup for the form that I tested on in dmaster:
```html
<af-form ctrl="afform">
<af-entity data="{contact_type: 'Organization', source: 'Test'}" type="Contact" name="Organization1" label="Organization 1" actions="{create: true, update: true}" security="RBAC" />
<fieldset af-fieldset="Organization1" class="af-container" af-title="Organization 1">
<div class="af-container">
<af-field name="id" />
<div class="af-container af-layout-inline"></div>
</div>
<div af-join="Email">
<div class="af-container af-layout-inline">
<af-field name="email" />
</div>
</div>
</fieldset>
<button class="af-button btn btn-primary" crm-icon="fa-check" ng-click="afform.submit()">Submit</button>
</af-form>
```
![Selection_185](/uploads/00187e18cc7b108e67f9e341b6a3b7f1/Selection_185.png)
Current behaviour
----------------------------------------
When a FormBuilder form has an "Existing Contact" autocomplete, users cannot fill in or edit fields.
Expected behaviour
----------------------------------------
Users should be able to fill out or edit fields with an "Existing Contact" autocomplete on the form.
Environment information
----------------------------------------
This type of form does not work on 5.57.1, but does work on 5.56.2.
I did a `git bisect` and located the first bad commit as 2aaaa86bb041d6214c17a0d2a85f9f28838b2904, which is PR [24974](https://github.com/civicrm/civicrm-core/pull/24974) (Use APIv4-based Autocomplete widget throughout SearchKit, Afform & API Explorer)https://lab.civicrm.org/dev/core/-/issues/4082Event participant role import inconsistency2023-06-30T14:06:52ZguitarmanEvent participant role import inconsistencyOverview
----------------------------------------
Event participant role import doesn't respect submitted values.
Reproduction steps
----------------------------------------
1. Import a list of event participants, role = non-default val...Overview
----------------------------------------
Event participant role import doesn't respect submitted values.
Reproduction steps
----------------------------------------
1. Import a list of event participants, role = non-default value
2. Import runs through without showing any errors/warnings
3. Check DB-records, whatever has been submitted, the participant role value will always be set to "1" i.e. the default value set in the event configuration.
Current behaviour
----------------------------------------
Whatever is submitted, the participant role value will be set to "1" (default value).
Expected behaviour
----------------------------------------
The correct/submitted participant role value should be imported.https://lab.civicrm.org/dev/core/-/issues/4081API v.3 Event.create used for update will change Event Template to ordinary E...2023-01-16T15:26:05Zniels_erik_andersenAPI v.3 Event.create used for update will change Event Template to ordinary EventWhen API v.3 Event.create is used for update event template, it will set is_template to false so that the template is changed to an ordinary event.
To reproduce:
cv api Event.create id=nnn template_title="New Title"
Where nnn is id for...When API v.3 Event.create is used for update event template, it will set is_template to false so that the template is changed to an ordinary event.
To reproduce:
cv api Event.create id=nnn template_title="New Title"
Where nnn is id for Event Template
To fix:
In
CRM_Event_BAO_Event::create(&$params) {
$transaction = new CRM_Core_Transaction();
if (empty($params['is_template'])) {
$params['is_template'] = 0;
}
Change
if (empty($params['is_template'])) {
to:
if (empty($params['id']) && empty($params['is_template'])) {5.59.0https://lab.civicrm.org/dev/core/-/issues/4080system workflow templates do not respect the selected pdf format anymore2023-02-15T05:27:10ZMariaVsystem workflow templates do not respect the selected pdf format anymoreI have noticed that system workflow templates no longer respect the formats.
pdf formats can be configured via communication > pdf formats.
In my case there are 2 pdf formats (and the default_invoice_pdf_format came together with an upd...I have noticed that system workflow templates no longer respect the formats.
pdf formats can be configured via communication > pdf formats.
In my case there are 2 pdf formats (and the default_invoice_pdf_format came together with an update probably a few months ago):
![grafik](/uploads/e7bce57400c26a7488c20f64a1d2b64d/grafik.png)
When I edit a system workflow template and choose - Standard - or DIN A4 it still chooses the default_invoice_pdf_format.
![grafik](/uploads/07affeecea4693e191b517e16700a854/grafik.png)
It is hardcoded in the code as you can see here:
https://lab.civicrm.org/dev/core/-/blob/master/CRM/Contribute/Form/Task/Invoice.php (line 236).
I do not know why this has been implemented. There might be a reason for it.
But it seems like a bug for me.
If I choose - Standard - in the system workflow templates I expect that this format will be choosed.
Such a change (without notice) could also led to major problems when sending invoices automatically.
Workaround for us for now was to change the default_invoice_pdf_format to the same values as our standard format.
(noticed on CiviCRM version 5.56.2)5.58.1https://lab.civicrm.org/dev/core/-/issues/4079Add support for pledge tokens2023-03-23T22:48:23ZyashodhaAdd support for pledge tokensAdd support for pledge tokensAdd support for pledge tokens5.61.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/4076Split up CRM_Utils_System_Base::theme2023-02-14T01:13:59ZherbdoolSplit up CRM_Utils_System_Base::themeSplit up this method into the different classes so it's specific per CMS.Split up this method into the different classes so it's specific per CMS.https://lab.civicrm.org/dev/core/-/issues/4074CRM_Core_BAO_CMSUser - use system specific method rather than checking userFr...2023-01-30T17:18:08ZherbdoolCRM_Core_BAO_CMSUser - use system specific method rather than checking userFrameworkIn `CRM_Core_BAO_CMSUser::formRule()` there is a bunch of logic for specific CMSes that should be in the userSystem for each CMS. This helps make CiviCRM more CMS agnostic.In `CRM_Core_BAO_CMSUser::formRule()` there is a bunch of logic for specific CMSes that should be in the userSystem for each CMS. This helps make CiviCRM more CMS agnostic.https://lab.civicrm.org/dev/core/-/issues/4070FlexMailer: Default Return Path not respected2023-02-27T13:47:09ZJonGoldFlexMailer: Default Return Path not respectedIn **Administer » CiviMail » Mail Accounts**, you can specify a default return path for your CiviMail mailings. This is important when, for instance, your bounce address's mailhost does not support VERP. This forces the `Return-Path` h...In **Administer » CiviMail » Mail Accounts**, you can specify a default return path for your CiviMail mailings. This is important when, for instance, your bounce address's mailhost does not support VERP. This forces the `Return-Path` header to a specific email address. The bounce processing code will find the `X-CiviMail-Bounce` header and process that instead of the bounce address.
However, this functionality was not ported to Flexmailer. You can see it at the very top of `CRM_Utils_Mail::send()` but not in `Civi\FlexMailer\Listener\BounceTracker::onCompose()`.
This causes the return-path to have the VERP address.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/4069Broken event confirmation emails with multiple participants and external paym...2023-01-15T23:27:12ZJKingsnorthBroken event confirmation emails with multiple participants and external payment gateways (contribution.sendconfirmation)Raised on StackExchange here: https://civicrm.stackexchange.com/questions/34004/event-email-receipt-doesnt-have-the-profile-information
We have also hit this issue.
This is an old regression from late 2019 by the looks of it.
When boo...Raised on StackExchange here: https://civicrm.stackexchange.com/questions/34004/event-email-receipt-doesnt-have-the-profile-information
We have also hit this issue.
This is an old regression from late 2019 by the looks of it.
When booking on to an event with multiple participants (ie lead booker and a guest), and using an external payment gateway using IPN, the confirmation email is missing the total amount, and all of the participant information.
Actual: [image](/uploads/b55b515da0be99cc4806c4f0cc3a3b96/image.png)
Expected: [image](/uploads/60ff3fdfc56fc6dc7765210628870ae4/image.png)
Another way to recreate this issue is to call the contribution.sendconfirmation API on any contribution record linked to a lead booker that has additional participants.
IPN-based payment gateways call completetransaction API, which in turn calls the sendconfirmation API, which explains.
---
Tracking through the code, it looks like the sendconfirmation API call only has the participant information for the 'last' participant ID associated with the booking?
It looks like @eileen you've been doing some refactoring in this area (rightly so - it looks like a bit of a swamp!).
I'm struggling to track down exactly where the issue is coming from.https://lab.civicrm.org/dev/core/-/issues/4068Running a Contact Summary report as a limited access user granted gives DB Er...2023-03-18T05:12:26ZtiminaustRunning a Contact Summary report as a limited access user granted gives DB Error: no such fieldOverview
----------------------------------------
Running a report as a limited access user based on a group that has ACL permissions granted gives ...
```
Sorry, due to an error, we are unable (etc)... DB Error: no such field
```
My par...Overview
----------------------------------------
Running a report as a limited access user based on a group that has ACL permissions granted gives ...
```
Sorry, due to an error, we are unable (etc)... DB Error: no such field
```
My particular use case was a Contact Summary report based on a smartgroup being run by a locked-down user who has acl access to that group (ie not all groups).
Reproduction steps (simplified from my actual use case).
----------------------------------------
1. Create a smart-group and set up ACL for a specific user that doesn't have global access to all contacts/groups.
2. Login as that user, create the report, select a couple of fields AND the smart-group.
3. Attempt to run the report.
Current behaviour
----------------------------------------
Report fails with DB Error: no such field as limited access user, but runs fine for full access user.
The following SQL was generated for the limited access user ...
```
SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name AS civicrm_contact_sort_name,
contact_civireport.id AS civicrm_contact_id,
email_civireport.email AS civicrm_email_email,
(address_civireport.street_number % 2) AS civicrm_address_address_odd_street_number,
address_civireport.postal_code AS civicrm_address_address_postal_code
FROM civicrm_contact contact_civireport
LEFT JOIN civicrm_address address_civireport ON
(contact_civireport.id = address_civireport.contact_id)
AND address_civireport.is_primary = 1
LEFT JOIN civicrm_email email_civireport ON
contact_civireport.id = email_civireport.contact_id
AND email_civireport.is_primary = 1
WHERE ((contact_civireport.contact_type IN ('Individual')))
AND contact_civireport.id IN
(SELECT DISTINCT cgroup_civireport.contact_id
FROM civicrm_group_contact cgroup_civireport
WHERE cgroup_civireport.group_id IN (11)
AND cgroup_civireport.status = 'Added'
UNION DISTINCT SELECT DISTINCT smartgroup_contact.contact_id
FROM civicrm_group_contact_cache smartgroup_contact
WHERE smartgroup_contact.group_id IN (11) )
AND (`contact_civireport`.`id` IS NULL
OR (`contact_civireport`.`id` IN
(SELECT contact_id FROM civicrm_acl_contact_cache WHERE user_id = 6)))
AND (`contact_civireport`.`is_deleted` IS NULL
OR (`contact_civireport`.`is_deleted` != 1))
AND (`cgroup_civireport`.`id` IS NULL
OR (`cgroup_civireport`.`id` IN (3, 7, 9, 11)))
ORDER BY contact_civireport.sort_name ASC
LIMIT 0, 50
```
The error is caused by the last where clause which is generated from buildPermissionClause(), which is trying to access 'contact_civireport' that only exists in the nested where/filter subquery.
The last 3 where clauses are not present for the full access user (ie buildPermissionsClause() return empty string).
Expected behaviour
----------------------------------------
The report should run correctly without the last where clause for limited access use.
Environment information
----------------------------------------
* __Browser: Firefox 108
* __CiviCRM: 5.57.0
* __PHP: 8.1
* __CMS: WordPress 6.1.1
* __Database: MariaDB 10.5
* __Web Server: Apache 2.4
Comments
----------------------------------------
The problem appears to be in civicrm/CRM/report/form.php.
From what I read ...
The last three where clauses in the above are generated by the function buildPermissionClause() which uses a BAO call to generate a user-specific clause for each table in the query where the user does not have full access.
This relies on function selectedTables() to generate the list of tables. The last part of selectedTables function searches all the filters an adds them to the list of tables, however for filters using $filterop 'in' or 'notin', the tables referenced by these clauses may not exist in the main query. It would seem likely that the selected tables list should not include tables where the filter uses these two constructs.
I am not sure apart from 'group' filter (which has specific handling), if any report filters would use 'in/not in (select...)' rather than 'in/out (value list)' so I am not sure the best way to fix this as I have only investigated my usage.
The solution may be to explicitly excluding contact group table (cgroup_civireport), or by updating to selecttables to exclude all 'in' and 'notin' filters as there is no guarantee the table exists in the main query for these types of filters.
Change in function selecttables (line ~4388) with
```
$this->_selectedTables[] = $tableName;"
```
to:
```
if ( ! in_array($filterOp, ["in","notin"] )) $this->_selectedTables[] = $tableName;
```
If the intent is to restrict access to acl enabled groups this would need the same clause added in function joinGroupTempTable(). There may be other places where this should apply.
(On a side issue as I am new here - in my sql query, civicrm_address_address_odd_street_number is not a column that is selectable - it seems to be preset as required and hidden for some reason and limited to a 'Walking Report' template. Having this would cause an unnecessary join to the address table if no address fields are being reported - only a little performance thing but should this be another problem or improvement request?).5.59.0https://lab.civicrm.org/dev/core/-/issues/4065Upgrade Error 5.56.1 to 5.57.0 duplicate Search Kit UI_name2023-01-10T12:26:09ZkcristianoUpgrade Error 5.56.1 to 5.57.0 duplicate Search Kit UI_nameEnviornment:
WP 6.1.1
php 7.4
apache 2.4
Search Kit has a search created in 2021 called 'Top Donors'
on upgrade I get the error:
`[nativecode=1062 ** Duplicate entry 'Top_Donors' for key 'UI_name']`
```
[Error: Finish core DB update...Enviornment:
WP 6.1.1
php 7.4
apache 2.4
Search Kit has a search created in 2021 called 'Top Donors'
on upgrade I get the error:
`[nativecode=1062 ** Duplicate entry 'Top_Donors' for key 'UI_name']`
```
[Error: Finish core DB updates 5.57.0]
Error Field Error Value
Type DB_Error
Code -5
Message DB Error: already exists
Mode 16
UserInfo INSERT INTO `civicrm_saved_search` (`name` , `label` , `form_values` , `mapping_id` , `search_custom_id` , `api_entity` , `api_params` , `created_id` , `modified_id` , `expires_date` , `description` ) VALUES ('Top_Donors' , 'Top Donors' , NULL , NULL , NULL , 'Contribution' , '{\"version\":4,\"select\":[\"GROUP_CONCAT(DISTINCT Contribution_Contact_contact_id_01.display_name) AS GROUP_CONCAT_Contribution_Contact_contact_id_01_display_name\",\"SUM(total_amount) AS SUM_total_amount\",\"COUNT(id) AS COUNT_id\",\"AVG(total_amount) AS AVG_total_amount\"],\"orderBy\":[],\"where\":[[\"contribution_status_id:name\",\"=\",\"Completed\"]],\"groupBy\":[\"contact_id.display_name\"],\"join\":[[\"Contact AS Contribution_Contact_contact_id_01\",\"LEFT\",[\"contact_id\",\"=\",\"Contribution_Contact_contact_id_01.id\"]]],\"having\":[]}' , 202 , 202 , NULL , NULL ) [nativecode=1062 ** Duplicate entry 'Top_Donors' for key 'UI_name']
DebugInfo INSERT INTO `civicrm_saved_search` (`name` , `label` , `form_values` , `mapping_id` , `search_custom_id` , `api_entity` , `api_params` , `created_id` , `modified_id` , `expires_date` , `description` ) VALUES ('Top_Donors' , 'Top Donors' , NULL , NULL , NULL , 'Contribution' , '{\"version\":4,\"select\":[\"GROUP_CONCAT(DISTINCT Contribution_Contact_contact_id_01.display_name) AS GROUP_CONCAT_Contribution_Contact_contact_id_01_display_name\",\"SUM(total_amount) AS SUM_total_amount\",\"COUNT(id) AS COUNT_id\",\"AVG(total_amount) AS AVG_total_amount\"],\"orderBy\":[],\"where\":[[\"contribution_status_id:name\",\"=\",\"Completed\"]],\"groupBy\":[\"contact_id.display_name\"],\"join\":[[\"Contact AS Contribution_Contact_contact_id_01\",\"LEFT\",[\"contact_id\",\"=\",\"Contribution_Contact_contact_id_01.id\"]]],\"having\":[]}' , 202 , 202 , NULL , NULL ) [nativecode=1062 ** Duplicate entry 'Top_Donors' for key 'UI_name']
PEAR_Exception: DB Error: already exists in /home/wpmaybe/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php on line 945
DB_Error: DB Error: already exists in unknown on line unknown
```
I edited the label and name in DB and re-ran the upgrade:
Success
I also now have a packaged Search with the same label and name as one that was created previously. Perhaps we should have a more unique name (not label) to indicated it's a core/packaged search?
EDIT: The affected sites all have the extension 'SearchKit Reports' enabled.https://lab.civicrm.org/dev/core/-/issues/4063Pagination and counts for soft credits on contact contribution tab are broken2023-01-31T04:22:10ZlarsssandergreenPagination and counts for soft credits on contact contribution tab are broken![image](/uploads/bb821970b38d324542ed222f854986c7/image.png)
![image](/uploads/6f7546327ec73b18a8811048bcf59d92/image.png)
If the total number of soft credits on a contact's contribution tab exceeds the number set in Show N entries, th...![image](/uploads/bb821970b38d324542ed222f854986c7/image.png)
![image](/uploads/6f7546327ec73b18a8811048bcf59d92/image.png)
If the total number of soft credits on a contact's contribution tab exceeds the number set in Show N entries, then the count is broken as above and the Next and Last links are disabled. You can use the page numbers to get to other pages, but it will always show five pages no matter how many actual soft credits are found.
Is this something that's worth digging into or is it anticipated that this will be replaced with SearchKit relatively soon?
To reproduce, add soft credit for 11 contributions to one contact, then go to that contact's contributions tab and select Show 10 entries.https://lab.civicrm.org/dev/core/-/issues/4062Emojis submitted to CiviCRM API cause issues2023-10-22T12:20:26ZfkohrtEmojis submitted to CiviCRM API cause issues## Problem/Motivation
Emojis that are submitted to custom fields cause an issue upon webform submission.
## Detailed steps to reproduce
1. Set up a simple webform event registration form, e.g. first name, last name, and a custom atten...## Problem/Motivation
Emojis that are submitted to custom fields cause an issue upon webform submission.
## Detailed steps to reproduce
1. Set up a simple webform event registration form, e.g. first name, last name, and a custom attendee-specific custom field (multi-line text box / textarea).
2. Put 👍🏻 into the custom field
3. Error message: The website encountered an unexpected error. Please try again later.
Alongside every form submission with emojis, the log contains two related entries:
__webform_submission__
```
CRM_Core_Exception: DB Error: unknown error in civicrm_api3() (line 135 of /var/www/[SITE]/vendor/civicrm/civicrm-core/api/api.php).
```
__php__
```
Drupal\Core\Entity\EntityStorageException: DB Error: unknown error in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 815 of /var/www/[SITE]/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
```
## Proposed resolution
Successful submission of text that contains emojis.
## Further context
Moved from `webform_civicrm` issue [3331605](https://www.drupal.org/project/webform_civicrm/issues/3331605).