Development issueshttps://lab.civicrm.org/groups/dev/-/issues2024-02-08T10:01:04Zhttps://lab.civicrm.org/dev/core/-/issues/4970(regression) Extra receipt is sent when marking a contribution complete.2024-02-08T10:01:04ZJonGold(regression) Extra receipt is sent when marking a contribution complete.Overview
----------------------------------------
Starting in 5.69, changing a Pending contribution to Completed sends a receipt even if you choose not to.
Reproduction steps
----------------------------------------
1. Create a new pend...Overview
----------------------------------------
Starting in 5.69, changing a Pending contribution to Completed sends a receipt even if you choose not to.
Reproduction steps
----------------------------------------
1. Create a new pending contribution on the backend.
1. Click **Edit**.
1. Change the contribution to complete.
Current behaviour
----------------------------------------
If you don't select "Send Receipt", a receipt is sent.
If you *do* select "Send Receipt", 2 receipts are sent.
Expected behaviour
----------------------------------------
current situation minus 1.
Comments
----------------------------------------
The conversion from `transitionComponents()` to `Payment.create` is what occasioned this.5.69.5JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/4937(regression) FormBuilder forms with yes/no and autocomplete fail in Firefox2024-01-31T08:51:22ZJonGold(regression) FormBuilder forms with yes/no and autocomplete fail in FirefoxOverview
----------------------------------------
In Civi 5.69 (and master) forms that meet certain criteria fail to submit in Firefox. I believe there are scenarios other than the one I describe below, but this represents a relatively ...Overview
----------------------------------------
In Civi 5.69 (and master) forms that meet certain criteria fail to submit in Firefox. I believe there are scenarios other than the one I describe below, but this represents a relatively simple replicable case.
I did a `git bisect` and tracked it down to https://github.com/civicrm/civicrm-core/pull/28452 (no Gitlab bot that's not a pull request for this issue).
Reproduction steps
----------------------------------------
I've attached a FormBuilder form that's a relatively simple replication case. This requires a field of type "Yes/No" called `yesno` in a custom group with name `contact_fields2`.
Select "yes" or "no" on the custom field, press "Submit".
Current behaviour
----------------------------------------
If you submit this form in Firefox, you see the error "Sorry an error occurred and your information was not saved.", but then the page reloads, though the URL changes:
e.g.:
```
# original
http://dmaster.localhost/civicrm/org-member-renewal
# post-submit
http://dmaster.localhost/civicrm/org-member-renewal?contact-fields-2-yesno-1=0
```
In Chrome, the page submits successfully.
There's also a ton of JS console errors.
On my civicrm-buildkit site, they looked like this:
```
Error: [$rootScope:infdig] http://errors.angularjs.org/1.8.2/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22msg%22%3A%22fn%3A%20fn%22%2C%22newVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%7B%7D%7D%2C%22oldVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%7B%7D%7D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20fn%22%2C%22newVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%7B%7D%7D%2C%22oldVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%7B%7D%7D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20fn%22%2C%22newVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%7B%7D%7D%2C%22oldVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%7B%7D%7D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20fn%22%2C%22newVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%7B%7D%7D%2C%22oldVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%7B%7D%7D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20fn%22%2C%22newVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%7B%7D%7D%2C%22oldVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%7B%7D%7D%7D%5D%5D
Angular 41
jQuery 2
<anonymous> Angular
jQuery 7
<anonymous> Common.js:1659
jQuery 8
angular.js:15697:15
```
On my 5.69.2 non-buildkit site, it looked like this:
```
Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: [[{"msg":"fn: fn","newVal":{"formName":"afform:afformOrganizationMembershipRenewal","fieldName":"Organization2:id","values":{}},"oldVal":{"formName":"afform:afformOrganizationMembershipRenewal","fieldName":"Organization2:id","values":"..."}}],[{"msg":"fn: fn","newVal":{"formName":"afform:afformOrganizationMembershipRenewal","fieldName":"Organization2:id","values":"..."},"oldVal":"..."}],[{"msg":"fn: fn","newVal":{"formName":"afform:afformOrganizationMembershipRenewal","fieldName":"Organization2:id","values":"..."},"oldVal":"..."}],[{"msg":"fn: fn","newVal":{"formName":"afform:afformOrganizationMembershipRenewal","fieldName":"Organization2:id","values":"..."},"oldVal":"..."}],[{"msg":"fn: fn","newVal":{"formName":"afform:afformOrganizationMembershipRenewal","fieldName":"Organization2:id","values":"..."},"oldVal":"..."}]]
https://errors.angularjs.org/1.8.2/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22msg%22%3A%22fn%3A%20fn%22%2C%22newVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%7B%7D%7D%2C%22oldVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%22...%22%7D%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20fn%22%2C%22newVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%22...%22%7D%2C%22oldVal%22%3A%22...%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20fn%22%2C%22newVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%22...%22%7D%2C%22oldVal%22%3A%22...%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20fn%22%2C%22newVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%22...%22%7D%2C%22oldVal%22%3A%22...%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20fn%22%2C%22newVal%22%3A%7B%22formName%22%3A%22afform%3AafformOrganizationMembershipRenewal%22%2C%22fieldName%22%3A%22Organization2%3Aid%22%2C%22values%22%3A%22...%22%7D%2C%22oldVal%22%3A%22...%22%7D%5D%5D
Angular 8
$onChanges http://reamp.local/wp-content/plugins/civicrm/civicrm/ang/crmUi.js?r=GUtKAen_US:789
Angular 34
jQuery 2
<anonymous> Angular
jQuery 7
<anonymous> http://reamp.local/wp-content/plugins/civicrm/civicrm/js/Common.js?r=GUtKAen_US:1659
jQuery 8
angular.js:138:12
```
Expected behaviour
----------------------------------------
Form should always submit successfully.
Environment information
----------------------------------------
* __Browser:__ Firefox 120.0.1
* __CiviCRM:__ master
* __PHP:__ 8.1
* __CMS:__ Drupal 7
* __Database:__ Replicated w/ MariaDB 10.6 and 10.11
* __Web Server:__ Apache 2.45.69.4https://lab.civicrm.org/dev/core/-/issues/1048(regression) Search Builder syntax error when "Groups" "is empty"2019-06-27T00:13:42ZJonGold(regression) Search Builder syntax error when "Groups" "is empty"This is new in 5.13.0 and was reported here. It's easy to replicate from the screenshot:
https://civicrm.stackexchange.com/questions/31083/in-civicrm-rel-5-14-the-search-builder-no-longer-provides-some-results
This regression occurs as ...This is new in 5.13.0 and was reported here. It's easy to replicate from the screenshot:
https://civicrm.stackexchange.com/questions/31083/in-civicrm-rel-5-14-the-search-builder-no-longer-provides-some-results
This regression occurs as a result of [PR 13603](https://github.com/civicrm/civicrm-core/pull/13603) which is intended to fix core#726.5.15.0https://lab.civicrm.org/dev/core/-/issues/4483(regression) SearchKit doesn't handle delegated access permissions correctly2023-09-02T22:17:28ZJonGold(regression) SearchKit doesn't handle delegated access permissions correctlyA git bisect traced this to https://github.com/civicrm/civicrm-core/pull/25969. It works in 5.60.
When a user does not have the 'all CiviCRM permissions and ACLs', making a contact field in-line editable that isn't on the primary entit...A git bisect traced this to https://github.com/civicrm/civicrm-core/pull/25969. It works in 5.60.
When a user does not have the 'all CiviCRM permissions and ACLs', making a contact field in-line editable that isn't on the primary entity causes a crash (and no search results returned).
**Steps to Replicate**
* Create a new user without 'all CiviCRM permissions and ACLs' permission, but otherwise an administrator. This may not be necessary on non-Drupal systems - but user 1 having all permissions blocks replication.
* Create the SearchKit query in the screenshot below (I've exported it for easier use).
* Create a table display, make the "Gender" field in-line editable.
* Press "Preview"
**Expected Result**
You see search results.
**Actual Result**
500 error - `getFieldValue failed`.
The issue is in `CRM_Contact_BAO_Contact::_checkAccess()`. This attempts to access `$record['id']` but after PR #25969, the record is passing `id_01.id`.
![Selection_1999](/uploads/5e6a7126c09291fc5c1cf4eb6e87c300/Selection_1999.png)
```json
[
[
"SavedSearch",
"save",
{
"records": [
{
"name": "delegated_permission_test",
"label": "delegated permission test",
"form_values": null,
"mapping_id": null,
"search_custom_id": null,
"api_entity": "Participant",
"api_params": {
"version": 4,
"select": [
"id",
"Participant_Contact_contact_id_01.display_name",
"Participant_Contact_contact_id_01.gender_id:label"
],
"orderBy": [],
"where": [],
"groupBy": [],
"join": [
[
"Contact AS Participant_Contact_contact_id_01",
"LEFT",
[
"contact_id",
"=",
"Participant_Contact_contact_id_01.id"
]
]
],
"having": []
},
"expires_date": null,
"description": null
}
]
}
],
[
"SearchDisplay",
"save",
{
"records": [
{
"name": "delegated_permission_test_Table_1",
"label": "delegated permission test Table 1",
"saved_search_id.name": "delegated_permission_test",
"type": "table",
"settings": {
"description": null,
"sort": [],
"limit": 50,
"pager": [],
"placeholder": 5,
"columns": [
{
"type": "field",
"key": "id",
"dataType": "Integer",
"label": "Participant ID",
"sortable": true
},
{
"type": "field",
"key": "Participant_Contact_contact_id_01.display_name",
"dataType": "String",
"label": "Participant Contact: Display Name",
"sortable": true,
"title": "Participant Contact: Display Name"
},
{
"type": "field",
"key": "Participant_Contact_contact_id_01.gender_id:label",
"dataType": "Integer",
"label": "Participant Contact: Gender",
"sortable": true,
"editable": true
}
],
"actions": true,
"classes": [
"table",
"table-striped"
]
},
"acl_bypass": false
}
]
}
]
]
```colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/3065(Regression) Strict typing on CRM_Contact_BAO_Contact::getDuplicateContacts()...2023-11-23T05:03:25ZJonGold(Regression) Strict typing on CRM_Contact_BAO_Contact::getDuplicateContacts() causes fatal error[PR 22394](https://github.com/civicrm/civicrm-core/pull/22394) adds strict type checking, which causes a fatal error with inputs that were previously acceptable.
### Steps to replicate
Run `cv api Contact.duplicatecheck` with no argume...[PR 22394](https://github.com/civicrm/civicrm-core/pull/22394) adds strict type checking, which causes a fatal error with inputs that were previously acceptable.
### Steps to replicate
Run `cv api Contact.duplicatecheck` with no arguments.
### Result in 5.45
```
{
"is_error": 0,
"version": 3,
"count": 0,
"values": []
}
```
### Result in 5.46
```
[Symfony\Component\Debug\Exception\FatalThrowableError]
Type error: Argument 1 passed to CRM_Contact_BAO_Contact::getDuplicateContacts() must be of the type array, null given, called in /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/api/v3/Contact.php on line 1611
```
Now, passing no arguments should arguably not be supported, but a typical usage is to leave the rule type undefined, which defaults to `Unsupervised`. Now, leaving it undefined gives an error of "Argument 3 must be a string, null given".
Since this is a bug that will bite a lot of folks, I'm going to do a quick PR to allow these arguments to be nullable - but I imagine in the long term we want to modify the calling functions to pass valid values. Though I think that argument 3 (`$rule`) should always be nullable.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/5079(regression) Submission of non-numeric value on contribution form causes crash2024-03-28T03:51:54ZJonGold(regression) Submission of non-numeric value on contribution form causes crashOverview
----------------------------------------
Putting anything other than a strict numeric value in the "Other Amount" field of a price set results in a crash.
Reproduction steps
----------------------------------------
1. Use a pag...Overview
----------------------------------------
Putting anything other than a strict numeric value in the "Other Amount" field of a price set results in a crash.
Reproduction steps
----------------------------------------
1. Use a page with an "Other Amount" field (Quick Config or not, doesn't matter). This also affects all "Text / Numeric Quantity" price fields.
2. Enter a value that isn't strictly numeric. Like `$5` or `5 dollars`.
3. Submit the page.
Current behaviour
----------------------------------------
Division by zero error, crash.
Expected behaviour
----------------------------------------
Should fail validation with the message "Other Amount must be a number (with or without decimals).".
Comments
----------------------------------------
This is new in 5.70. I traced it to [PR #29275](https://github.com/civicrm/civicrm-core/pull/29275). Our first validation is now `$self->resetOrder($fields);`. The docblock there says we assume the input has been sanitized, but in the backtrace below, it must be happening pre-sanitization.
Backtrace:
```
#0 /var/www/mysite/vendor/civicrm/civicrm-core/CRM/Financial/BAO/Order.php(832): CRM_Financial_BAO_Order->calculateLineItems()
#1 /var/www/mysite/vendor/civicrm/civicrm-core/CRM/Contribute/Form/Contribution/Main.php(1983): CRM_Financial_BAO_Order->recalculateLineItems()
#2 /var/www/mysite/vendor/civicrm/civicrm-core/CRM/Contribute/Form/Contribution/Main.php(819): CRM_Contribute_Form_Contribution_Main->resetOrder(Array)
#3 /var/www/mysite/vendor/civicrm/civicrm-packages/HTML/QuickForm.php(1600): CRM_Contribute_Form_Contribution_Main::formRule(Array, Array, Object(CRM_Contribute_Form_Contribution_Main))
#4 /var/www/mysite/vendor/civicrm/civicrm-core/CRM/Core/Form.php(703): HTML_QuickForm->validate()
#5 /var/www/mysite/vendor/civicrm/civicrm-core/CRM/Core/QuickForm/Action/Upload.php(137): CRM_Core_Form->validate()
#6 /var/www/mysite/vendor/civicrm/civicrm-core/CRM/Core/QuickForm/Action/Upload.php(120): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contribute_Form_Contribution_Main), 'upload')
#7 /var/www/mysite/vendor/civicrm/civicrm-packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contribute_Form_Contribution_Main), 'upload')
#8 /var/www/mysite/vendor/civicrm/civicrm-packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_Main), 'upload')
#9 /var/www/mysite/vendor/civicrm/civicrm-core/CRM/Core/Controller.php(355): HTML_QuickForm_Page->handle('upload')
#10 /var/www/mysite/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(322): CRM_Core_Controller->run(Array, NULL)
#11 /var/www/mysite/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem(Array)
#12 /var/www/mysite/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke(Array)
#13 /var/www/mysite/web/modules/contrib/civicrm/src/Civicrm.php(88): CRM_Core_Invoke::invoke(Array)
#14 /var/www/mysite/web/modules/contrib/civicrm/src/Controller/CivicrmController.php(83): Drupal\civicrm\Civicrm->invoke(Array)
#15 [internal function]: Drupal\civicrm\Controller\CivicrmController->main(Array, '')
#16 /var/www/mysite/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#17 /var/www/mysite/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#18 /var/www/mysite/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#19 /var/www/mysite/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#20 /var/www/mysite/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#21 /var/www/mysite/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#22 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/mysite/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /var/www/mysite/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /var/www/mysite/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /var/www/mysite/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#33 {main}
```5.71.2https://lab.civicrm.org/dev/core/-/issues/2701(Smart Group) is being constantly added while editing the smart group title f...2021-08-25T01:48:12ZMonish Deb(Smart Group) is being constantly added while editing the smart group title from 'Manage Group' page Steps to replicate:
1. Go to 'Manage Group'
2. Inline edit any smart group title by clicking on the title.
Error
-----
On the input text field "(Smart Group)" is added which is not a part of group title. And one need to constantly rem... Steps to replicate:
1. Go to 'Manage Group'
2. Inline edit any smart group title by clicking on the title.
Error
-----
On the input text field "(Smart Group)" is added which is not a part of group title. And one need to constantly remove the "(Smart Group)" text in order to retain the original or modified group title.
![before](/uploads/0f5b230f41b006760128c864c2b3ffa2/before.gif)5.42.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/4624(unreleased regression) Can't use QuickSearch for address anymore2023-11-10T13:54:49ZJonGold(unreleased regression) Can't use QuickSearch for address anymoreAfter https://github.com/civicrm/civicrm-core/pull/26676 is applied, quick searching by address returns all contacts.After https://github.com/civicrm/civicrm-core/pull/26676 is applied, quick searching by address returns all contacts.5.67.1https://lab.civicrm.org/dev/core/-/issues/1522, as decimal separator, and [space] as thousand separators leads to api errors2020-03-17T22:27:15Zjaapjansma, as decimal separator, and [space] as thousand separators leads to api errors**Steps to reproduce**
1. At Administer --> Localisation --> Languages, Currencies and Location: set , as a decimal separator
2. At Administer --> Localisation --> Languages, Currencies and Location: Set space as thousand separator (So ...**Steps to reproduce**
1. At Administer --> Localisation --> Languages, Currencies and Location: set , as a decimal separator
2. At Administer --> Localisation --> Languages, Currencies and Location: Set space as thousand separator (So that 1234.56 is displayed as 1 234,56)
3. Go to api 3 explorer (Support --> Developers --> Api explorer v3)
4. Create a contribution with total_amount = 250.00 (keep the dot and the two zero's).
**Expected result**
Contribution created with a total amount of € 250,00
**Actual result**
Api error: `total_amount is not a valid amount: 250.00`
**Caused by**
This is caused by the statement in _https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/Rule.php#L603_
This statement expects at least . in either decimal separator or thousand separator.
```php
if ($config->monetaryDecimalPoint &&
$config->monetaryDecimalPoint != '.' &&
// CRM-7122 also check for Thousands Separator in config settings
$config->monetaryThousandSeparator != '.' &&
substr_count($value, '.')
) {
return FALSE;
}
```
**Analyses**
Below an analyses of the _contribution.create_ api with different localization settings and inputs.
| Currency | Decimal sep. | Thousand sep. | Contribution.create total_amount | Raw Value | Display as | 5.13 | 5.20 |
|----------|--------------|---------------|----------------------------------|------------|------------------|----------|----------|
| $ | . | , | 1,234,567.89 | 1234567.89 | $ 1,234,567.89 | OK | OK |
| $ | . | , | 1234567.89 | 1234567.89 | $ 1,234,567.89 | OK | OK |
| $ | . | [space] | 1 234 567.89 | 1234567.89 | $ 1 234 567.89 | OK | OK |
| $ | . | [space] | 1234567.89 | 1234567.89 | $ 1 234 567.89 | **Fail** | **Fail** |
| € | . | , | 1,234,567.89 | 1234567.89 | € 1,234,567.89 | OK | OK |
| € | . | , | 1234567.89 | 1234567.89 | € 1,234,567.89 | OK | OK |
| € | , | . | 1.234.567,89 | 1234567.89 | € 1.234.567,89 | OK | OK |
| € | , | . | 1234567.89 | 1234567.89 | € 1.234.567,89 | OK | OK |
| € | , | [space] | 1 234 567,89 | 1234567.89 | € 1 234 567,89 | OK | OK |
| € | , | [space] | 1234567.89 | 1234567.89 | € 1 234 567,89 | **Fail** | **Fail** |
| NOK | . | , | 1,234,567.89 | 1234567.89 | NOK 1,234,567.89 | OK | OK |
| NOK | . | , | 1234567.89 | 1234567.89 | NOK 1,234,567.89 | OK | OK |
| NOK | , | . | 1.234.567,89 | 1234567.89 | NOK 1.234.567,89 | OK | OK |
| NOK | , | . | 1234567.89 | 1234567.89 | NOK 1.234.567,89 | OK | OK |
| NOK | , | [space] | 1 234 567,89 | 1234567.89 | NOK 1 234 567,89 | OK | OK |
| NOK | , | [space] | 1234567.89 | 1234567.89 | NOK 1 234 567,89 | **Fail** | **Fail** |
**See also**
This bug is introduced by https://issues.civicrm.org/jira/browse/CRM-7122
**Question before fixing this**
What exactly is this if statement checking for? 5.23.0https://lab.civicrm.org/dev/core/-/issues/969.gitignore file left in 5.13.4 release2019-05-30T03:29:27Ztommybobo.gitignore file left in 5.13.4 releaseThere is a .gitignore file in the 5.13.4 releases. Inside bower_components/jquery the .gitignore lists /dist containing all the jquery files.
This creates havoc for git managed sites.There is a .gitignore file in the 5.13.4 releases. Inside bower_components/jquery the .gitignore lists /dist containing all the jquery files.
This creates havoc for git managed sites.https://lab.civicrm.org/dev/core/-/issues/1879.ical files not populating correctly for sites with ACL's configured for events2020-10-30T22:36:11Zalicefrumin.ical files not populating correctly for sites with ACL's configured for eventsOverview
----------------------------------------
The iCal files for events are not populating correctly for sites that have ACLs for events set up.
Reproduction steps
----------------------------------------
1. Create 2 events A and B
...Overview
----------------------------------------
The iCal files for events are not populating correctly for sites that have ACLs for events set up.
Reproduction steps
----------------------------------------
1. Create 2 events A and B
1. Create an ACL for event B
1. Go to the Event info page for Event A
2. click the iCal button to download the .ics file.
Current behaviour
----------------------------------------
The file will look like:
```
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//CiviCRM//NONSGML CiviEvent iCal//EN
X-WR-TIMEZONE:America/New_York
METHOD:PUBLISH
END:VCALENDAR
```
NOTE there are no dates or times
Expected behaviour
----------------------------------------
the .ics file should be populated to include the date/time of the event etc.
Environment information
----------------------------------------
I was able to replicate this on master
Comments
----------------------------------------
I think this has to do with this code: https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Permission.php#L3555.32.0https://lab.civicrm.org/dev/core/-/issues/974.ics files should be whitelisted as file types for upload2019-08-15T14:00:20ZStoob.ics files should be whitelisted as file types for uploadCurrently an uploaded .ics file to Civi has the 'unknown' suffix appended. To offer some background, .ics file is a common format used by Google, Outlook and many other calendar software https://en.wikipedia.org/wiki/ICalendar. Indeed ...Currently an uploaded .ics file to Civi has the 'unknown' suffix appended. To offer some background, .ics file is a common format used by Google, Outlook and many other calendar software https://en.wikipedia.org/wiki/ICalendar. Indeed you will see this filetype attached to many email invitations you get for meetings.
I suggest that this filetype should be whitelisted by CiviCRM and uploaded without modification, for use in all places where attachments are allowed: CiviMail, custom data fields, etc. Since the filetype contains only data (similar to JSON or XML) there are no security issues I'm aware of, but I will rely on security experts to judge ultimately be the judge. Here's an example of part of the problem CiviCRM's appended suffix causes. The ".unknown" file cannot be recognized nor easily opened. @eileen @seamuslee
![ics](/uploads/f3f6c8c202dba00da35eda94eecdd974/ics.png)
![ics2](/uploads/3823eebea44838c339af41bb241e3d07/ics2.png)5.14.0seamusleeseamusleehttps://lab.civicrm.org/dev/core/-/issues/1220/civicrm-core/CRM/Utils/System/Drupal8.php autoload.php path issue 5.16.32019-09-17T14:05:35Zndavis/civicrm-core/CRM/Utils/System/Drupal8.php autoload.php path issue 5.16.3line 419.
Relies on cmsRootPath
Standard drupal installation cms path (cmsRoot) is now [drupal root]/web.
Drupal8.php now looks for autoload as **[cms.root]//autoload.php** (line 419)
Unless you symlink autoload.php from ../vendor/au...line 419.
Relies on cmsRootPath
Standard drupal installation cms path (cmsRoot) is now [drupal root]/web.
Drupal8.php now looks for autoload as **[cms.root]//autoload.php** (line 419)
Unless you symlink autoload.php from ../vendor/autoload.php this fails to find autoload.php.
Suggest an if block that first tries `require_once "autoload.php";` and if that fails (vendor directory is not in php's include_path) *then* look for it in a better place than cmsRoot. As well [cms.root] has a trailing slash so the forward slash in the `$autoloader = require_once $root."/autoload.php"` is unnecessary.
vendor is not supposed to be accessible in the web root, so for anyone who's vendor directory is not the web root, and is in a directory one directory level up (out of web root) Drupal8.php won't find autoload.php.
I'm not sure of the Drupal8.php's history, but changes related to the path to autoload.php between 5.15.1 and 5.16.3 and broke things.
If you change the [cms.root] so Drupal8.php can find autoload.php the rest of civi breaks. If I set this path properly in Drupal8.php everything works.https://lab.civicrm.org/dev/wordpress/-/issues/42404 Error when I use the Api v4 with Wordpress Multisite -> because no "do no...2023-12-06T17:14:08ZTomAnderson404 Error when I use the Api v4 with Wordpress Multisite -> because no "do not delete" post was generated for the subsiteI am encountering a 404 Error when I use the Api v4 with Wordpress Multisite.
My sites have urls like: `mainsite.com` and `subsite.com`.
I only get the 404 error on the subsite, not the main site. The data is retrieved, but there is a 4...I am encountering a 404 Error when I use the Api v4 with Wordpress Multisite.
My sites have urls like: `mainsite.com` and `subsite.com`.
I only get the 404 error on the subsite, not the main site. The data is retrieved, but there is a 404 error at the same time. This breaks the promises and makes it super awkward to use the API.
```
var this_works_v3 = await CRM.api3('Event', 'get');
var this_gets_a_404_result_but_the_promise_holds_the_data = await CRM.api4('Event', 'get');
var this_works_v4 = await CRM.api4('Event', 'get', {where: [["title", "LIKE", "%"]]});
```
I tracked it through the code and the problem occurs in the jQuery file.
``` jquery.js?r=lemn4 10252:10255
// Do send the request
// This may raise an exception which is actually
// handled in jQuery.ajax (so no try/catch here)
xhr.send( ( options.hasContent && options.data ) || null );
```
The options.data is empty in the 404 result version because there are no parameters in the API call.
I was stumped as to what else I could do to understand this problem. Until I checked the PHP-FPM log. It turned out, there was an error being thrown in wp-content\plugins\civicrm\civicrm\CRM\Utils\System\WordPress.php:224 because $post did not have ID ($post was undefined on the subsite).
```
/**
* @inheritDoc
*/
197 public function url(
```
Line 222 should be loading the post that indicates the url
```
222 global $post;
223 if (get_option('permalink_structure') != '') {
$script = get_permalink($post->ID);
}
if ($config->wpBasePage == $post->post_name) {
$basepage = TRUE;
}
```
I put the check for $post and found that on the subsite, it was not being populated. But in the main site, it was a post with the post content: 'post_content' => 'Do not delete this page. Page content is generated by CiviCRM.',
Well that's weird, the subsite doesn't have that post, but the main site says it should not be deleted. I copied the post to the subsite database table `wp_3_posts` changing the ID and the guid to match the subsite. And it works!
In summary, there is a flaw in the CiviCRM setup for multisite Wordpress, because the file Wordpress.php expects there to be a post in the database so it can grab its data. The workaround was to duplicate the autogenerated "Do not delete this post" post in the subsite. No more 404 error!haystackhaystackhttps://lab.civicrm.org/dev/joomla/-/issues/405 broken/dated links in post-install success screen for Joomla2022-10-11T22:50:40Znicol5 broken/dated links in post-install success screen for JoomlaOn successfully installing CiviCRM on Joomla (I'm assuming not on the other CMSs), there's a welcome screen with four links to the old wiki/confluence (ie 'http://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades') whi...On successfully installing CiviCRM on Joomla (I'm assuming not on the other CMSs), there's a welcome screen with four links to the old wiki/confluence (ie 'http://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades') which would better point to new (https) docs pages. The register a site link is also broken.
I'm happy to make a PR for this but not sure where the file is located, I checked in https://github.com/civicrm/civicrm-core/tree/master/install & https://github.com/civicrm/civicrm-joomla but couldn't see it. Maybe it's not an actual smarty template but something that's passed to Joomla's UI as it looks natively styled in J3 and J4?
![image](/uploads/8b0a011ff0531bcfc719e6b4eb5e30b0/image.png)
New links needed for:
- 'Installation Guide' - I guess to this: https://docs.civicrm.org/user/en/latest/initial-set-up/installation-and-basic-set-up/
- Create front-end forms and searchable directories using Profiles - https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/
- Create online contribution pages - https://docs.civicrm.org/user/en/latest/contributions/online-contributions/
- Create events with online event registration - https://docs.civicrm.org/user/en/latest/events/what-is-civievent/
- Register a site - https://civicrm.org/register-a-sitenicolnicolhttps://lab.civicrm.org/dev/core/-/issues/9205.13 release apiv4 + Contact Layout Editor2019-05-02T04:31:35Zeileen5.13 release apiv4 + Contact Layout EditorI'm seeing regressions with apiv4 & CLE - ie if I have the latest of each and I have contact layouts configured I'm not seeing the contact screen load with authorization errors.
I don't know if there is a real current issue with the 5....I'm seeing regressions with apiv4 & CLE - ie if I have the latest of each and I have contact layouts configured I'm not seeing the contact screen load with authorization errors.
I don't know if there is a real current issue with the 5.13 rc + whatever apiv4 will ship with it but I'm logging this here so it will at least be checked before the 5.13 release goes out tomorrow
https://github.com/civicrm/org.civicrm.api4/issues/123https://lab.civicrm.org/dev/core/-/issues/14495.20 Upgrade fails when CiviCase is enabled and you have an extension that ca...2019-12-09T20:42:09Zseamuslee5.20 Upgrade fails when CiviCase is enabled and you have an extension that calls hook_civicrm_pre/post and the hook function uses a class within the extensionOverview
----------------------------------------
5.20 Upgrade fails if you use an extension e.g. mailchimp extension and you have CiviCase enabled and you have a case type created that will be affected by the upgrade
Reproduction steps...Overview
----------------------------------------
5.20 Upgrade fails if you use an extension e.g. mailchimp extension and you have CiviCase enabled and you have a case type created that will be affected by the upgrade
Reproduction steps
----------------------------------------
1. Create a case type with the roles of Benefit Specilalist, Spouse of, and Case Coordinator
1. Install mailchimp extension latest version
1. Try running the upgrade in the UI
1. Upgrade stops after the CiviCase label step and doesn't progress and see a PHP error about missing class.
Expected behaviour
----------------------------------------
Upgrade works
Environment information
----------------------------------------
* __CiviCRM:__ _5.20.0_
* __PHP:__ _7.2__
* __CMS:__ _Drupal 7.30_5.20.0seamusleeseamusleehttps://lab.civicrm.org/dev/core/-/issues/15055.20.3: TRUNCATE civicrm_menu [nativecode=1118 ** Row size too large (> 8126)2023-01-31T05:03:26ZDmitry Smirnov5.20.3: TRUNCATE civicrm_menu [nativecode=1118 ** Row size too large (> 8126)After upgrade 5.18.2 --> 5.20.3 the following error is thrown:
~~~~
Jan 02 12:04:20 [error] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[co...After upgrade 5.18.2 --> 5.20.3 the following error is thrown:
~~~~
Jan 02 12:04:20 [error] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => TRUNCATE civicrm_menu [nativecode=1118 ** Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.]
[type] => DB_Error
[user_info] => TRUNCATE civicrm_menu [nativecode=1118 ** Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="TRUNCATE civicrm_menu [nativecode=1118 ** Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.]"]
)
Jan 02 12:04:20 [debug] $backTrace = #0 /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(208): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /usr/share/php/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
#2 /usr/share/civicrm/packages/DB.php(986): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "TRUNCATE civicrm_menu [nativecode=1118 ** Row size too large (> 8126). Changi...")
#3 /usr/share/php/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "TRUNCATE civicrm_menu [nativecode=1118 ** Row size too large (> 8126). Changi...")
#4 /usr/share/php/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "TRUNCATE civicrm_menu [nativecode=1118 ** Row size too large (> 8126). Changi...", "DB_Error", TRUE)
#5 /usr/share/civicrm/packages/DB/common.php(1920): PEAR->__call("raiseError", (Array:7))
#6 /usr/share/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-1, NULL, NULL, "TRUNCATE civicrm_menu [nativecode=1118 ** Row size too large (> 8126). Changi...", "1118 ** Row size too large (> 8126). Changing some columns to TEXT or BLOB or...")
#7 /usr/share/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /usr/share/civicrm/packages/DB/common.php(1229): DB_mysqli->simpleQuery("TRUNCATE civicrm_menu")
#9 /usr/share/civicrm/packages/DB/DataObject.php(2416): DB_common->query("TRUNCATE civicrm_menu")
#10 /usr/share/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("TRUNCATE civicrm_menu")
#11 /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(435): DB_DataObject->query("TRUNCATE civicrm_menu")
#12 /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1428): CRM_Core_DAO->query("TRUNCATE civicrm_menu", TRUE)
#13 /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Menu.php(304): CRM_Core_DAO::executeQuery("TRUNCATE civicrm_menu")
#14 /usr/share/civicrm/CRM/Upgrade/Page/Upgrade.php(105): CRM_Core_Menu::store()
#15 /usr/share/civicrm/CRM/Upgrade/Page/Upgrade.php(73): CRM_Upgrade_Page_Upgrade->runIntro()
#16 /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(284): CRM_Upgrade_Page_Upgrade->run((Array:2), NULL)
#17 /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#18 /usr/share/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:2))
#19 /usr/share/wordpress/wp-content/plugins/civicrm/civicrm.php(1466): CRM_Core_Invoke::invoke((Array:2))
#20 /usr/share/wordpress/wp-includes/class-wp-hook.php(286): CiviCRM_For_WordPress->invoke("")
#21 /usr/share/wordpress/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters("", (Array:1))
#22 /usr/share/wordpress/wp-includes/plugin.php(453): WP_Hook->do_action((Array:1))
#23 /usr/share/wordpress/wp-admin/admin.php(224): do_action("toplevel_page_CiviCRM")
#24 {main}
~~~~
Because of this problem I could not run DB schema upgrade as the web page show `DB Error: unknown error` (Catch-22?).
The following StackExchange questions might be relevant:
* https://civicrm.stackexchange.com/questions/33220
* https://civicrm.stackexchange.com/questions/31632
What is the recommended remedy, if that's a known problem? Thanks.https://lab.civicrm.org/dev/release/-/issues/125.20: open source compliance: non-free 'vendor/togos/gitignore'2020-01-07T08:34:12ZDmitry Smirnov5.20: open source compliance: non-free 'vendor/togos/gitignore'Release management should exercise more care in regards to Open Source compliance of the sub-vendored re-distributed components.
For instance, in release 5.20 `vendor/togos/gitignore` is a non-free component due to absence of licensing ...Release management should exercise more care in regards to Open Source compliance of the sub-vendored re-distributed components.
For instance, in release 5.20 `vendor/togos/gitignore` is a non-free component due to absence of licensing and copyright information.
https://github.com/TOGoS/PHPGitIgnore/issues/1https://lab.civicrm.org/dev/core/-/issues/14475.21-RC upgrade fails if there are similar-named Option Groups2019-12-07T18:07:08Zbgm5.21-RC upgrade fails if there are similar-named Option GroupsOn civicrm.org we ran into a fatal error due to:
```
CRM_Upgrade_Incremental_php_FiveTwentyOne::fixOptionGroupName()
```
Error message:
```
UPDATE civicrm_option_group SET name = 'numeric_rating' WHERE ( civicrm_option_group.id =...On civicrm.org we ran into a fatal error due to:
```
CRM_Upgrade_Incremental_php_FiveTwentyOne::fixOptionGroupName()
```
Error message:
```
UPDATE civicrm_option_group SET name = 'numeric_rating' WHERE ( civicrm_option_group.id = 357 )
[nativecode=1062 ** Duplicate entry 'numeric_rating' for key 'UI_name']
```
Pre-upgrade data:
```
> select * from civicrm_option_group where name like '%numeric%';
+-----+-------------------------------+----------------+----------------------------+-------------+-----------+-----------+-----------+
| id | name | title | description | is_reserved | is_active | is_locked | data_type |
+-----+-------------------------------+----------------+----------------------------+-------------+-----------+-----------+-----------+
| 357 | Numeric Rating | Numeric Rating | numeric rating from 1 to 5 | 1 | 1 | 0 | Integer |
| 358 | numeric_rating | Numeric Rating | NULL | 1 | 1 | 0 | Integer |
| 359 | numeric_rating_20171003141125 | Numeric rating | NULL | 0 | 1 | 0 | String |
+-----+-------------------------------+----------------+----------------------------+-------------+-----------+-----------+-----------+
```
To make matters worse, the id=357 group does not have an option values. I have no idea where it's used. (and exists from before enabling detailed-log, 2019-02)
Nonetheless, I feel like this should require a pre-upgrade check?
cc @seamuslee5.21.0