Development issueshttps://lab.civicrm.org/groups/dev/-/issues2020-09-18T01:07:09Zhttps://lab.civicrm.org/dev/core/-/issues/1973Email & Phone storage issues in event location2020-09-18T01:07:09ZjitendraEmail & Phone storage issues in event location**Email** - Second field value cannot be saved on form submit.
To replicate -
- Navigate to Event -> Location tab - https://dmaster.demo.civicrm.org/civicrm/event/manage/location?reset=1&action=update&id=3
- Enter a value for the secon...**Email** - Second field value cannot be saved on form submit.
To replicate -
- Navigate to Event -> Location tab - https://dmaster.demo.civicrm.org/civicrm/event/manage/location?reset=1&action=update&id=3
- Enter a value for the second email field and save. The second field is empty after the form is submitted. And Email2 value is displayed on the first email field
**Phone**: Every time the Location form is submitted, a new row is inserted in phone table even if it already exist.
To replicate -
- Navigate to Event -> Location tab - https://dmaster.demo.civicrm.org/civicrm/event/manage/location?reset=1&action=update&id=3
- Fill both the phone numbers and save.
- Re-save the form without changing any value. 2 new duplicate rows have been inserted in `civicrm_phone` table.
- This happens on every submission of the Location form.
Reverting https://github.com/civicrm/civicrm-core/pull/13534/files fixes both the above issues.5.31.0https://lab.civicrm.org/dev/core/-/issues/1187csv import only import one phone number2019-09-06T12:41:15ZJankcsv import only import one phone numberIf i import trough UI some contacts with different phone number types, eg. with fax and/or cell and/or phone, only one number is imported. In this repro in all cases with more than one number only the cell number is imported.
See attache...If i import trough UI some contacts with different phone number types, eg. with fax and/or cell and/or phone, only one number is imported. In this repro in all cases with more than one number only the cell number is imported.
See attached Screenshots and example-csv.
![image](/uploads/16219ba0a56c27d64b1a573261abe65d/image.png)
![image](/uploads/51ae5e5dd8c0bf9cd7ea3754db3c8da0/image.png)
![image](/uploads/7355ce9514f4d636493bdb1d607a80d1/image.png)
![image](/uploads/5c26413032a4191aa627f3a21923f6c2/image.png)
This record should have all phone types.
![image](/uploads/2534f104657ada8f3e8f827cc1529caa/image.png)
This record should have fax and cell.
![image](/uploads/fb472d742f06b046e5ae94ad1f379192/image.png)
This record should only have phone and have it.
![image](/uploads/a264850e382880dd0356069a6869872c/image.png)
[export_organizations-test.csv](/uploads/e32981489eeaf7d0185b8b3577751b3b/export_organizations-test.csv)
Sorry, screenshots are german only5.18.0https://lab.civicrm.org/dev/core/-/issues/1059Deprecation notice on Find Contributions when get there from Manage Contribut...2019-06-25T21:47:12ZDaveDDeprecation notice on Find Contributions when get there from Manage Contribution PagesReproduced on dmaster.demo.
`User deprecated function: Deprecated function CRM_Contribute_BAO_Query::whereClauseSingle, use search by receive_date. Array ( [civi.tag] => deprecated ) in CRM_Core_Error_Log->log() (line 69 of /srv/buildki...Reproduced on dmaster.demo.
`User deprecated function: Deprecated function CRM_Contribute_BAO_Query::whereClauseSingle, use search by receive_date. Array ( [civi.tag] => deprecated ) in CRM_Core_Error_Log->log() (line 69 of /srv/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Error/Log.php).`
1. Visit Manage contribution pages.
2. From the links on the right choose "Contributions".
3. Red warnings.
Looks like the deprecation was added last week:
https://github.com/civicrm/civicrm-core/pull/14533https://lab.civicrm.org/dev/core/-/issues/680"Date Received" for contributions no longer mandatory, also breaks financial ...2019-11-17T20:57:15Zfabian_SYSTOPIA"Date Received" for contributions no longer mandatory, also breaks financial transactionsThis issue affects at least versions >5.3 - I was able to reproduce it on the current master as well. I would consider it a rather critical bug but maybe there is more to it (new, not fully finished feature)?
**Description**
The contri...This issue affects at least versions >5.3 - I was able to reproduce it on the current master as well. I would consider it a rather critical bug but maybe there is more to it (new, not fully finished feature)?
**Description**
The contribution field "Date Received" used to be mandatory which imho had several good and important reasons. It is now possible to create a contribution without a date both via the UI and the Rest API.
Having a contribution without a date messes up views, reports and any function based on the contribution date such as receipts or invoices.
Also it creates a financial transaction without a date which cannot be good. In the UI, financial transactions still require a date.
**How to reproduce**
Create a new contribution via the UI and delete the date and time in the field "Date Received". Contribution date and financial transaction date will be empty.5.10https://lab.civicrm.org/dev/core/-/issues/337QuickForm Error on Contact Search Form when using select custom field of type...2021-01-06T22:42:24ZPradeep Nayakpradpnayak@gmail.comQuickForm Error on Contact Search Form when using select custom field of type IntegerTo Replicate:
Create a 'Select' custom field of type Integer or Number with 'Is this Field Searchable?' checked.
The Advance search form throws fatal error
```
Aug 17 10:16:57 [info] $Fatal Error Details = Array
(
[callback] => Ar...To Replicate:
Create a 'Select' custom field of type Integer or Number with 'Is this Field Searchable?' checked.
The Advance search form throws fatal error
```
Aug 17 10:16:57 [info] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -3
[message] => QuickForm Error: nonexistent html element
[mode] => 16
[debug_info] => Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()
[type] => HTML_QuickForm_Error
[user_info] => Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()
[to_string] => [html_quickform_error: message="nonexistent html element" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="QuickForm Error: " info="Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()"]
)
Aug 17 10:16:57 [info] $backTrace = #0 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/Error.php(232): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(HTML_QuickForm_Error))
#2 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/PEAR.php(921): call_user_func((Array:2), Object(HTML_QuickForm_Error))
#3 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/HTML/QuickForm.php(2084): PEAR_Error->__construct("nonexistent html element", -3, 16, (Array:2), "Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()")
#4 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/PEAR.php(575): HTML_QuickForm_Error->__construct(-3, 16, (Array:2), "Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()")
#5 [internal function](): PEAR::_raiseError(NULL, NULL, -3, NULL, 512, "Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()", "HTML_QuickForm_Error", TRUE)
#6 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/PEAR.php(237): call_user_func_array((Array:2), (Array:8))
#7 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/HTML/QuickForm.php(1076): PEAR::__callStatic("raiseError", (Array:7))
#8 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/HTML/QuickForm.php(1076): PEAR::raiseError(NULL, -3, NULL, 512, "Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()", "HTML_QuickForm_Error", TRUE)
#9 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/BAO/CustomField.php(1103): HTML_QuickForm->addRule("custom_8_from", "number-select From must be a number (with or without decimal point).", "numeric")
#10 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Contact/Form/Search/Criteria.php(567): CRM_Core_BAO_CustomField::addQuickFormElement(Object(CRM_Contact_Form_Search_Advanced), "custom_8", "8", FALSE, TRUE)
#11 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Contact/Form/Search/Advanced.php(150): CRM_Contact_Form_Search_Criteria::custom(Object(CRM_Contact_Form_Search_Advanced))
#12 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/Form.php(606): CRM_Contact_Form_Search_Advanced->buildQuickForm()
#13 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
#14 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contact_Form_Search_Advanced), "display")
#15 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Search_Advanced), "display")
#16 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
#17 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/Invoke.php(309): CRM_Core_Controller->run((Array:4), (Array:0))
#18 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#19 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#20 /var/www/html/civicrm-master/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:4))
#21 [internal function](): civicrm_invoke("contact", "search", "advanced")
#22 /var/www/html/civicrm-master/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
#23 /var/www/html/civicrm-master/index.php(21): menu_execute_active_handler()
#24 {main}
```
When i checked the field through database i found that this field has 'is_search_range' set to TRUE which should be only incase of text or date field i believe.5.9https://lab.civicrm.org/dev/core/-/issues/325Fatal error 'DB Error: no such field' on Contribution detail report2018-08-28T21:55:40ZPradeep Nayakpradpnayak@gmail.comFatal error 'DB Error: no such field' on Contribution detail report![before-patch](/uploads/a1f168c003724bf724eb8e4c0998e54c/before-patch.gif)
PR: https://github.com/civicrm/civicrm-core/pull/12660![before-patch](/uploads/a1f168c003724bf724eb8e4c0998e54c/before-patch.gif)
PR: https://github.com/civicrm/civicrm-core/pull/126605.6https://lab.civicrm.org/dev/core/-/issues/319Advanced search export: when location types' display names are different from...2018-08-27T01:41:01ZnoahAdvanced search export: when location types' display names are different from their machine names, empty columns are exportedEDITED to be more accurate following further investigation into the symptoms.
This is a regression in the last couple versions of Civi (I see it on 5.3.1 and 5.4.0, as well as 5.5-rc and master).
**Summary:** When exporting from advanc...EDITED to be more accurate following further investigation into the symptoms.
This is a regression in the last couple versions of Civi (I see it on 5.3.1 and 5.4.0, as well as 5.5-rc and master).
**Summary:** When exporting from advanced search, if you select email/phone/address fields to export _where the location type's display name is different from its machine name_, the headers for those columns will be included in the export, but the cells in those columns will be blank.
**To reproduce:**
1. Create a location type called "Field Office" with machine name "FieldOffice" or "FO"
1. Create a contact with a "Field Office" email.
1. Find that contact using advanced search and select the "export" task.
1. Select "Individual - Email - Field Office" as a field to export.
1. In the resulting CSV, there's a blank cell where the email address should be.
**Notes:** I also notice:
* the columns in the export are not in the same order as on the export column selection screen.
* exporting from Search Builder has a similar-but-different problem: if two location types are selected for export, only one of the columns will successfully be exported.
I see that quite a bit of work has gone into the Export code in recent releases and I suspect this regression happened as a result.
I'm interested in creating tests for this but I'd need someone to hold my hand through the process, as I have no recent experience doing that.5.5.0https://lab.civicrm.org/dev/core/-/issues/264Fatal Error on editting Financial Transaction2019-03-15T20:08:39ZtommyboboFatal Error on editting Financial TransactionIn 5.3.0 tested on Dev site and civicrmfr.org demo
1. Create a completed contribution.
2. Edit contribution by increasing contribution amount and net amount.
This will create a new financial transaction with NO Payment Instrument.
3...In 5.3.0 tested on Dev site and civicrmfr.org demo
1. Create a completed contribution.
2. Edit contribution by increasing contribution amount and net amount.
This will create a new financial transaction with NO Payment Instrument.
3. Edit new Financial Transaction to add Payment Instrument. Click Update - Get Spinning Logo Error
ConfigAndLog Records this error.
```
$Fatal Error Details = array(3) {
["message"]=>
string(65) "Mandatory key(s) missing from params array: payment_instrument_id"
["code"]=>
NULL
["exception"]=>
object(CiviCRM_API3_Exception)#323 (8) {
["extraParams":"CiviCRM_API3_Exception":private]=>
array(6) {
["fields"]=>
array(1) {
[0]=>
string(21) "payment_instrument_id"
}
["error_code"]=>
string(17) "mandatory_missing"
["entity"]=>
string(13) "FinancialTrxn"
["action"]=>
string(6) "create"
["is_error"]=>
int(1)
["error_message"]=>
string(65) "Mandatory key(s) missing from params array: payment_instrument_id"
}
["message":protected]=>
string(65) "Mandatory key(s) missing from params array: payment_instrument_id"
["string":"Exception":private]=>
string(0) ""
["code":protected]=>
int(0)
["file":protected]=>
string(65) "/server/public_html/sites/all/modules/civicrm/api/api.php"
["line":protected]=>
int(45)
["trace":"Exception":private]=>
array(15) {
[0]=>
array(4) {
["file"]=>
string(88) "/server/public_html/sites/all/modules/civicrm/CRM/Financial/Form/PaymentEdit.php"
["line"]=>
int(207)
["function"]=>
string(12) "civicrm_api3"
["args"]=>
array(3) {
[0]=>
string(13) "FinancialTrxn"
[1]=>
string(6) "create"
[2]=>
array(9) {
["to_financial_account_id"]=>
string(2) "23"
["trxn_date"]=>
string(19) "2018-07-16 17:23:00"
["total_amount"]=>
float(-10)
["fee_amount"]=>
float(0)
["net_amount"]=>
float(-10)
["currency"]=>
string(3) "USD"
["is_payment"]=>
string(1) "1"
["status_id"]=>
string(1) "1"
["contribution_id"]=>
string(5) "30997"
}
}
}
[1]=>
array(6) {
["file"]=>
string(88) "/server/public_html/sites/all/modules/civicrm/CRM/Financial/Form/PaymentEdit.php"
["line"]=>
int(175)
["function"]=>
string(6) "submit"
["class"]=>
string(30) "CRM_Financial_Form_PaymentEdit"
["type"]=>
string(2) "->"
["args"]=>
array(1) {
[0]=>
array(4) {
["id"]=>
string(5) "39513"
["payment_instrument_id"]=>
string(1) "3"
["trxn_id"]=>
string(0) ""
["trxn_date"]=>
string(19) "2018-07-16 17:23:00"
}
}
}
```5.3.1https://lab.civicrm.org/dev/core/-/issues/212Contribution Details report fails when "Is not one of" condition is used for ...2018-07-05T23:11:11ZscardiniusContribution Details report fails when "Is not one of" condition is used for Groups field# how to reproduce
* run CiviCRM 5.1.2
* open Report > Contribution Reports > Contribution Details
* click on Filters tab
* scroll down to Groups field
* change condition to "Is not one of"
* choose at least one group
* click Refresh re...# how to reproduce
* run CiviCRM 5.1.2
* open Report > Contribution Reports > Contribution Details
* click on Filters tab
* scroll down to Groups field
* change condition to "Is not one of"
* choose at least one group
* click Refresh results
* result: DB Error: no such field
# sql
sql error `Unknown column 'group_temp_table.id' in 'where clause'`
```
[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_temp2 DEFAULT
CHARACTER SET utf8 COLLATE utf8_unicode_ci AS 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 c
ivicrm_email_email, phone_civireport.phone as civicrm_phone_phone, contribution_civireport.id as civicrm_contribution_contribution_id, contribution_civireport.financial_type_id as civicrm_contribution_fin
ancial_type_id, contribution_civireport.currency as civicrm_contribution_currency, contribution_civireport.receive_date as civicrm_contribution_receive_date, contribution_soft_civireport.amount as civicrm
_contribution_total_amount, 'Soft Credit' as civicrm_contribution_contribution_or_soft, address_civireport.country_id as civicrm_address_country_id
FROM civireport_contribution_detail_temp1 temp1_civireport
INNER JOIN civicrm_contribution contribution_civireport
ON temp1_civireport.civicrm_contribution_contribution_id = contribution_civireport.id
INNER JOIN civicrm_contribution_soft contribution_soft_civireport
ON contribution_soft_civireport.contribution_id = contribution_civireport.id
INNER JOIN civicrm_contact contact_civireport
ON contact_civireport.id = contribution_soft_civireport.contact_id
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 (1) AND ( contribution_civireport.contribution_status_id IN (1) )
AND group_temp_table.id IS NULL
GROUP BY contact_civireport.id, contribution_civireport.id
[nativecode=1054 ** Unknown column 'group_temp_table.id' in 'where clause']"
]
```5.5.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/127Smart Group incorrect counts2018-06-05T10:42:15Zaydunsaidan.saunders@squiffle.ukSmart Group incorrect countsI'm seeing some strange behaviour with smart groups where the number of group members is wrong. This is on 5.1.2 but has been seen previously.
1. On the Manage Groups page, the counts show initially as 'unknown'.
1. Clicking the 'Upd...I'm seeing some strange behaviour with smart groups where the number of group members is wrong. This is on 5.1.2 but has been seen previously.
1. On the Manage Groups page, the counts show initially as 'unknown'.
1. Clicking the 'Update Smart Group Counts' then updates one particular group to have a count of 113.
1. Clicking Contacts then takes to a list of contacts - 113 of them.
1. Clicking 'Edit Smart Group Search Criteria for ...' then shows 2 contacts - which is correct.
The smart group criteria are:
> Membership Type = Associate Member ...AND...
> Is a current member ...AND...
> Primary Members Only ...AND...
> Contacts with a Relationship Type of: 'Correspondent 1 of'
I am seeing similar differences between the reported numbers and the right results for other smart groups so it does not seem to be specific to those criteria. FWIW several of the other groups also report 113 members - wrongly.
If I create a mailing with the smart group it reports ~107 which would be about right if it really were 113 group members as a few are on hold. But it should just be 2!
If I go to basic Search and put the groupname in the group box, then it correctly returns 2 contacts.
* These results are as administrator, so it is not permission issues.
* PHP 7.1.16 (but seen when previously on 5.6)
* MySQL: Server version: 5.7.21-percona-sure2-log MySQL Community Server (GPL)
* `ONLY_FULL_GROUP_BY` is disabled
* Smart group cache timeout: 5
* Rebuild Smart Group Cache scheduled job: every 15 mins
https://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/106Search builder error on contact, group 'equals', and possibly other operators2018-07-23T14:06:06ZAndryg8Search builder error on contact, group 'equals', and possibly other operatorsIn 5.0.0 and 5.0.2rc we are observing a bug when Search Builder is set with a line like this:
Contacts Groups = [any group]
The log shows as below. We have seen the same thing with other operators too.
The same error appears to b...In 5.0.0 and 5.0.2rc we are observing a bug when Search Builder is set with a line like this:
Contacts Groups = [any group]
The log shows as below. We have seen the same thing with other operators too.
The same error appears to be happening on the Drupal Civi 4.7 demo site.
Thanks
`May 08 18:57:44 [info] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.sort_name as `sort_name`,
CONCAT_WS(',',
GROUP_CONCAT(DISTINCT IF(civicrm_group_contact.status = 'Added', civicrm_group_contact.group_id, '')),
GROUP_CONCAT(DISTINCT civicrm_group_contact_cache.group_id)
)
as groups FROM civicrm_contact contact_a LEFT JOIN civicrm_group_contact `civicrm_group_contact-121` ON (contact_a.id = `civicrm_group_contact-121`.contact_id AND `civicrm_group_contact-121`.status IN ('Added')) WHERE ( ( ( ( `civicrm_group_contact-121`.group_id = 121 ) ) ) ) AND (contact_a.is_deleted = 0) GROUP BY contact_a.id ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc [nativecode=1054 ** Unknown column 'civicrm_group_contact.status' in 'field list']
[type] => DB_Error
[user_info] => SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.sort_name as `sort_name`,
CONCAT_WS(',',
GROUP_CONCAT(DISTINCT IF(civicrm_group_contact.status = 'Added', civicrm_group_contact.group_id, '')),
GROUP_CONCAT(DISTINCT civicrm_group_contact_cache.group_id)
)
as groups FROM civicrm_contact contact_a LEFT JOIN civicrm_group_contact `civicrm_group_contact-121` ON (contact_a.id = `civicrm_group_contact-121`.contact_id AND `civicrm_group_contact-121`.status IN ('Added')) WHERE ( ( ( ( `civicrm_group_contact-121`.group_id = 121 ) ) ) ) AND (contact_a.is_deleted = 0) GROUP BY contact_a.id ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc [nativecode=1054 ** Unknown column 'civicrm_group_contact.status' in 'field list']
[to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.sort_name as `sort_name`,
CONCAT_WS(',',
GROUP_CONCAT(DISTINCT IF(civicrm_group_contact.status = 'Added', civicrm_group_contact.group_id, '')),
GROUP_CONCAT(DISTINCT civicrm_group_contact_cache.group_id)
)
as groups FROM civicrm_contact contact_a LEFT JOIN civicrm_group_contact `civicrm_group_contact-121` ON (contact_a.id = `civicrm_group_contact-121`.contact_id AND `civicrm_group_contact-121`.status IN ('Added')) WHERE ( ( ( ( `civicrm_group_contact-121`.group_id = 121 ) ) ) ) AND (contact_a.is_deleted = 0) GROUP BY contact_a.id ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc [nativecode=1054 ** Unknown column 'civicrm_group_contact.status' in 'field list']"]
)
`https://lab.civicrm.org/dev/core/-/issues/100Membership Detail report throw DB error2018-05-25T05:45:46ZyashodhaMembership Detail report throw DB errorMembership Detail report throw DB error due to acl clause applied twice.Membership Detail report throw DB error due to acl clause applied twice.5.3.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/95Fatal error searching by group via search builder2018-05-15T03:27:55ZeileenFatal error searching by group via search builder![Screenshot_2018-05-02_14.22.03](/uploads/a59e95214fc840c60aa3a04455254223/Screenshot_2018-05-02_14.22.03.png)
```
backTrace
#0 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Error.php(190): CRM_Core_Erro...![Screenshot_2018-05-02_14.22.03](/uploads/a59e95214fc840c60aa3a04455254223/Screenshot_2018-05-02_14.22.03.png)
```
backTrace
#0 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Error.php(190): CRM_Core_Error::backtrace()
#1 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
#2 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/packages/DB.php(987): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#3 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/packages/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#4 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", "DB_Error", TRUE)
#5 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/packages/DB/common.php(1912): PEAR->__call("raiseError", (Array:7))
#6 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-19, NULL, NULL, "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", "1054 ** Unknown column 'civicrm_group_contact.status' in 'field list'")
#7 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/packages/DB/common.php(1223): DB_mysqli->simpleQuery("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#9 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/packages/DB/DataObject.php(2447): DB_common->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#10 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/packages/DB/DataObject.php(1635): DB_DataObject->_query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#11 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/DAO.php(415): DB_DataObject->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#12 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/DAO.php(1371): CRM_Core_DAO->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", TRUE)
#13 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(4942): CRM_Core_DAO::executeQuery("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
#14 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Contact/Selector.php(1181): CRM_Contact_BAO_Query->searchQuery(NULL, NULL, NULL, FALSE, FALSE, TRUE)
#15 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Utils/PagerAToZ.php(108): CRM_Contact_Selector->alphabetQuery()
#16 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Utils/PagerAToZ.php(136): CRM_Utils_PagerAToZ::getDynamicCharacters(Object(CRM_Contact_Selector), FALSE)
#17 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Utils/PagerAToZ.php(52): CRM_Utils_PagerAToZ::createLinks(Object(CRM_Contact_Selector), NULL, FALSE)
#18 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Contact/Form/Search.php(865): CRM_Utils_PagerAToZ::getAToZBar(Object(CRM_Contact_Selector), NULL)
#19 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Contact/Form/Search/Builder.php(414): CRM_Contact_Form_Search->postProcess()
#20 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Form.php(453): CRM_Contact_Form_Search_Builder->postProcess()
#21 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Refresh.php(75): CRM_Core_Form->mainProcess()
#22 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Refresh->perform(Object(CRM_Contact_Form_Search_Builder), "refresh")
#23 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Search_Builder), "refresh")
#24 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("refresh")
#25 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Invoke.php(309): CRM_Core_Controller->run((Array:4), (Array:0))
#26 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#27 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#28 /Users/emcnaughton/buildkit/build/dmaster/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:4))
#29 /Users/emcnaughton/buildkit/build/dmaster/includes/menu.inc(519): civicrm_invoke("contact", "search", "builder")
#30 /Users/emcnaughton/buildkit/build/dmaster/index.php(21): menu_execute_active_handler()
#31 {main}
Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
DB Error: no such field
Error Details
Database Error Code: Unknown column 'civicrm_group_contact.status' in 'field list', 1054
Additional Details:
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.sort_name as `sort_name`,
CONCAT_WS(',',
GROUP_CONCAT(DISTINCT IF(civicrm_group_contact.status = 'Added', civicrm_group_contact.group_id, '')),
GROUP_CONCAT(DISTINCT civicrm_group_contact_cache.group_id)
)
as groups FROM civicrm_contact contact_a LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_6` ON contact_a.id = `civicrm_group_contact_cache_6`.contact_id WHERE ( ( ( ( `civicrm_group_contact_cache_6`.group_id IN ("6") ) ) ) ) AND (contact_a.is_deleted = 0) GROUP BY contact_a.id ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc [nativecode=1054 ** Unknown column 'civicrm_group_contact.status' in 'field list']
[type] => DB_Error
[user_info] => SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.sort_name as `sort_name`,
CONCAT_WS(',',
GROUP_CONCAT(DISTINCT IF(civicrm_group_contact.status = 'Added', civicrm_group_contact.group_id, '')),
GROUP_CONCAT(DISTINCT civicrm_group_contact_cache.group_id)
)
as groups FROM civicrm_contact contact_a LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_6` ON contact_a.id = `civicrm_group_contact_cache_6`.contact_id WHERE ( ( ( ( `civicrm_group_contact_cache_6`.group_id IN ("6") ) ) ) ) AND (contact_a.is_deleted = 0) GROUP BY contact_a.id ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc [nativecode=1054 ** Unknown column 'civicrm_group_contact.status' in 'field list']
[to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.sort_name as `sort_name`,
CONCAT_WS(',',
GROUP_CONCAT(DISTINCT IF(civicrm_group_contact.status = 'Added', civicrm_group_contact.group_id, '')),
GROUP_CONCAT(DISTINCT civicrm_group_contact_cache.group_id)
)
as groups FROM civicrm_contact contact_a LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_6` ON contact_a.id = `civicrm_group_contact_cache_6`.contact_id WHERE ( ( ( ( `civicrm_group_contact_cache_6`.group_id IN ("6") ) ) ) ) AND (contact_a.is_deleted = 0) GROUP BY contact_a.id ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc [nativecode=1054 ** Unknown column 'civicrm_group_contact.status' in 'field list']"]
)
```Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/91Prevent un-workable searches in search builder (was search builder improvements)2018-05-03T23:37:58ZMonish DebPrevent un-workable searches in search builder (was search builder improvements)Earlier there was a requirement where we need to remove specific MySQL operators which are not valid for specific data type e.g. String type doesn't work with >, <, <= and >= operators. And here's the fix https://github.com/civicrm/civic...Earlier there was a requirement where we need to remove specific MySQL operators which are not valid for specific data type e.g. String type doesn't work with >, <, <= and >= operators. And here's the fix https://github.com/civicrm/civicrm-core/commit/759094bdfa40531e4ec0cf0a644d9edd6b9247cf done earlier as per which it is fetching all columns which are String type and passing them into a separate JSON string identified as ```stringFields``` and another formatted list of valid string operators as ```stringOperators```. Similarly to identify date fields and to do a specific operation on such fields we are passing another variable ```dateFields```. These JSON object in JS are later used to specific operations. Now on the other hand, recently, I encountered another issue where the Boolean type columns don't work with IS EMPTY/IS NOT EMPTY operator and eventually leads to DB syntax error. So if I follow the same approach I need to assign another JSON string, which won't be an ideal fix. This lead me to do following 3 changes to improve the code:
1. Assign a single list of all data columns which are either Boolean, String or Date (as currently, these are the only kind that needs attention)
2. Use this list (as ```fieldTypes```) in JS to filter the operator or do field specific operations like covert a input search field to datepicker if the chosen search field is date kind.
3. Reduce list of variable assignment.5.2.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/89Batch update participants with checkboxes fails2019-03-28T15:57:21ZStoobBatch update participants with checkboxes fails![gl-1](/uploads/4ef7cf6b8b67b0e784fadb2002700cbc/gl-1.png)
![gl-2](/uploads/d4291f1ad6a2bdfaecfb654e754cceba/gl-2.png)
Error message.
> Sorry, due to an error... '' is not a valid option for field custom_93![gl-1](/uploads/4ef7cf6b8b67b0e784fadb2002700cbc/gl-1.png)
![gl-2](/uploads/d4291f1ad6a2bdfaecfb654e754cceba/gl-2.png)
Error message.
> Sorry, due to an error... '' is not a valid option for field custom_935.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/65When creating a manual event registration, the notes section (source) has a c...2018-04-23T04:52:53Zfreeform.stephWhen creating a manual event registration, the notes section (source) has a character limit but doesn't check for oneAttempted to manually add a participant to an event using the "Add event registration" tab on their CiviCRM profile, but the screen wouldn't save, the page just stays frozen and fails to complete.
Looking at the error log:
...[nativeco...Attempted to manually add a participant to an event using the "Add event registration" tab on their CiviCRM profile, but the screen wouldn't save, the page just stays frozen and fails to complete.
Looking at the error log:
...[nativecode=1406 ** Data too long for column 'source' at row 1]"]...
The 'source' field in table 'civicrm_participant' is the 'Notes' field that appears when you manually create an event entry, it has a character limit of 128, client attempted to insert a note that was 161 characters. The limit of this field should be checked before attempting to save to the DB.
---
**Full backtrace:**
```
Apr 17 09:54:57 [info] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => INSERT INTO civicrm_participant (contact_id , event_id , status_id , role_id , register_date , source , fee_level , fee_amount , discount_id , fee_currency ) VALUES ( 475 , 2 , 1 , '1' , 20180417095400 , 'Manual input of cc info for member who called from Mexico and had troubles with cards before deadline. I charged early bird rate. See transaction ID AAB156B9 -MW' , '�Regular (Includes automatic member discount of: $ 159.00 Discount for Regular SSC Members) - 1�Salmon - 1 Participant Count -1�' , 555.00 , NULL , 'CAD' ) [nativecode=1406 ** Data too long for column 'source' at row 1]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_participant (contact_id , event_id , status_id , role_id , register_date , source , fee_level , fee_amount , discount_id , fee_currency ) VALUES ( 475 , 2 , 1 , '1' , 20180417095400 , 'Manual input of cc info for member who called from Mexico and had troubles with cards before deadline. I charged early bird rate. See transaction ID AAB156B9 -MW' , '�Regular (Includes automatic member discount of: $ 159.00 Discount for Regular SSC Members) - 1�Salmon - 1 Participant Count -1�' , 555.00 , NULL , 'CAD' ) [nativecode=1406 ** Data too long for column 'source' at row 1]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_participant (contact_id , event_id , status_id , role_id , register_date , source , fee_level , fee_amount , discount_id , fee_currency ) VALUES ( 475 , 2 , 1 , '1' , 20180417095400 , 'Manual input of cc info for member who called from Mexico and had troubles with cards before deadline. I charged early bird rate. See transaction ID AAB156B9 -MW' , '�Regular (Includes automatic member discount of: $ 159.00 Discount for Regular SSC Members) - 1�Salmon - 1 Participant Count -1�' , 555.00 , NULL , 'CAD' ) [nativecode=1406 ** Data too long for column 'source' at row 1]"]
)
Apr 17 09:54:57 [info] $backTrace = #0 /sites/all/modules/contrib/civicrm/CRM/Core/Error.php(235): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /sites/all/modules/contrib/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /sites/all/modules/contrib/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), "INSERT INTO civicrm_participant (contact_id , event_id , status_id , role_id ...")
#4 /sites/all/modules/contrib/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), "INSERT INTO civicrm_participant (contact_id , event_id , status_id , role_id ...")
#5 /sites/all/modules/contrib/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -1, NULL, NULL, "INSERT INTO civicrm_participant (contact_id , event_id , status_id , role_id ...", "DB_Error", TRUE)
#6 /sites/all/modules/contrib/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-1, NULL, NULL, NULL, "1406 ** Data too long for column 'source' at row 1")
#7 /sites/all/modules/contrib/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
#8 /sites/all/modules/contrib/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("INSERT INTO civicrm_participant (contact_id , event_id , status_id , role_id ...")
#9 /sites/all/modules/contrib/civicrm/packages/DB/DataObject.php(2442): DB_common->query("INSERT INTO civicrm_participant (contact_id , event_id , status_id , role_id ...")
#10 /sites/all/modules/contrib/civicrm/packages/DB/DataObject.php(1060): DB_DataObject->_query("INSERT INTO civicrm_participant (contact_id , event_id , status_id , role_id ...")
#11 /sites/all/modules/contrib/civicrm/CRM/Core/DAO.php(442): DB_DataObject->insert()
#12 /sites/all/modules/contrib/civicrm/CRM/Event/BAO/Participant.php(141): CRM_Core_DAO->save()
#13 /sites/all/modules/contrib/civicrm/CRM/Event/BAO/Participant.php(204): CRM_Event_BAO_Participant::add((Array:44))
#14 /sites/all/modules/contrib/civicrm/CRM/Event/Form/Participant.php(1280): CRM_Event_BAO_Participant::create((Array:44))
#15 /sites/all/modules/contrib/civicrm/CRM/Core/Form.php(345): CRM_Event_Form_Participant->postProcess()
#16 /sites/all/modules/contrib/civicrm/CRM/Core/QuickForm/Action/Upload.php(166): CRM_Core_Form->mainProcess()
#17 /sites/all/modules/contrib/civicrm/CRM/Core/QuickForm/Action/Upload.php(133): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Event_Form_Participant), "upload")
#18 /sites/all/modules/contrib/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Event_Form_Participant), "upload")
#19 /sites/all/modules/contrib/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_Participant), "upload")
#20 /sites/all/modules/contrib/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("upload")
#21 /sites/all/modules/contrib/civicrm/CRM/Event/Page/Tab.php(118): CRM_Core_Controller->run()
#22 /sites/all/modules/contrib/civicrm/CRM/Event/Page/Tab.php(175): CRM_Event_Page_Tab->edit()
#23 /sites/all/modules/contrib/civicrm/CRM/Core/Invoke.php(312): CRM_Event_Page_Tab->run((Array:4), NULL)
#24 /sites/all/modules/contrib/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:12))
#25 /sites/all/modules/contrib/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:4))
#26 /sites/all/modules/contrib/civicrm/drupal/civicrm.module(482): CRM_Core_Invoke::invoke((Array:4))
#27 [internal function](): civicrm_invoke("contact", "view", "participant")
#28 /includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
#29 /index.php(21): menu_execute_active_handler()
#30 {main}
```seamusleeseamusleehttps://lab.civicrm.org/dev/core/-/issues/36send_reminder causes database error2023-04-28T01:39:33Zgremblebeansend_reminder causes database errorWhen running the send_reminder job on CiviCRM 4.7.31 on MariaDB 10.1.26-0+deb9u1 using:
`cli.php -s my.3ca.org.uk -u admin -p*** -e Job -a send_reminder`
It fails with:
```
DB Error: syntax error
Died during callApi
```
The full erro...When running the send_reminder job on CiviCRM 4.7.31 on MariaDB 10.1.26-0+deb9u1 using:
`cli.php -s my.3ca.org.uk -u admin -p*** -e Job -a send_reminder`
It fails with:
```
DB Error: syntax error
Died during callApi
```
The full error log reads:
```
Mar 30 07:26:59 [info] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] => INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_schedule_id)
SELECT e.contact_id as contact_id, e.id as entity_id, "civicrm_participant" as entity_table, 21 as action_schedule_id
FROM civicrm_participant e
INNER JOIN civicrm_event_en_GB r ON e.event_id = r.id
INNER JOIN civicrm_contact c ON c.id = e.contact_id AND c.is_deleted = 0 AND c.is_deceased = 0
LEFT JOIN civicrm_action_log reminder ON reminder.contact_id = e.contact_id AND
reminder.entity_id = e.id AND
reminder.entity_table = 'civicrm_participant' AND
reminder.action_schedule_id = 21
WHERE (r.id IN ("84")) AND (r.is_active = 1) AND (r.is_template = 0) AND (e.status_id IN (1)) AND (reminder.id IS NULL) AND ('20180330072659' >= DATE_SUB(r.start_date, INTERVAL hour)) AND (DATE_SUB(20180330072659, INTERVAL 1 DAY ) <= r.start_date)
[nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) AND (DATE_SUB(20180330072659, INTERVAL 1 DAY ) <= r.start_date)' at line 10]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_schedule_id)
SELECT e.contact_id as contact_id, e.id as entity_id, "civicrm_participant" as entity_table, 21 as action_schedule_id
FROM civicrm_participant e
INNER JOIN civicrm_event_en_GB r ON e.event_id = r.id
INNER JOIN civicrm_contact c ON c.id = e.contact_id AND c.is_deleted = 0 AND c.is_deceased = 0
LEFT JOIN civicrm_action_log reminder ON reminder.contact_id = e.contact_id AND
reminder.entity_id = e.id AND
reminder.entity_table = 'civicrm_participant' AND
reminder.action_schedule_id = 21
WHERE (r.id IN ("84")) AND (r.is_active = 1) AND (r.is_template = 0) AND (e.status_id IN (1)) AND (reminder.id IS NULL) AND ('20180330072659' >= DATE_SUB(r.start_date, INTERVAL hour)) AND (DATE_SUB(20180330072659, INTERVAL 1 DAY ) <= r.start_date)
[nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) AND (DATE_SUB(20180330072659, INTERVAL 1 DAY ) <= r.start_date)' at line 10]
[to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_schedule_id)
SELECT e.contact_id as contact_id, e.id as entity_id, "civicrm_participant" as entity_table, 21 as action_schedule_id
FROM civicrm_participant e
INNER JOIN civicrm_event_en_GB r ON e.event_id = r.id
INNER JOIN civicrm_contact c ON c.id = e.contact_id AND c.is_deleted = 0 AND c.is_deceased = 0
LEFT JOIN civicrm_action_log reminder ON reminder.contact_id = e.contact_id AND
reminder.entity_id = e.id AND
reminder.entity_table = 'civicrm_participant' AND
reminder.action_schedule_id = 21
WHERE (r.id IN ("84")) AND (r.is_active = 1) AND (r.is_template = 0) AND (e.status_id IN (1)) AND (reminder.id IS NULL) AND ('20180330072659' >= DATE_SUB(r.start_date, INTERVAL hour)) AND (DATE_SUB(20180330072659, INTERVAL 1 DAY ) <= r.start_date)
[nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) AND (DATE_SUB(20180330072659, INTERVAL 1 DAY ) <= r.start_date)' at line 10]"]
)
Mar 30 07:26:59 [info] $backTrace = #0 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(948): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: syntax error", -2, 16, (Array:2), "INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#3 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-2, 16, (Array:2), "INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#4 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -2, 16, (Array:2), "INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...", "DB_Error", TRUE)
#5 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR->__call("raiseError", (Array:7))
#6 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-2, NULL, NULL, "INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...", "1064 ** You have an error in your SQL syntax; check the manual that correspon...")
#7 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#9 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2446): DB_common->query("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#10 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1635): DB_DataObject->_query("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#11 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(392): DB_DataObject->query("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#12 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1348): CRM_Core_DAO->query("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...", TRUE)
#13 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/Civi/ActionSchedule/RecipientBuilder.php(215): CRM_Core_DAO::executeQuery("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#14 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/Civi/ActionSchedule/RecipientBuilder.php(156): Civi\ActionSchedule\RecipientBuilder->buildRelFirstPass()
#15 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/ActionSchedule.php(360): Civi\ActionSchedule\RecipientBuilder->build()
#16 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/ActionSchedule.php(375): CRM_Core_BAO_ActionSchedule::buildRecipientContacts(3, "20180330072659", (Array:3))
#17 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(186): CRM_Core_BAO_ActionSchedule::processQueue("20180330072659", (Array:3))
#18 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_job_send_reminder((Array:3))
#19 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#20 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:9))
#21 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("Job", "send_reminder", (Array:2), NULL)
#22 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/bin/cli.class.php(113): civicrm_api("Job", "send_reminder", (Array:2))
#23 /var/www/my.3ca.org.uk/web/wp-content/plugins/civicrm/civicrm/bin/cli.php(32): civicrm_cli->callApi()
#24 {main}
```