CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2022-06-11T14:54:52Zhttps://lab.civicrm.org/dev/core/-/issues/3583Incorrect Total Count on mail summary report2022-06-11T14:54:52ZMonish DebIncorrect Total Count on mail summary reportWhen you visit the mail summary report, the `Total Count` is incorrect which includes the open count of all mailings, instead of its corresponding mail.
Here's the screenshot to show the difference in count.
Mailing Summary report(sho...When you visit the mail summary report, the `Total Count` is incorrect which includes the open count of all mailings, instead of its corresponding mail.
Here's the screenshot to show the difference in count.
Mailing Summary report(shows incorrect `Total opens` count which is 6):
![Screen_Shot_2018-06-01_at_5.29.57_PM](/uploads/24f196c6e8f88d138b4e557b8c52572a/Screen_Shot_2018-06-01_at_5.29.57_PM.png)
Mailing Status page(shows correct `Total Opens` count which is 5):
![Screen_Shot_2018-06-01_at_5.28.48_PM](/uploads/741cb845269b8f408fe535b0ab080528/Screen_Shot_2018-06-01_at_5.28.48_PM.png)5.3.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/3261Membership Detail Report fails when ACLs are enabled2022-04-22T15:53:02ZJonGoldMembership Detail Report fails when ACLs are enabledDuring a tidy-up on the Membership Detail Report, the `from()` method was modified to use `CRM_Report_Form::setFromBase()`, which concatenates `$this->aclFrom`. However, concatenating `$this->aclFrom` was never removed from the child cl...During a tidy-up on the Membership Detail Report, the `from()` method was modified to use `CRM_Report_Form::setFromBase()`, which concatenates `$this->aclFrom`. However, concatenating `$this->aclFrom` was never removed from the child class, so it's added to the SQL statement twice.5.3.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3258CiviReports issue with boolean fields2022-04-22T15:52:59ZMWestergaardCiviReports issue with boolean fieldsI recently noticed that boolean fields (Deceased, Do Not Email, Do Not SMS, etc) are all displayed as "Yes" on contact and membership reports, regardless of their actual values. The data itself is correct and is fine elsewhere, such as i...I recently noticed that boolean fields (Deceased, Do Not Email, Do Not SMS, etc) are all displayed as "Yes" on contact and membership reports, regardless of their actual values. The data itself is correct and is fine elsewhere, such as in search results and contact displays. The issue seems to be only on report display. The report filters work correctly on those fields, only the display is wrong. I checked my production system (CiviHosting), my dev system (personal Linux box), and the public WordPress demo system at wpmaster.demo.civicrm.org and I see the same thing. I tried the Drupal demo system at CiviHosting and did not see this issue. Perhaps it's an issue under WordPress. I was advised on StackExchange to submit as an issue.
My system is CiviCRM 5.2.2, WordPress 4.9.6, PHP 7.1.16, MySQL 5.7.21.5.3.0https://lab.civicrm.org/dev/core/-/issues/229sending test email fails with: Error in call to Mailing_send_test : job_id is...2018-07-03T23:26:03Zjamiesending test email fails with: Error in call to Mailing_send_test : job_id is not valid : 440Since upgrading from 4.28 to 5.3 beta, sending a test message results in the error above and the callback documented below.
https://github.com/civicrm/civicrm-core/pull/12399
It seems that the API call to create the mailing_job is pass...Since upgrading from 4.28 to 5.3 beta, sending a test message results in the error above and the callback documented below.
https://github.com/civicrm/civicrm-core/pull/12399
It seems that the API call to create the mailing_job is passed (as the 'id' parameter) the mailing_id.
As a result, it either fails with the message above (if there is no mailing job id that matches) or worse, it overwrites an existing mailing_job row if it exists. Yipes.
My quick and dirty fix is:
```
0 jamie@turkey:civicrm$ diff -u api/v3/Mailing.php.orig api/v3/Mailing.php
--- api/v3/Mailing.php.orig 2018-07-02 15:32:28.317320362 -0400
+++ api/v3/Mailing.php 2018-07-02 15:32:48.988913106 -0400
@@ -620,6 +620,7 @@
);
$testEmailParams = _civicrm_api3_generic_replace_base_params($params);
+ unset($testEmailParams['id']);
$testEmailParams['is_test'] = 1;
$testEmailParams['status'] = 'Scheduled';
$testEmailParams['scheduled_date'] = CRM_Utils_Date::processDate(date('Y-m-d'), date('H:i:s'));
1 jamie@turkey:civicrm$
```
But since that code has not changed much recently I suspect a breaking change may have happened else where.
```
Jul 02 15:23:35 [info] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -3
[message] => DB Error: constraint violation
[mode] => 16
[debug_info] => INSERT INTO civicrm_mailing_event_queue (job_id , email_id , contact_id , hash ) VALUES ( 440 , 8326 , 8138 , 'f48d1f63168a98f3' ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`southernvision`.`civicrm_mailing_event_queue`, CONSTRAINT `FK_civicrm_mailing_event_queue_job_id` FOREIGN KEY (`job_id`) REFERENCES `civicrm_mailing_job` (`id`) ON DELETE CASCADE)]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_mailing_event_queue (job_id , email_id , contact_id , hash ) VALUES ( 440 , 8326 , 8138 , 'f48d1f63168a98f3' ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`southernvision`.`civicrm_mailing_event_queue`, CONSTRAINT `FK_civicrm_mailing_event_queue_job_id` FOREIGN KEY (`job_id`) REFERENCES `civicrm_mailing_job` (`id`) ON DELETE CASCADE)]
[to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="INSERT INTO civicrm_mailing_event_queue (job_id , email_id , contact_id , hash ) VALUES ( 440 , 8326 , 8138 , 'f48d1f63168a98f3' ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`southernvision`.`civicrm_mailing_event_queue`, CONSTRAINT `FK_civicrm_mailing_event_queue_job_id` FOREIGN KEY (`job_id`) REFERENCES `civicrm_mailing_job` (`id`) ON DELETE CASCADE)]"]
)
Jul 02 15:23:35 [info] $backTrace = #0 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/Error.php(948): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/powerbase/sites/all/modules/civicrm/packages/PEAR.php(921): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /var/www/powerbase/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: constraint violation", -3, 16, (Array:2), "INSERT INTO civicrm_mailing_event_queue (job_id , email_id , contact_id , has...")
#3 /var/www/powerbase/sites/all/modules/civicrm/packages/PEAR.php(575): DB_Error->__construct(-3, 16, (Array:2), "INSERT INTO civicrm_mailing_event_queue (job_id , email_id , contact_id , has...")
#4 /var/www/powerbase/sites/all/modules/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -3, 16, (Array:2), "INSERT INTO civicrm_mailing_event_queue (job_id , email_id , contact_id , has...", "DB_Error", TRUE)
#5 /var/www/powerbase/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->__call("raiseError", (Array:7))
#6 /var/www/powerbase/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-3, NULL, NULL, "INSERT INTO civicrm_mailing_event_queue (job_id , email_id , contact_id , has...", "1452 ** Cannot add or update a child row: a foreign key constraint fails (`so...")
#7 /var/www/powerbase/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /var/www/powerbase/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("INSERT INTO civicrm_mailing_event_queue (job_id , email_id , contact_id , has...")
#9 /var/www/powerbase/sites/all/modules/civicrm/packages/DB/DataObject.php(2443): DB_common->query("INSERT INTO civicrm_mailing_event_queue (job_id , email_id , contact_id , has...")
#10 /var/www/powerbase/sites/all/modules/civicrm/packages/DB/DataObject.php(1068): DB_DataObject->_query("INSERT INTO civicrm_mailing_event_queue (job_id , email_id , contact_id , has...")
#11 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/DAO.php(548): DB_DataObject->insert()
#12 /var/www/powerbase/sites/all/modules/civicrm/CRM/Mailing/Event/BAO/Queue.php(57): CRM_Core_DAO->save()
#13 /var/www/powerbase/sites/all/modules/civicrm/api/v3/utils.php(1288): CRM_Mailing_Event_BAO_Queue::create((Array:4), (Array:1))
#14 /var/www/powerbase/sites/all/modules/civicrm/api/v3/MailingEventQueue.php(53): _civicrm_api3_basic_create("CRM_Mailing_Event_BAO_Queue", (Array:4), "Queue")
#15 /var/www/powerbase/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_mailing_event_queue_create((Array:4))
#16 /var/www/powerbase/sites/all/modules/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#17 /var/www/powerbase/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:9))
#18 /var/www/powerbase/sites/all/modules/civicrm/api/api.php(43): Civi\API\Kernel->runSafe("MailingEventQueue", "create", (Array:4))
#19 /var/www/powerbase/sites/all/modules/civicrm/api/v3/Mailing.php(679): civicrm_api3("MailingEventQueue", "create", (Array:4))
#20 /var/www/powerbase/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_mailing_send_test((Array:10))
#21 /var/www/powerbase/sites/all/modules/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#22 /var/www/powerbase/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:9))
#23 /var/www/powerbase/sites/all/modules/civicrm/Civi/API/Kernel.php(77): Civi\API\Kernel->runSafe("mailing", "send_test", (Array:10), NULL)
#24 /var/www/powerbase/sites/all/modules/civicrm/Civi/API/Subscriber/ChainSubscriber.php(211): Civi\API\Kernel->run("mailing", "send_test", (Array:10))
#25 /var/www/powerbase/sites/all/modules/civicrm/Civi/API/Subscriber/ChainSubscriber.php(73): Civi\API\Subscriber\ChainSubscriber->callNestedApi(Object(Civi\API\Kernel), (Array:35), (Array:5), "create", "Mailing", 3)
#26 [internal function](): Civi\API\Subscriber\ChainSubscriber->onApiRespond(Object(Civi\API\Event\RespondEvent), "civi.api.respond", Object(Civi\Core\CiviEventDispatcher))
#27 /var/www/powerbase/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(164): call_user_func((Array:2), Object(Civi\API\Event\RespondEvent), "civi.api.respond", Object(Civi\Core\CiviEventDispatcher))
#28 /var/www/powerbase/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php(53): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch((Array:4), "civi.api.respond", Object(Civi\API\Event\RespondEvent))
#29 /var/www/powerbase/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php(167): Symfony\Component\EventDispatcher\EventDispatcher->dispatch("civi.api.respond", Object(Civi\API\Event\RespondEvent))
#30 /var/www/powerbase/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(47): Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch("civi.api.respond", Object(Civi\API\Event\RespondEvent))
#31 /var/www/powerbase/sites/all/modules/civicrm/Civi/API/Kernel.php(276): Civi\Core\CiviEventDispatcher->dispatch("civi.api.respond", Object(Civi\API\Event\RespondEvent))
#32 /var/www/powerbase/sites/all/modules/civicrm/Civi/API/Kernel.php(171): Civi\API\Kernel->respond(Object(Civi\API\Provider\MagicFunctionProvider), (Array:9), (Array:5))
#33 /var/www/powerbase/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:9))
#34 /var/www/powerbase/sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("Mailing", "create", (Array:35), NULL)
#35 /var/www/powerbase/sites/all/modules/civicrm/CRM/Utils/REST.php(311): civicrm_api("Mailing", "create", (Array:35))
#36 /var/www/powerbase/sites/all/modules/civicrm/CRM/Utils/REST.php(548): CRM_Utils_REST::process((Array:3), (Array:35))
#37 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/Invoke.php(275): CRM_Utils_REST::ajax()
#38 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:12))
#39 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#40 /var/www/powerbase/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:3))
#41 /var/www/powerbase/includes/menu.inc(527): civicrm_invoke("ajax", "rest")
#42 /var/www/powerbase/index.php(21): menu_execute_active_handler()
#43 {main}
```5.3.0https://lab.civicrm.org/dev/core/-/issues/2275.3 beta - cannot update custom group of fields without backtrace2018-07-03T14:10:12Zjamie5.3 beta - cannot update custom group of fields without backtraceTo reproduce:
* Create a custom group that is used for Activities and don't pick any activity types.
* Don't add any fields
* Edit the settings for the custom group and select an activity type for it to apply to
Result is a back trace ...To reproduce:
* Create a custom group that is used for Activities and don't pick any activity types.
* Don't add any fields
* Edit the settings for the custom group and select an activity type for it to apply to
Result is a back trace (but the changes are saved).
This seems to be a regression from c746070e750af03108bc267ed3a583a5943c0f97.
In particular - `CRM_Core_BAO_SchemaHandler::changeUniqueToIndex` is called from line 207. is_multiple is false (I'm not entirely sure what that means) which causes CRM_Core_BAO_SchemaHandler::changeUniqueToIndex to pass $dropUnique as FALSE, which then tries to drop a foreign key that doesn't exist.
If $dropUnique is TRUE there is no backtrace.
Thanks to everyone for the amazing 5.3 work - our first bug after a week of roll outs!
jamie
```
#0 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/Error.php(190): CRM_Core_Error::backtrace()
#1 /var/www/powerbase/sites/all/modules/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
#2 /var/www/powerbase/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: not found", -4, 16, (Array:2), " ALTER TABLE civicrm_value_proposal_info_8\nDROP INDEX `FK_civicrm_value_prop...")
#3 /var/www/powerbase/sites/all/modules/civicrm/packages/PEAR.php(575): DB_Error->__construct(-4, 16, (Array:2), " ALTER TABLE civicrm_value_proposal_info_8\nDROP INDEX `FK_civicrm_value_prop...")
#4 /var/www/powerbase/sites/all/modules/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -4, 16, (Array:2), " ALTER TABLE civicrm_value_proposal_info_8\nDROP INDEX `FK_civicrm_value_prop...", "DB_Error", TRUE)
#5 /var/www/powerbase/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->__call("raiseError", (Array:7))
#6 /var/www/powerbase/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-4, NULL, NULL, " ALTER TABLE civicrm_value_proposal_info_8\nDROP INDEX `FK_civicrm_value_prop...", "1091 ** Can't DROP 'FK_civicrm_value_proposal_info_8_entity_id'; check that c...")
#7 /var/www/powerbase/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /var/www/powerbase/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery(" ALTER TABLE civicrm_value_proposal_info_8\nDROP INDEX `FK_civicrm_value_prop...")
#9 /var/www/powerbase/sites/all/modules/civicrm/packages/DB/DataObject.php(2443): DB_common->query(" ALTER TABLE civicrm_value_proposal_info_8\nDROP INDEX `FK_civicrm_value_prop...")
#10 /var/www/powerbase/sites/all/modules/civicrm/packages/DB/DataObject.php(1635): DB_DataObject->_query(" ALTER TABLE civicrm_value_proposal_info_8\nDROP INDEX `FK_civicrm_value_prop...")
#11 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/DAO.php(415): DB_DataObject->query(" ALTER TABLE civicrm_value_proposal_info_8\nDROP INDEX `FK_civicrm_value_prop...")
#12 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/DAO.php(1371): CRM_Core_DAO->query(" ALTER TABLE civicrm_value_proposal_info_8\nDROP INDEX `FK_civicrm_value_prop...", TRUE)
#13 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/BAO/SchemaHandler.php(411): CRM_Core_DAO::executeQuery(" ALTER TABLE civicrm_value_proposal_info_8\nDROP INDEX `FK_civicrm_value_prop...")
#14 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/BAO/CustomGroup.php(207): CRM_Core_BAO_SchemaHandler::changeUniqueToIndex("civicrm_value_proposal_info_8", "")
#15 /var/www/powerbase/sites/all/modules/civicrm/CRM/Custom/Form/Group.php(458): CRM_Core_BAO_CustomGroup::create((Array:16))
#16 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/Form.php(466): CRM_Custom_Form_Group->postProcess()
#17 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
#18 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Custom_Form_Group), "next", "Next")
#19 /var/www/powerbase/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Custom_Form_Group), "next")
#20 /var/www/powerbase/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Custom_Form_Group), "next")
#21 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("next")
#22 /var/www/powerbase/sites/all/modules/civicrm/CRM/Custom/Page/Group.php(172): CRM_Core_Controller->run()
#23 /var/www/powerbase/sites/all/modules/civicrm/CRM/Custom/Page/Group.php(139): CRM_Custom_Page_Group->edit("8", 2)
#24 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/Invoke.php(309): CRM_Custom_Page_Group->run((Array:4), NULL)
#25 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:16))
#26 /var/www/powerbase/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#27 /var/www/powerbase/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:4))
#28 /var/www/powerbase/includes/menu.inc(527): civicrm_invoke("admin", "custom", "group")
#29 /var/www/powerbase/index.php(21): menu_execute_active_handler()
#30 {main}
```5.3.0https://lab.civicrm.org/dev/core/-/issues/211Update to payment instrument shows incorrect type(a/c) for all transaction2018-07-04T15:06:09ZPradeep Nayakpradpnayak@gmail.comUpdate to payment instrument shows incorrect type(a/c) for all transaction**To replicate:**
* Create completed contribution with payment method as 'Check' using New contribution form.
* Change the payment method from Check to cash for above contribution using edit contribution form.
**Civi version:** 5.2.1
...**To replicate:**
* Create completed contribution with payment method as 'Check' using New contribution form.
* Change the payment method from Check to cash for above contribution using edit contribution form.
**Civi version:** 5.2.1
**CMS:** Drupal 7.59
![Under_contribution_tab](/uploads/64798523fc9d2032b6182f08fb4efa5b/Under_contribution_tab.png)
![bookkeeping_report](/uploads/a485a6085c3ec368a011037abaf12ba7/bookkeeping_report.png)
**Civi version:** 4.7.12
**CMS:** Drupal 7.59
![Bookkeeping_report](/uploads/88482694f125cc46bec0223c5b6e14c9/Bookkeeping_report.png)
![Contribution_tab](/uploads/66c8bf22e294e11cfaa17ca50724419c/Contribution_tab.png)5.3.0https://lab.civicrm.org/dev/core/-/issues/163Disabled Groups used for mailings block access to mailing reports2018-10-14T00:59:59ZseamusleeDisabled Groups used for mailings block access to mailing reportsWhen a group that was used to send a mailing is disabled, that blocks access to the past mailing as the mailingACLIDs only checks for enabled groupsWhen a group that was used to send a mailing is disabled, that blocks access to the past mailing as the mailingACLIDs only checks for enabled groups5.3.0seamusleeseamusleehttps://lab.civicrm.org/dev/core/-/issues/162Use checksum to access user dashboard2019-02-14T17:34:43ZjitendraUse checksum to access user dashboardSE - https://civicrm.stackexchange.com/questions/8619/using-checksums-to-access-the-civicrm-user-dashboardSE - https://civicrm.stackexchange.com/questions/8619/using-checksums-to-access-the-civicrm-user-dashboard5.3.0jitendrajitendrahttps://lab.civicrm.org/dev/core/-/issues/160Import Progress bar polls server too often2018-06-05T04:12:17ZseamusleeImport Progress bar polls server too oftenThe import progress bar polls the server every 5 milliseconds for progress rather 5 seconds which is what i think the expectation was meant to beThe import progress bar polls the server every 5 milliseconds for progress rather 5 seconds which is what i think the expectation was meant to be5.3.0seamusleeseamusleehttps://lab.civicrm.org/dev/core/-/issues/157Do not delete indexes if they are needed for foreign keys2019-02-24T21:11:32ZMichael McAndrewDo not delete indexes if they are needed for foreign keysBefore
------
When changing a custom field from searchable to not searchable, CiviCRM tries to remove the index. This causes a fatal error when the column is also a foreign key to another table because the index is needed for the foreig...Before
------
When changing a custom field from searchable to not searchable, CiviCRM tries to remove the index. This causes a fatal error when the column is also a foreign key to another table because the index is needed for the foreign key.
After
-----
We ensure that the column is not an FK before removing the index
Technical details
-----------------
I added a test to CustomFieldTest which exercises this functionality5.3.0https://lab.civicrm.org/dev/core/-/issues/156Only set defaults when creating a custom field (not when editing one)2020-11-05T22:07:08ZMichael McAndrewOnly set defaults when creating a custom field (not when editing one)Before
----------------------------------------
When editing a custom field via the API, any values that were not supplied would revert to the default
After
----------------------------------------
When editing current values are loa...Before
----------------------------------------
When editing a custom field via the API, any values that were not supplied would revert to the default
After
----------------------------------------
When editing current values are loaded via the ->find() method.
See test for more details5.3.0https://lab.civicrm.org/dev/core/-/issues/154Can't edit related records when current employer has a pending membership2018-06-06T08:42:12ZUpperholmeCan't edit related records when current employer has a pending membershipI originally posted this in https://lab.civicrm.org/dev/core/issues/14 and Eileen suggested it might be a separate issue.
Using Civi 5.1 and D7. An org record exists and has a pending membership (created through a contribution page and ...I originally posted this in https://lab.civicrm.org/dev/core/issues/14 and Eileen suggested it might be a separate issue.
Using Civi 5.1 and D7. An org record exists and has a pending membership (created through a contribution page and opted to pay later). the membership is configured such that individuals linked via 'employed by' inherit the membership.
There are several related individual records, with the org as current employer. In anticipation of the payment being made and the membership going live, we want to edit the individual records to add further detail (just stuff like Job title, etc.) When trying to save any edits, we get the error message:
"The membership cannot be saved because the status cannot be calculated for start_date: null end_date null join_date null as at 2018-05-25 10:40:37"
The only workaround seems to be to edit the membership record and give it a start date and then override the status of the membership so that it remains pending.5.3.0https://lab.civicrm.org/dev/core/-/issues/143Contact 'World Region' Field not functioning properly in Search Builder2018-05-28T02:48:08ZMonish DebContact 'World Region' Field not functioning properly in Search BuilderTo reproduce:
'Search' -> 'Search Builder'.
Search for 'Contacts' -> 'World Region' -> '='.
Upon doing the above, the user is presented with a text box instead of the expected dropdown <select> menu.
If the user proceeds to use the une...To reproduce:
'Search' -> 'Search Builder'.
Search for 'Contacts' -> 'World Region' -> '='.
Upon doing the above, the user is presented with a text box instead of the expected dropdown <select> menu.
If the user proceeds to use the unexpected textbox and manually type in the World Region they are searching for, they get an error of the following kind:
Europe and Central Asia is not of the type Positive
This has been reproduced successfully on the test site at http://wpmaster.demo.civicrm.org
JIRA - https://issues.civicrm.org/jira/browse/CRM-203955.3.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/139Contribution Details Report throws DB error When trying to filter by soft_cre...2018-05-30T02:26:23ZyashodhaContribution Details Report throws DB error When trying to filter by soft_credit_type but not including soft creditsSteps to replicate:
Go to Contribution Details Report
In filters section, select Contribution OR Soft Credit? Is equal to Soft Credits Only and Soft Credit Type Is Solicited
When you run the report, you get following DB error:
`
Databas...Steps to replicate:
Go to Contribution Details Report
In filters section, select Contribution OR Soft Credit? Is equal to Soft Credits Only and Soft Credit Type Is Solicited
When you run the report, you get following DB error:
`
Database Error Code: Unknown column 'contribution_soft_civireport.soft_credit_type_id' in 'where clause', 1054
Additional Details:
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => CREATE TEMPORARY TABLE civireport_contribution_detail_temp1 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci AS SELECT SQL_CALC_FOUND_ROWS GROUP_CONCAT(DISTINCT contact_civireport.sort_name) as civicrm_contact_sort_name, GROUP_CONCAT(DISTINCT contact_civireport.id) as civicrm_contact_id, GROUP_CONCAT(DISTINCT email_civireport.email) as civicrm_email_email, GROUP_CONCAT(DISTINCT phone_civireport.phone) as civicrm_phone_phone, (contribution_civireport.id) as civicrm_contribution_contribution_id, GROUP_CONCAT(DISTINCT contribution_civireport.financial_type_id) as civicrm_contribution_financial_type_id, GROUP_CONCAT(DISTINCT contribution_civireport.currency) as civicrm_contribution_currency, GROUP_CONCAT(DISTINCT contribution_civireport.receive_date) as civicrm_contribution_receive_date, sum(contribution_civireport.total_amount) as civicrm_contribution_total_amount_sum, GROUP_CONCAT(DISTINCT 'Contribution') as civicrm_contribution_contribution_or_soft, GROUP_CONCAT(DISTINCT address_civireport.country_id) as civicrm_address_country_id FROM civicrm_contact contact_civireport
INNER JOIN civicrm_contribution contribution_civireport
ON contact_civireport.id = contribution_civireport.contact_id
AND contribution_civireport.is_test = 0
LEFT JOIN civicrm_phone phone_civireport
ON contact_civireport.id = phone_civireport.contact_id AND
phone_civireport.is_primary = 1
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.is_deleted = 0 ) AND (1) AND ( contribution_civireport.contribution_status_id IN (1) ) AND ( ( contribution_soft_civireport.soft_credit_type_id IN ( '3') ) ) GROUP BY contribution_civireport.id ORDER BY civicrm_contact_sort_name ASC LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contribution_soft_civireport.soft_credit_type_id' in 'where clause']
[type] => DB_Error
[user_info] => CREATE TEMPORARY TABLE civireport_contribution_detail_temp1 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci AS SELECT SQL_CALC_FOUND_ROWS GROUP_CONCAT(DISTINCT contact_civireport.sort_name) as civicrm_contact_sort_name, GROUP_CONCAT(DISTINCT contact_civireport.id) as civicrm_contact_id, GROUP_CONCAT(DISTINCT email_civireport.email) as civicrm_email_email, GROUP_CONCAT(DISTINCT phone_civireport.phone) as civicrm_phone_phone, (contribution_civireport.id) as civicrm_contribution_contribution_id, GROUP_CONCAT(DISTINCT contribution_civireport.financial_type_id) as civicrm_contribution_financial_type_id, GROUP_CONCAT(DISTINCT contribution_civireport.currency) as civicrm_contribution_currency, GROUP_CONCAT(DISTINCT contribution_civireport.receive_date) as civicrm_contribution_receive_date, sum(contribution_civireport.total_amount) as civicrm_contribution_total_amount_sum, GROUP_CONCAT(DISTINCT 'Contribution') as civicrm_contribution_contribution_or_soft, GROUP_CONCAT(DISTINCT address_civireport.country_id) as civicrm_address_country_id FROM civicrm_contact contact_civireport
INNER JOIN civicrm_contribution contribution_civireport
ON contact_civireport.id = contribution_civireport.contact_id
AND contribution_civireport.is_test = 0
LEFT JOIN civicrm_phone phone_civireport
ON contact_civireport.id = phone_civireport.contact_id AND
phone_civireport.is_primary = 1
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.is_deleted = 0 ) AND (1) AND ( contribution_civireport.contribution_status_id IN (1) ) AND ( ( contribution_soft_civireport.soft_credit_type_id IN ( '3') ) ) GROUP BY contribution_civireport.id ORDER BY civicrm_contact_sort_name ASC LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contribution_soft_civireport.soft_credit_type_id' in 'where clause']
[to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TEMPORARY TABLE civireport_contribution_detail_temp1 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci AS SELECT SQL_CALC_FOUND_ROWS GROUP_CONCAT(DISTINCT contact_civireport.sort_name) as civicrm_contact_sort_name, GROUP_CONCAT(DISTINCT contact_civireport.id) as civicrm_contact_id, GROUP_CONCAT(DISTINCT email_civireport.email) as civicrm_email_email, GROUP_CONCAT(DISTINCT phone_civireport.phone) as civicrm_phone_phone, (contribution_civireport.id) as civicrm_contribution_contribution_id, GROUP_CONCAT(DISTINCT contribution_civireport.financial_type_id) as civicrm_contribution_financial_type_id, GROUP_CONCAT(DISTINCT contribution_civireport.currency) as civicrm_contribution_currency, GROUP_CONCAT(DISTINCT contribution_civireport.receive_date) as civicrm_contribution_receive_date, sum(contribution_civireport.total_amount) as civicrm_contribution_total_amount_sum, GROUP_CONCAT(DISTINCT 'Contribution') as civicrm_contribution_contribution_or_soft, GROUP_CONCAT(DISTINCT address_civireport.country_id) as civicrm_address_country_id FROM civicrm_contact contact_civireport
INNER JOIN civicrm_contribution contribution_civireport
ON contact_civireport.id = contribution_civireport.contact_id
AND contribution_civireport.is_test = 0
LEFT JOIN civicrm_phone phone_civireport
ON contact_civireport.id = phone_civireport.contact_id AND
phone_civireport.is_primary = 1
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.is_deleted = 0 ) AND (1) AND ( contribution_civireport.contribution_status_id IN (1) ) AND ( ( contribution_soft_civireport.soft_credit_type_id IN ( '3') ) ) GROUP BY contribution_civireport.id ORDER BY civicrm_contact_sort_name ASC LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contribution_soft_civireport.soft_credit_type_id' in 'where clause']"]
)
`
I was able to replicate this on dmaster as well5.3.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/135Non Numeric value encountered in CRM_Batch_Form_entryTest on PHP7.1 and 7.22018-11-04T20:33:27ZseamusleeNon Numeric value encountered in CRM_Batch_Form_entryTest on PHP7.1 and 7.2```
<error type="PHPUnit_Framework_Error_Notice">CRM_Batch_Form_EntryTest::testMembershipRenewalDates
A non well formed numeric value encountered
/home/seamus/buildkit/build/47.demo/sites/all/modules/civicrm/CRM/Price/BAO/LineItem.php:...```
<error type="PHPUnit_Framework_Error_Notice">CRM_Batch_Form_EntryTest::testMembershipRenewalDates
A non well formed numeric value encountered
/home/seamus/buildkit/build/47.demo/sites/all/modules/civicrm/CRM/Price/BAO/LineItem.php:374
/home/seamus/buildkit/build/47.demo/sites/all/modules/civicrm/CRM/Price/BAO/PriceSet.php:747
/home/seamus/buildkit/build/47.demo/sites/all/modules/civicrm/CRM/Batch/Form/Entry.php:761
/home/seamus/buildkit/build/47.demo/sites/all/modules/civicrm/CRM/Batch/Form/Entry.php:922
/home/seamus/buildkit/build/47.demo/sites/all/modules/civicrm/tests/phpunit/CRM/Batch/Form/EntryTest.php:256
/home/seamus/buildkit/build/47.demo/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:192
/home/seamus/buildkit/bin/phpunit5:598
</error>
```
The relevant code is here https://github.com/civicrm/civicrm-core/blob/master/CRM/Price/BAO/LineItem.php#L374 i'm guessing its most likely going to be $qty that is NULL maybe5.3.0https://lab.civicrm.org/dev/core/-/issues/131Add in missing UK shire Monmouthshire2018-07-24T10:41:09ZseamusleeAdd in missing UK shire Monmouthshire5.3.0seamusleeseamusleehttps://lab.civicrm.org/dev/core/-/issues/128Add deprecated warning helper function2018-05-28T02:48:08Zmattwiremjw@mjwconsult.co.ukAdd deprecated warning helper functionOverview
----------------------------------------
This adds a standard method to log a deprecated function warning.
PR: https://github.com/civicrm/civicrm-core/pull/12040
Before
----------------------------------------
Deprecated func...Overview
----------------------------------------
This adds a standard method to log a deprecated function warning.
PR: https://github.com/civicrm/civicrm-core/pull/12040
Before
----------------------------------------
Deprecated function warnings were inconsistent and you have to put too much detail in the log line.
After
----------------------------------------
One simple function that autogenerates the log message based on caller.
Comments from previous PR #12007
----------------------------------------
@totten:
> I think @totten tried to enhance deprecated output at some point
Probably this: https://chat.civicrm.org/civicrm/pl/cf1p7hgkkprp9kthkosq98qrer
@mattwire
> A standalone helper function is more pithy than the Civi::log...civi.tag=>deprecated.... Pithy is good.
From r-code perspective, I don't like having that helper in CRM_Utils_System. That class is too heavy already, and deprecatedFunctionWarning() is qualitatively different from every other function in the class.
Yes, I agree. I wasn't sure where to "dump" the function. Maybe `CRM/Core/Error/Log.php` would be a better place for it?
> My main hesitation with cf1p7hgkkprp9kthkosq98qrer was that findNonLogCaller() felt a little heavy-handed. It's nice how deprecatedFunctionWarning() doesn't have to dig as far back into the callstack.
> On the other hand, it's nice how cf1p7hgkkprp9kthkosq98qrer works with the existing coding convention.
We don't actually log deprecated very much so I don't think it's a big change to convention.5.3.0https://lab.civicrm.org/dev/core/-/issues/126Soft Credit report redirect to Contribution Detail report doesn't filter cont...2018-05-21T12:01:59ZjrolfsSoft Credit report redirect to Contribution Detail report doesn't filter contact idIt looks like the names in the Soft Credit report no longer redirect to a Contribution Detail report that filters the results based on the contact's id. The same error occurs on dmaster.demo.civicrm.org.
![Snap_2018-05-17_at_16.53.45](/...It looks like the names in the Soft Credit report no longer redirect to a Contribution Detail report that filters the results based on the contact's id. The same error occurs on dmaster.demo.civicrm.org.
![Snap_2018-05-17_at_16.53.45](/uploads/229b8d3c6a85a76130928875c2616d94/Snap_2018-05-17_at_16.53.45.jpg)5.3.0https://lab.civicrm.org/dev/core/-/issues/123Import - Participant - Custom participant date fields are not formatted2022-06-11T16:02:19ZtschuettlerImport - Participant - Custom participant date fields are not formattedThe date fields are not converted from the import date format to the default date format and thus end up beeing imported with a date value of 0.
![image](/uploads/dda9843f54de137b5060553f4785655f/image.png)
Additionally 2 notice errors...The date fields are not converted from the import date format to the default date format and thus end up beeing imported with a date value of 0.
![image](/uploads/dda9843f54de137b5060553f4785655f/image.png)
Additionally 2 notice errors appear for each mapped custom particpant field in the import file:
>Notice: Undefined offset: 8 in CRM_Event_Import_Parser_Participant->import() (line 296 of /opt/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Event/Import/Parser/Participant.php).
>Notice: Undefined offset: 8 in CRM_Event_Import_Parser_Participant->import() (line 300 of /opt/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Event/Import/Parser/Participant.php).
Steps to reproduce:
1. Create a custom date field for participants
1. Import a participant with a non default date format: [participant_test.csv](/uploads/83f09e28f2435b819b41e120a9e28968/participant_test.csv)
See https://issues.civicrm.org/jira/browse/CRM-19386 for the same issue with activity imports.
A PR will be provided.5.3.0https://lab.civicrm.org/dev/core/-/issues/122Wrong Action Links Shown for Reserved and Locked Option Groups2018-05-19T06:07:03ZmichaelWrong Action Links Shown for Reserved and Locked Option GroupsIn #55 I hid the "delete" link for options in a locked option group. This has a bug as it will already not have the "delete" link if the option value is reserved:
```
if ($dao->is_reserved) {
$action = CRM_Core_Action::UPDATE;
}
```
...In #55 I hid the "delete" link for options in a locked option group. This has a bug as it will already not have the "delete" link if the option value is reserved:
```
if ($dao->is_reserved) {
$action = CRM_Core_Action::UPDATE;
}
```
So subtracting the `CRM_Core_Action::DELETE` will result in a negative value for `$action` and more links than expected will be shown.
This can be fixed by first checking if the `CRM_Core_Action::DELETE` flag is active before unsetting it.
---
Link to PR: https://github.com/civicrm/civicrm-core/pull/12154/files5.3.0