CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2022-06-11T14:54:50Zhttps://lab.civicrm.org/dev/core/-/issues/3582Using ACL to restrict mailing recipients leads to fatal error2022-06-11T14:54:50ZMonish DebUsing ACL to restrict mailing recipients leads to fatal errorSteps to replicate:
1. Assign an ACL permission for one or more contacts
2. Compose a mailing and select a recipient group. Ensure that those contacts are included in that group
3. Submit and Send Mailing immediately
Result into fatal ...Steps to replicate:
1. Assign an ACL permission for one or more contacts
2. Compose a mailing and select a recipient group. Ensure that those contacts are included in that group
3. Submit and Send Mailing immediately
Result into fatal error - https://pastebin.com/aMa2KYy0
## Context
This appears to be a regression in 4.7.31. Related PRs:
* https://issues.civicrm.org/jira/browse/CRM-21260
* https://github.com/civicrm/civicrm-core/pull/11142/
5.1.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/3300Regression - js error due to alertDismissal setting2022-04-22T16:05:04ZeileenRegression - js error due to alertDismissal settingjs error
```
// http://civicrm.org/licensing
// <script> Generated 05 Jun 2018 05:59:13
(function($) {
// Config settings
CRM.config.userFramework = "Drupal";
CRM.config.resourceBase = "http:\/\/wmf46.local\/sites\/all\/modules\/ci...js error
```
// http://civicrm.org/licensing
// <script> Generated 05 Jun 2018 05:59:13
(function($) {
// Config settings
CRM.config.userFramework = "Drupal";
CRM.config.resourceBase = "http:\/\/wmf46.local\/sites\/all\/modules\/civicrm\/";
CRM.config.lcMessages = "en_US";
$.datepicker._defaults.dateFormat = CRM.config.dateInputFormat = "mm\/dd\/yy";
CRM.config.timeIs24Hr = false;
CRM.config.ajaxPopupsEnabled = true;
CRM.config.allowAlertAutodismissal = ;
```
@justinfreeman @monish.deb @JoeMurray - not in released versionMonish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/120Advanced Search - Contacts throws Fatal Error v 5.1.12018-05-17T02:11:00ZkcristianoAdvanced Search - Contacts throws Fatal Error v 5.1.1Advanced Search for Contacts White Screens - It works for Participants, Members, but not contacts.
Tested on official Download of CiviCRM 5.1.1.
Tested with:
Drupal 7
CiviCRM 5.1.1
php 7.0
MariaDB 10.1
WP 4.9.5
CiviCRM 5.1.1
php 7...Advanced Search for Contacts White Screens - It works for Participants, Members, but not contacts.
Tested on official Download of CiviCRM 5.1.1.
Tested with:
Drupal 7
CiviCRM 5.1.1
php 7.0
MariaDB 10.1
WP 4.9.5
CiviCRM 5.1.1
php 7.0
MariaDB 10.2
WP 4.9.5
CiviCRM 5.1.1
php 7.0
MariaDB 10.1
WP 4.9.5
CiviCRM 5.1.1
php 7.0
MySQL 5.6
All fail on a contact search with `PHP Fatal error: Uncaught Error: Call to undefined method CRM_Core_DAO::disableFullGroupByMode() in /home/ranger/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php:4848 `
These commits are in 5.1.1 - https://github.com/civicrm/civicrm-core/pull/12074 https://github.com/civicrm/civicrm-core/pull/11996
but https://github.com/civicrm/civicrm-core/pull/12043 is not in 5.1.1
Will test adding https://github.com/civicrm/civicrm-core/pull/12043 and see if that fixes.5.1.0https://lab.civicrm.org/dev/core/-/issues/114Email-Invoices fails since 4.7.31 because of invalid From-Addresses2018-05-16T02:43:17Zthomas_SYSTOPIAEmail-Invoices fails since 4.7.31 because of invalid From-AddressesReproduce:
1. Enable Tax and Invoicing (in "CiviContribute Component Settings")
2. Setup a From-Email-Adress
3. Create a Contribution
4. Use "Email Invoice" to send an Invoice.
You get: "**Validation failed for: from-email-address**"
T...Reproduce:
1. Enable Tax and Invoicing (in "CiviContribute Component Settings")
2. Setup a From-Email-Adress
3. Create a Contribution
4. Use "Email Invoice" to send an Invoice.
You get: "**Validation failed for: from-email-address**"
The reason could be found in CRM/Contribute/Form/Task/Invoice.php[460:465]:
```
$fromEmail = CRM_Core_BAO_Email::getFromEmail();
// from email address
if (isset($params['from_email_address'])) \{
$fromEmailAddress = CRM_Utils_Array::value($params['from_email_address'], $fromEmail);
}
```
The values of $fromEmail are html-escaped versions of the email-adresses. They might be useful for Select-Options in HTML-Forms. But they won't work for real email-headers.5.2.0https://lab.civicrm.org/dev/core/-/issues/72PayflowPro throws error due to more than 4 decimal places2018-04-30T22:08:25ZyashodhaPayflowPro throws error due to more than 4 decimal placesPayflowPro throws error due to more than 4 decimal places
> Payment Processor Error message: 9013: Error - from payment processor: [4 Invalid amount]
> 9013: Error - from payment processor: [4 Invalid amount]
This was introduced in
ht...PayflowPro throws error due to more than 4 decimal places
> Payment Processor Error message: 9013: Error - from payment processor: [4 Invalid amount]
> 9013: Error - from payment processor: [4 Invalid amount]
This was introduced in
https://github.com/civicrm/civicrm-core/pull/11016
where database changes supported decimal upto 9 places.
**Before patch**
![payflow_before](/uploads/076f9b7a26906f24006898c670ad4345/payflow_before.png)
**After patch**
![payflow_after](/uploads/da4ecc053566b989aed53d42daa26068/payflow_after.png)5.2.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/4805[PHP 8.3] static fields syntax error2024-01-31T22:30:17Zjofranzfranz@systopia.de[PHP 8.3] static fields syntax error
```bash
civicrm-core (f8a214edfd8c888dec0922e2622d3e8a9ff66eb2) parallel-lint --no-progress -p php8.3 .
PHP 8.3.0 | 10 parallel jobs
Checked 4242 files in 11.2 seconds
Syntax error found in...
```bash
civicrm-core (f8a214edfd8c888dec0922e2622d3e8a9ff66eb2) parallel-lint --no-progress -p php8.3 .
PHP 8.3.0 | 10 parallel jobs
Checked 4242 files in 11.2 seconds
Syntax error found in 2 files
------------------------------------------------------------
Parse error: ./CRM/Mailing/Event/BAO/MailingEventForward.php:236
> 236 | static $fields = NULL;
Duplicate declaration of static variable $fields in ./CRM/Mailing/Event/BAO/MailingEventForward.php
------------------------------------------------------------
Parse error: ./CRM/Import/Parser.php:1131
> 1131 | static $fields = NULL;
Duplicate declaration of static variable $fields in ./CRM/Import/Parser.php
```
Slightly related: #3958https://lab.civicrm.org/dev/core/-/issues/4302Fatal errors in code that calls methods in `CRM_Dedupe_BAO_RuleGroup` in 5.62+2023-05-23T07:39:02ZhaystackFatal errors in code that calls methods in `CRM_Dedupe_BAO_RuleGroup` in 5.62+Overview
----------------------------------------
There are a number of plugins out in the wild that call `CRM_Dedupe_BAO_RuleGroup::getByType()` to retrieve a keyed array of Dedupe Rules. These include, but may not be limited to:
* [Ca...Overview
----------------------------------------
There are a number of plugins out in the wild that call `CRM_Dedupe_BAO_RuleGroup::getByType()` to retrieve a keyed array of Dedupe Rules. These include, but may not be limited to:
* [Caldera Forms CiviCRM](https://wordpress.org/plugins/cf-civicrm/) (or whichever adapted version people are still using)
* [CiviCRM Profile Sync](https://wordpress.org/plugins/civicrm-wp-profile-sync/)
* [CiviCRM Admin Utilities](https://wordpress.org/plugins/civicrm-admin-utilities/) (thankfully not used internally)
* [Integrate CiviCRM with WooCommerce](https://github.com/WPCV/wpcv-woo-civi-integration)
* [CiviCRM Event Organiser](https://github.com/christianwach/civicrm-event-organiser)
I have updated each of these to use API4 instead - but I don't know how many other plugins, modules and extensions there are out there that use similar code for similar purposes. Moreover, if people update to CiviCRM 5.62.x without updating their plugins first, their sites will throw a fatal error and (in some cases) become non-functional - though the severity of this depends on when the code is called.
Reproduction steps
----------------------------------------
1. Install CiviCRM 5.62.x
1. Install one of the unpatched plugins listed above.
1. Go to a screen that renders a list of Dedupe Rules (with CiviCRM Profile Sync using ACF Extended forms, any screen will do)
1. **PHP Fatal error: Uncaught Error: Class "CRM_Dedupe_BAO_RuleGroup" not found**".
Current behaviour
----------------------------------------
Calling `CRM_Dedupe_BAO_RuleGroup::getByType()` throws a fatal error.
Expected behaviour
----------------------------------------
I don't object to [files being removed from CiviCRM](https://github.com/civicrm/civicrm-core/pull/26025) as such, however there should be mitigations in place to warn developers that this is likely to happen in a future version of CiviCRM.
When aliasing classes, it would be really helpful if methods are overloaded and implemented something like [`_deprecated_function`](https://developer.wordpress.org/reference/functions/_deprecated_function/) to write _something_ to the logs so that developers are aware of the impending removal of classes and methods, e.g.:
```php
/**
* @inheritDoc
*/
public static function getByType($contactType = NULL) {
civicrm_deprecated_function( __METHOD__, '5.39', 'CRM_Dedupe_BAO_DedupeRuleGroup::getByType()' );
return parent::getByType($contactType);
}
```
I'd have acted sooner if I'd seen something like the following in my logs:
```
Function CRM_Dedupe_BAO_RuleGroup::getByType() is deprecated since CiviCRM version 5.39. Use CRM_Dedupe_BAO_DedupeRuleGroup::getByType() or civicrm_api4() instead.
```
As it stands, people have 2 weeks or so to update their plugins/modules/etc before updating CiviCRM to 5.62 causes issues.https://lab.civicrm.org/dev/core/-/issues/4154Number field input validation does not respect decimal separator setting2024-03-20T10:36:25ZnoahNumber field input validation does not respect decimal separator settingOverview
----------------------------------------
This issue has to do with "number" (float) custom fields on some edit forms. When you enter a number containing any character other than a digit or a period (full stop) into such a field,...Overview
----------------------------------------
This issue has to do with "number" (float) custom fields on some edit forms. When you enter a number containing any character other than a digit or a period (full stop) into such a field, validation fails. This happens even if the offending character has been set as the decimal separator in Civi's localization settings.
Reproduction steps
----------------------------------------
1. Under Administer > Localization > Languages, Currency, Locations, set "Decimal Delimiter" to "," (comma).
1. Create a custom field extending Activities. Data type: Number.
1. Add a new activity. In the number field, enter a number that includes a comma, such as "123,45" (one hundred twenty three and forty-five one-hundredths).
1. Press Save.
Current behaviour
----------------------------------------
Validation fails with the error message "[Custom Field Label] must be a number (with or without decimal point)."
Expected behaviour
----------------------------------------
The form should save the entered amount as (float) one hundred twenty three and forty-five one-hundredths.
Environment information
----------------------------------------
CiviCRM 5.60 (current master HEAD).
Comments
----------------------------------------
Somewhat entangled with #41525.68.0https://lab.civicrm.org/dev/core/-/issues/4152Data integrity issue: Some number fields change their values during data entry2023-03-24T02:46:14ZnoahData integrity issue: Some number fields change their values during data entryOverview
----------------------------------------
On some edit forms, when a number containing a comma is entered into a "number" (float) custom field, validation fails. This is reasonable behaviour if the decimal separator is something ...Overview
----------------------------------------
On some edit forms, when a number containing a comma is entered into a "number" (float) custom field, validation fails. This is reasonable behaviour if the decimal separator is something other than the comma character. (See related issue regarding validation and decimal separators: #4154)
However, in the re-displayed form, the value is silently changed, with everything after the comma stripped off. For example, "50,995.22" is changed to "50". The user is given another chance to submit the form, and if they don't notice the (incorrect) changed value, that incorrect value will be saved.
Reproduction steps
----------------------------------------
1. Create a custom field extending Activities. Data type: Number.
2. Add a new activity. In the number field, enter a number that includes a comma, such as "12,345".
Current behaviour
----------------------------------------
The first attempt to save the form fails. It is redisplayed. The second attempt succeeds. However, the number field has been changed -- the comma and everything to the right of it has been removed.
![comma](/uploads/8390d965ab04bb439a8f8c5b778c64c1/comma.gif)
Expected behaviour
----------------------------------------
Even if validation fails, the contents of the number field should not change without the user's intervention.
Environment information
----------------------------------------
CiviCRM master (5.60)
Notes
----------------------------------------
This issue happens in Activity edit forms (notably, _not_ Contact edit forms), but it may happen elsewhere too. I haven't tracked it down entirely, but the error seems to happen during the re-rendering of the form: `\CRM_Core_QuickForm_Action_Display::renderForm()`. Maybe in the Smarty layer?5.61.0https://lab.civicrm.org/dev/core/-/issues/3742Upgrade to 5.51.1 from 5.50.4 on Drupal through drush command2023-11-03T02:03:10ZmasettoUpgrade to 5.51.1 from 5.50.4 on Drupal through drush commandOverview
----------------------------------------
I tried updating a site from 5.50.3 to 5.51.1 and I received this error:
```
error] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
...Overview
----------------------------------------
I tried updating a site from 5.50.3 to 5.51.1 and I received this error:
```
error] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => UPDATE civicrm_queue SET status = NULL WHERE name = 'CRM_Upgrade' [nativecode=1054 ** Unknown column 'status' in 'field list']
[type] => DB_Error
[user_info] => UPDATE civicrm_queue SET status = NULL WHERE name = 'CRM_Upgrade' [nativecode=1054 ** Unknown column 'status' in 'field list']
[to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="UPDATE civicrm_queue SET status = NULL WHERE name = 'CRM_Upgrade' [nativecode=1054 ** Unknown column 'status' in 'field list']"]
)
```
Then I rebuild `civicrm_queue` manually:
```
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE civicrm_queue;
CREATE TABLE `civicrm_queue` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Name of the queue',
`type` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Type of the queue',
`runner` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Name of the task runner',
`batch_limit` int(10) unsigned NOT NULL DEFAULT 1 COMMENT 'Maximum number of items in a batch.',
`lease_time` int(10) unsigned NOT NULL DEFAULT 3600 COMMENT 'When claiming an item (or batch of items) for work, how long should the item(s) be reserved. (Seconds)',
`retry_limit` int(11) NOT NULL DEFAULT 0 COMMENT 'Number of permitted retries. Set to zero (0) to disable.',
`retry_interval` int(11) DEFAULT NULL COMMENT 'Number of seconds to wait before retrying a failed execution.',
`status` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT 'active' COMMENT 'Execution status',
`error` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Fallback behavior for unhandled errors',
`is_template` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'Is this a template configuration (for use by other/future queues)?',
PRIMARY KEY (`id`),
UNIQUE KEY `UI_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC
```
and the command `drush cvupdb` worked fine.
But the CiviCRM menu is no longer visible.
Reproduction steps
----------------------------------------
1. go to the Drupal site root dir
1. `composer update`
1. `drush cvupdb`
1. Got an error "**DB Error: no such field**".
2. CiviCRM menu is no longer visibile
Environment information
----------------------------------------
* __Browser:__ _Firefox 59.0.1/Chrome 78.0.3904/Safari 13_
* __CiviCRM:__ _CiviCRM 5.51.1_
* __PHP:__ _7.4_
* __CMS:__ Drupal 9_
* __Database:__ _10.5.12-MariaDB_https://lab.civicrm.org/dev/core/-/issues/3688Public group title is not shown anymore2023-08-24T21:16:13ZMariaVPublic group title is not shown anymoreI have noticed that the public group title is not shown anymore:
![grafik](/uploads/911d39beeaaf08a3c8ac470ba5dec98c/grafik.png)
When I choose "Newsletter" as a public title, I get an email with the internal title.
![grafik](/uploads/...I have noticed that the public group title is not shown anymore:
![grafik](/uploads/911d39beeaaf08a3c8ac470ba5dec98c/grafik.png)
When I choose "Newsletter" as a public title, I get an email with the internal title.
![grafik](/uploads/49b088764632b824f1c2e87c0bdd0023/grafik.png)5.65.0https://lab.civicrm.org/dev/core/-/issues/3629Extraneous space in From address causes on-hold set on all recipients2022-06-11T14:57:32ZBobSExtraneous space in From address causes on-hold set on all recipientsIf a CiviMail email is sent with a From address having the form<br>
`"Name" <me@example.com>` (note two spaces before '<')<br>
then:
1. No emails are sent
2. **All recipients are marked On-Hold!**
Occurs on CiviCRM 4.7.26.
*Edit*: Al...If a CiviMail email is sent with a From address having the form<br>
`"Name" <me@example.com>` (note two spaces before '<')<br>
then:
1. No emails are sent
2. **All recipients are marked On-Hold!**
Occurs on CiviCRM 4.7.26.
*Edit*: Also occurs on 5.2.1
Could not reproduce on demo site as sending email is not enabled there.
The following three CMS log entries are created for each recipient:
1:<pre>Ignoring exception thrown by nullHandler: , Validation failed for: "(INVALID)" <(INVALID)></pre>
2:<pre>$backTrace = #0 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Error.php(959): CRM_Core_Error::backtrace("backTrace", TRUE) #1 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/PEAR.php(921): CRM_Core_Error::nullHandler(Object(PEAR_Error)) #2 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/PEAR.php(577): PEAR_Error->__construct("Validation failed for: \"(INVALID)\" <(INVALID)>", NULL, 16, (Array:2), NULL) #3 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/PEAR.php(236): PEAR::_raiseError(NULL, "Validation failed for: \"(INVALID)\" <(INVALID)>") #4 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/Mail/RFC822.php(209): PEAR::__callStatic("raiseError", (Array:1)) #5 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/Mail.php(191): Mail_RFC822->parseAddressList((Array:2), "localhost", FALSE) #6 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/Mail/mail.php(151): Mail->prepareHeaders((Array:10)) #7 ...</pre>
3:<pre>
Notice: Only variables should be passed by reference in CRM_Mailing_BAO_MailingJob->deliverGroup() (line 721 of /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Mailing/BAO/MailingJob.php).
</pre>5.5.0https://lab.civicrm.org/dev/core/-/issues/3432Greenwich theme: transparent background on pop-ups2022-06-23T22:07:08ZherbdoolGreenwich theme: transparent background on pop-upsOn 5.48.2, using default (Greenwich) admin theme:
![2022-04-28_15.51.38_xm2.lndo.site_d1e1f03fb990](/uploads/678c53c44f0cdf394c4e3e3f87ef985f/2022-04-28_15.51.38_xm2.lndo.site_d1e1f03fb990.png)
And with "unstyled" admin theme:
![2022-...On 5.48.2, using default (Greenwich) admin theme:
![2022-04-28_15.51.38_xm2.lndo.site_d1e1f03fb990](/uploads/678c53c44f0cdf394c4e3e3f87ef985f/2022-04-28_15.51.38_xm2.lndo.site_d1e1f03fb990.png)
And with "unstyled" admin theme:
![2022-04-28_15.57.43_xm2.lndo.site_8080eb78c5ef](/uploads/bd8487b62e72dc3e201b708652319b9c/2022-04-28_15.57.43_xm2.lndo.site_8080eb78c5ef.png)
Using Drupal 9, Seven admin theme.
Environment information
----------------------------------------
* __Browser:__ Chrome
* __CiviCRM:__ 5.48.2
* __PHP:__ 7.4
* __CMS:__ Drupal 95.52.0https://lab.civicrm.org/dev/core/-/issues/3306Expired Membership Renewal Payment w/ Multiple Periods renews incorrectly wit...2023-12-29T05:03:21ZjptillmanExpired Membership Renewal Payment w/ Multiple Periods renews incorrectly with pending paymentI've got what seems like a membership renewal bug with latest Civi (5.29.1) / Drupal 8.
Repro:
* Have a member whose membership expired last year
* Choose to administratively "renew" them for 2 periods (using the optional period entry...I've got what seems like a membership renewal bug with latest Civi (5.29.1) / Drupal 8.
Repro:
* Have a member whose membership expired last year
* Choose to administratively "renew" them for 2 periods (using the optional period entry in the renewal form)
* Make the payment "Pending" and save. The fees are calculated correctly and the contribution is created as Pending.
* Go to the payment and "Receive payment"
* The membership only rolls forward one period when the contribution is finally completed.
Alternatively, if I make the payment "Complete" when filling out the renewal form (no pending payment), it works fine and rolls the membership forward 2 periods.https://lab.civicrm.org/dev/core/-/issues/2408Search kit - filter by groups2021-07-03T00:09:20ZeileenSearch kit - filter by groupsOn testing our first search-off-the-block with search kit I had some pretty bad performance issues (it didn't load). We used to have the same issue with CiviReport until I did some performance work which basically did the following
1) c...On testing our first search-off-the-block with search kit I had some pretty bad performance issues (it didn't load). We used to have the same issue with CiviReport until I did some performance work which basically did the following
1) created a temporary table of all the contact in the filtered group/s
2) used that table as the base table ie SELECT * FROM tempTABLE as hidden_table INNER JOIN civicrm_contact a ON a.id = hidden_table.id
3) told our users to always include a group filter in any reports
I worry that our thinking about how to 'properly' solve the groups issue might be blocking us from 'a solution that works as well as our existing searches/reports' - which could have some pretty big constraints on what is permitted (ie. you can filter by membership in specific group ids but that's it - which is pretty much all that works well currently) - as long as the api signature is OK-ish we can change what is under the hood later
Note the report in question was a Lybunt but the above does pretty much apply to all our reports
@totten @colemanw @seamuslee5.39.0https://lab.civicrm.org/dev/core/-/issues/2407Search kit uses a maria-db-reserved word2021-02-22T23:05:46ZeileenSearch kit uses a maria-db-reserved wordI found that when running the count query I was getting a db error - it turned out the word 'rows' in the below query is reserved in Maria DB from 10.2.4
```
SELECT count(*) AS `c` FROM ( SELECT `a`.`id` AS `id` FROM civicrm_contact a I...I found that when running the count query I was getting a db error - it turned out the word 'rows' in the below query is reserved in Maria DB from 10.2.4
```
SELECT count(*) AS `c` FROM ( SELECT `a`.`id` AS `id` FROM civicrm_contact a INNER JOIN `civicrm_contribution` `Contact_Contribution_contact_id_01` ON `Contact_Contribution_contact_id_01`.`contact_id` = `a`.`id` AND `a`.`id` = `Contact_Contribution_contact_id_01`.`contact_id` AND
blah blah
WHERE bla blah GROUP BY `a`.`id` ) AS rows;
```
https://mariadb.com/kb/en/reserved-words/5.35.0https://lab.civicrm.org/dev/core/-/issues/2198CiviMail "DB error": suspected core bug relating to attachment replace api2022-09-25T16:43:26ZedwardpetersCiviMail "DB error": suspected core bug relating to attachment replace apiOverview
----------------------------------------
In CiviMail, trying to send a Test mailing gives "Error - DB error - unknown error" on screen, see screenshot, and mail cannot be sent. Seems to be triggered by attachment replace api.
![...Overview
----------------------------------------
In CiviMail, trying to send a Test mailing gives "Error - DB error - unknown error" on screen, see screenshot, and mail cannot be sent. Seems to be triggered by attachment replace api.
![DBerror](/uploads/ae853f717ef1eecd051b826ff91b20de/DBerror.png)
Reproduction steps
----------------------------------------
1. Mailing -> New Mailing
2. Proceed to mailing template (I am using Mosaico) and try to send a Test.
Current behaviour
----------------------------------------
Error in the Civi Log is:
```
Nov 17 12:28:40 [error] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => ROLLBACK TO SAVEPOINT civi_0 [nativecode=1305 ** SAVEPOINT civi_0 does not exist]
[type] => DB_Error
[user_info] => ROLLBACK TO SAVEPOINT civi_0 [nativecode=1305 ** SAVEPOINT civi_0 does not exist]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="ROLLBACK TO SAVEPOINT civi_0 [nativecode=1305 ** SAVEPOINT civi_0 does not exist]"]
)
Nov 17 12:28:40 [debug] $backTrace = #0 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/CRM/Core/Error.php(942): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/sclgulf/public_html/sclgulf/vendor/pear/pear-core-minimal/src/PEAR.php(944): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /home/sclgulf/public_html/sclgulf/vendor/pear/db/DB.php(977): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "ROLLBACK TO SAVEPOINT civi_0 [nativecode=1305 ** SAVEPOINT civi_0 does not ex...")
#3 /home/sclgulf/public_html/sclgulf/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "ROLLBACK TO SAVEPOINT civi_0 [nativecode=1305 ** SAVEPOINT civi_0 does not ex...")
#4 /home/sclgulf/public_html/sclgulf/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "ROLLBACK TO SAVEPOINT civi_0 [nativecode=1305 ** SAVEPOINT civi_0 does not ex...", "DB_Error", TRUE)
#5 /home/sclgulf/public_html/sclgulf/vendor/pear/db/DB/common.php(1913): PEAR->__call("raiseError", (Array:7))
#6 /home/sclgulf/public_html/sclgulf/vendor/pear/db/DB/mysqli.php(932): DB_common->raiseError(-1, NULL, NULL, "ROLLBACK TO SAVEPOINT civi_0 [nativecode=1305 ** SAVEPOINT civi_0 does not ex...", "1305 ** SAVEPOINT civi_0 does not exist")
#7 /home/sclgulf/public_html/sclgulf/vendor/pear/db/DB/mysqli.php(402): DB_mysqli->mysqliRaiseError()
#8 /home/sclgulf/public_html/sclgulf/vendor/pear/db/DB/common.php(1219): DB_mysqli->simpleQuery("ROLLBACK TO SAVEPOINT civi_0")
#9 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/packages/DB/DataObject.php(2696): DB_common->query("ROLLBACK TO SAVEPOINT civi_0")
#10 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/packages/DB/DataObject.php(1829): DB_DataObject->_query("ROLLBACK TO SAVEPOINT civi_0")
#11 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/CRM/Core/DAO.php(445): DB_DataObject->query("ROLLBACK TO SAVEPOINT civi_0")
#12 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/Civi/Core/Transaction/Frame.php(153): CRM_Core_DAO->query("ROLLBACK TO SAVEPOINT civi_0")
#13 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/Civi/Core/Transaction/Manager.php(103): Civi\Core\Transaction\Frame->finish()
#14 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/CRM/Core/Transaction.php(126): Civi\Core\Transaction\Manager->dec()
#15 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/CRM/Core/Transaction.php(175): CRM_Core_Transaction->commit()
#16 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/Civi/API/Subscriber/DynamicFKAuthorization.php(240): CRM_Core_Transaction->run(Object(Closure))
#17 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/Civi/API/Subscriber/DynamicFKAuthorization.php(181): Civi\API\Subscriber\DynamicFKAuthorization->authorizeDelegate("get", "civicrm_mailing", "130", (Array:8))
#18 /home/sclgulf/public_html/sclgulf/vendor/symfony/event-dispatcher/EventDispatcher.php(214): Civi\API\Subscriber\DynamicFKAuthorization->onApiAuthorize(Object(Civi\API\Event\AuthorizeEvent), "civi.api.authorize", Object(Civi\Core\CiviEventDispatcher))
#19 /home/sclgulf/public_html/sclgulf/vendor/symfony/event-dispatcher/EventDispatcher.php(44): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch((Array:5), "civi.api.authorize", Object(Civi\API\Event\AuthorizeEvent))
#20 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/Civi/Core/CiviEventDispatcher.php(129): Symfony\Component\EventDispatcher\EventDispatcher->dispatch("civi.api.authorize", Object(Civi\API\Event\AuthorizeEvent))
#21 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(219): Civi\Core\CiviEventDispatcher->dispatch("civi.api.authorize", Object(Civi\API\Event\AuthorizeEvent))
#22 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(148): Civi\API\Kernel->authorize(Object(Civi\API\Provider\MagicFunctionProvider), (Array:8))
#23 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest((Array:8))
#24 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/api/api.php(22): Civi\API\Kernel->runSafe("Attachment", "get", (Array:4))
#25 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/api/v3/utils.php(1800): civicrm_api("Attachment", "get", (Array:4), (Array:5))
#26 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/api/v3/Generic.php(398): _civicrm_api3_generic_replace("Attachment", (Array:5))
#27 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/Civi/API/Provider/MagicFunctionProvider.php(85): civicrm_api3_generic_replace((Array:8))
#28 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(150): Civi\API\Provider\MagicFunctionProvider->invoke((Array:8))
#29 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest((Array:8))
#30 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/api/api.php(22): Civi\API\Kernel->runSafe("Attachment", "replace", (Array:5))
#31 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/CRM/Utils/REST.php(300): civicrm_api("Attachment", "replace", (Array:5))
#32 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/CRM/Utils/REST.php(550): CRM_Utils_REST::process((Array:3), (Array:5))
#33 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(278): CRM_Utils_REST::ajax()
#34 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:12))
#35 /home/sclgulf/public_html/sclgulf/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
#36 /home/sclgulf/public_html/sclgulf/web/modules/contrib/civicrm/src/Civicrm.php(88): CRM_Core_Invoke::invoke((Array:3))
#37 /home/sclgulf/public_html/sclgulf/web/modules/contrib/civicrm/src/Controller/CivicrmController.php(80): Drupal\civicrm\Civicrm->invoke((Array:3))
#38 [internal function](): Drupal\civicrm\Controller\CivicrmController->main((Array:3), "")
#39 /home/sclgulf/public_html/sclgulf/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array((Array:2), (Array:2))
#40 /home/sclgulf/public_html/sclgulf/web/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#41 /home/sclgulf/public_html/sclgulf/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#42 /home/sclgulf/public_html/sclgulf/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext((Array:2), (Array:2))
#43 /home/sclgulf/public_html/sclgulf/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#44 /home/sclgulf/public_html/sclgulf/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#45 /home/sclgulf/public_html/sclgulf/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#46 /home/sclgulf/public_html/sclgulf/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#47 /home/sclgulf/public_html/sclgulf/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#48 /home/sclgulf/public_html/sclgulf/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#49 /home/sclgulf/public_html/sclgulf/web/modules/contrib/shield/src/ShieldMiddleware.php(91): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#50 /home/sclgulf/public_html/sclgulf/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\shield\ShieldMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#51 /home/sclgulf/public_html/sclgulf/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#52 /home/sclgulf/public_html/sclgulf/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#53 /home/sclgulf/public_html/sclgulf/web/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, TRUE)
#54 /home/sclgulf/public_html/sclgulf/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#55 {main}
```
Expected behaviour
----------------------------------------
Test mailing gets sent
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:__ _Safari 14.0.1_
* __CiviCRM:__ 5.29.0
* __PHP:__ _7.3__
* __CMS:__ _Drupal 8.96_
* __Database:__ _5.5.5-10.3.27-MariaDB_
* __Web Server:__ _Apache_
Comments
----------------------------------------
My developer says he thinks it is a core bug. "the error seems to be around transaction and how it's being rollbacked".
He has done a temporary patch so that mailings can get sent:
```
[~/www/sclgulf/vendor/civicrm/civicrm-core/api/v3]# diff utils.php utils.php.orig
1800,1805c1800,1803
< if ($entity != 'Attachment') {
< $preexisting = civicrm_api($entity, 'get', $baseParams, $params);
< if (civicrm_error($preexisting)) {
< $transaction->rollback();
< return $preexisting;
< }
---
> $preexisting = civicrm_api($entity, 'get', $baseParams, $params);
> if (civicrm_error($preexisting)) {
> $transaction->rollback();
> return $preexisting;
```5.52.0https://lab.civicrm.org/dev/core/-/issues/2091Participant join not working in search2020-12-17T20:00:42ZeileenParticipant join not working in searchURL
https://dmaster.demo.civicrm.org/civicrm/search#/create/Contact/?join=%5B%5B%22Participant%20AS%20participants%22,true%5D%5D
![Screen_Shot_2020-10-05_at_3.16.38_PM](/uploads/aaa16d483d6acf36f733d2335c608a26/Screen_Shot_2020-10-05_a...URL
https://dmaster.demo.civicrm.org/civicrm/search#/create/Contact/?join=%5B%5B%22Participant%20AS%20participants%22,true%5D%5D
![Screen_Shot_2020-10-05_at_3.16.38_PM](/uploads/aaa16d483d6acf36f733d2335c608a26/Screen_Shot_2020-10-05_at_3.16.38_PM.png)
@colemanw - reported by @JonGold on chathttps://lab.civicrm.org/dev/core/-/issues/2067Add relative date searching on search creator2021-01-19T03:57:57ZeileenAdd relative date searching on search creator5.34.0https://lab.civicrm.org/dev/core/-/issues/2030Dropdown for country seems to have reverted to a regular select instead of se...2020-09-22T22:47:09ZDaveDDropdown for country seems to have reverted to a regular select instead of select2Meant to record this earlier and forgot. For example on a contribution page the country dropdown is a regular select. It all works though.
I think it reverted around 5.27-ish.Meant to record this earlier and forgot. For example on a contribution page the country dropdown is a regular select. It all works though.
I think it reverted around 5.27-ish.5.31.0