CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2023-02-02T05:03:33Zhttps://lab.civicrm.org/dev/core/-/issues/1147cruft: option_group for case type2023-02-02T05:03:33ZJoeMurraycruft: option_group for case typeIn the tarball, there is a civicrm_option_group record defined for name='case_type' (value=26) that has no corresponding option_value records. There is instead a CiviCRM_case_type table. Likely missed during refactoring to create that ta...In the tarball, there is a civicrm_option_group record defined for name='case_type' (value=26) that has no corresponding option_value records. There is instead a CiviCRM_case_type table. Likely missed during refactoring to create that table.
Task for a newbie: remove the creation of the option_group from the tarball, and on upgrade remove the record in civicrm_option_group table for it.https://lab.civicrm.org/dev/core/-/issues/1146Custom multi profile: file fields only show one delete attachment action2022-11-26T05:03:21ZmountevCustom multi profile: file fields only show one delete attachment actionFor a profile with multi record custom set including multiple file fields, display delete attachment option only for one file.
Steps to reproduce:
- create a custom data set for contacts or indivs. mark it as a multi-record set.
- add ...For a profile with multi record custom set including multiple file fields, display delete attachment option only for one file.
Steps to reproduce:
- create a custom data set for contacts or indivs. mark it as a multi-record set.
- add two file type fields
- create a profile and add those fields to it. mark them as included in the multi-record listing (or pick a different field; you need at least one marked like this for the listing to work)
- open the profile in edit view. add a record and upload a file to each field. save it.
- that returns you to the listing of multi-records. edit the existing record. the two files will be listed but only one has a "delete attached file" link. if you click it, it removes the attachment for the last file field.
Note: if your custom data set is a single record set, the profile edit form will have the link for each file.
![image](/uploads/d69c46695e140fe31c965571faf48325/image.png)https://lab.civicrm.org/dev/core/-/issues/1145Document upgrading to MySQL82020-05-15T01:39:39ZJoeMurrayDocument upgrading to MySQL8We should document how upgraders will have to deal with hassle of changes to MySQL user password library (https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password) even though this doesn't...We should document how upgraders will have to deal with hassle of changes to MySQL user password library (https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password) even though this doesn't affect our code.JoeMurrayJoeMurrayhttps://lab.civicrm.org/dev/core/-/issues/1144Support MySQL8 in test infrastructure2020-01-08T15:38:31ZJoeMurraySupport MySQL8 in test infrastructureThe testing infrastructure will be enhanced to support testing of versions of dependencies that are on the edge of support (see https://lab.civicrm.org/dev/core/issues/1142).
Setting up testing for MySQL is the focus of this issue.
In...The testing infrastructure will be enhanced to support testing of versions of dependencies that are on the edge of support (see https://lab.civicrm.org/dev/core/issues/1142).
Setting up testing for MySQL is the focus of this issue.
In particular, We may need to adjust some of our test infrastructure for PHP <7.1.16 or PHP 7.2 less than 7.2.4 as per instructions at http://php.net/manual/en/ref.pdo-mysql.php .Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/1143Field Names now Reserved Words in MySQL82020-01-09T00:12:27ZJoeMurrayField Names now Reserved Words in MySQL8The new reserved words includes two which we use as field names:
- description
- grouping
While our code to create the fields will work because it uses ` to quote them as identifiers, we'll likely want to either change these names or go...The new reserved words includes two which we use as field names:
- description
- grouping
While our code to create the fields will work because it uses ` to quote them as identifiers, we'll likely want to either change these names or go through the code base and add the backtick quotes everywhere. Either approach will still mean that extensions will have to make changes to become MySQL 8.0 compatible. Using backticks will mean that extensions can continue to run on earlier versions of MySQL, and is likely the better approach. We don't want to force all extension maintainers to change references to these fields all at once when only a small number of installations will be using MySQL 8.0.
Decision: use backticks.5.23.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/1142Upgrade test infrastructure to support 'edge' versions of dependencies like M...2020-01-08T01:52:11ZJoeMurrayUpgrade test infrastructure to support 'edge' versions of dependencies like MySQL8@totten wrote:
> we currently check releases using a matrix with `min` and `max` columns
>
> if we expect civicrm to be compatible already (and/or that updates will be quick and straight-forward), then we can use KISS approach and just...@totten wrote:
> we currently check releases using a matrix with `min` and `max` columns
>
> if we expect civicrm to be compatible already (and/or that updates will be quick and straight-forward), then we can use KISS approach and just bump up max (`mysql57` => `mysql80`)
>
> otoh, if the process is going to take longer, then we should add a new column (`min`, `max`, `edge`)
>
> (note: adding an `edge` column could also be useful wrt to phasing-in support for `php73`)
>
> ... it would mean that reports of errors for infrastructure that is on the edge of getting support are not treated as blockers, and are identifiable as edge errors
Once an edge technology dependency like MySQL 8 or PHP 7.3 are deemed ready to be declared supported, the max column will change, and the edge column will change to NULL or perhaps the next higher version if people are prepared to start work on that.
This issue is focused on adding edge support to the matrix through a new column, and everything that entails in the build infrastructure and error reporting.
In order to do that, MySQL8 happens to be the first edge version to be incorporated. Issues specific to getting MySQL8.0 testing working on infrastructure will be managed at https://lab.civicrm.org/dev/core/issues/1144. Issues regarding MySQL8 compatibility are being managed via the meta issue https://lab.civicrm.org/dev/core/issues/392.
PHP73 is expected to be the next edge dependency.5.23.0tottentottenhttps://lab.civicrm.org/dev/core/-/issues/1141Remove deprecated SQL_CALC_FOUND_ROWS2022-11-30T05:03:30ZJoeMurrayRemove deprecated SQL_CALC_FOUND_ROWSMySQL has deprecated SQL_CALC_FOUND_ROWS https://dev.mysql.com/doc/refman/8.0/en/information-functions.html:
> The SQL_CALC_FOUND_ROWS query modifier and accompanying FOUND_ROWS() function are deprecated as of MySQL 8.0.17 and will be r...MySQL has deprecated SQL_CALC_FOUND_ROWS https://dev.mysql.com/doc/refman/8.0/en/information-functions.html:
> The SQL_CALC_FOUND_ROWS query modifier and accompanying FOUND_ROWS() function are deprecated as of MySQL 8.0.17 and will be removed in a future MySQL version. As a replacement, considering executing your query with LIMIT, and then a second query with COUNT(*) and without LIMIT to determine whether there are additional rows.
We should refactor to remove it from core in the following places:
>>>
$ grep -R SQL_CALC_FOUND_ROWS ./*
```php
./CRM/Core/BAO/CustomValueTable.php: $query = "SELECT SQL_CALC_FOUND_ROWS id, " . implode(', ', $clauses) . " FROM $tableName WHERE entity_id = $entityID {$orderBy} {$limit}";
./CRM/Core/BAO/PrevNextCache.php:SELECT SQL_CALC_FOUND_ROWS {$selectString}
./CRM/Contribute/BAO/ContributionSoft.php: SELECT SQL_CALC_FOUND_ROWS ccs.id, ccs.amount as amount,
./CRM/Case/BAO/Case.php: SELECT SQL_CALC_FOUND_ROWS COUNT(ca.id) AS ismultiple,
./CRM/Report/Form/Contribute/Sybunt.php: $getContacts = "SELECT SQL_CALC_FOUND_ROWS {$this->_aliases['civicrm_contact']}.id as cid {$this->_from} {$this->_where} GROUP BY {$this->_aliases['civicrm_contact']}.id {$this->_limit}";
./CRM/Report/Form/Contribute/Lybunt.php: SELECT SQL_CALC_FOUND_ROWS {$this->_aliases['civicrm_contact']}.id as cid {$this->_from}
./CRM/Report/Form/Contribute/Lybunt.php: $sql = str_replace('SQL_CALC_FOUND_ROWS', '', $sql);
./CRM/Report/Form/Contribute/Lybunt.php: $sql = "SELECT SQL_CALC_FOUND_ROWS * FROM ( $sql ) as inner_query {$this->_orderBy} $this->_limit";
./CRM/Report/Form/Contribute/History.php: $getContacts = "SELECT SQL_CALC_FOUND_ROWS {$this->_aliases['civicrm_contact']}.id as cid, SUM({$this->_aliases['civicrm_contribution']}.total_amount) as civicrm_contribution_total_amount_sum {$this->_from} {$this->_where} {$addWhere} GROUP BY {$this->_aliases['civicrm_contact']}.id {$this->_having} {$this->_limit}";
./CRM/Report/Form/Contribute/Detail.php: return "SELECT SQL_CALC_FOUND_ROWS * FROM {$this->temporaryTables['civireport_contribution_detail_temp3']['name']} $this->_orderBy $this->_limit";
./CRM/Report/Form/Contribute/Detail.php: $select = str_ireplace('SELECT SQL_CALC_FOUND_ROWS ', 'SELECT ', $this->_select);
./CRM/Report/Form/Contribute/TopDonor.php: $this->_select = preg_replace('/SELECT/', 'SELECT SQL_CALC_FOUND_ROWS ', $this->_select, 1);
./CRM/Report/Form.php: if (stristr($this->_select, 'SQL_CALC_FOUND_ROWS')) {
./CRM/Report/Form.php: $select = str_ireplace('SELECT SQL_CALC_FOUND_ROWS ', 'SELECT ', $this->_select);
./CRM/Report/Form.php: $this->_select = preg_replace('/SELECT(\s+SQL_CALC_FOUND_ROWS)?\s+/i', 'SELECT SQL_CALC_FOUND_ROWS ', $this->_select);
./CRM/Report/Form.php: $select = preg_replace('/SELECT(\s+SQL_CALC_FOUND_ROWS)?\s+/i', $select, $this->_select);
./tests/phpunit/api/v3/ReportTemplateTest.php: SELECT SQL_CALC_FOUND_ROWS contact_civireport.id as cid FROM civicrm_contact contact_civireport INNER JOIN civicrm_contribution contribution_civireport USE index (received_date) ON contribution_civireport.contact_id = contact_civireport.id
```
>>>Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/1134Visibilty field is not exposed on the option value listing2022-11-25T05:03:18ZyashodhaVisibilty field is not exposed on the option value listingVisibilty field is not exposed on the option value listing is the value is present.Visibilty field is not exposed on the option value listing is the value is present.yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/1127Extra padding when increasing height of main menu2019-07-19T15:37:41ZAkA84Extra padding when increasing height of main menuHello, I was testing the `hook_civicrm_getAssetUrl` hook introduced in [this PR](https://github.com/civicrm/civicrm-core/pull/14135) to increase the height of the main menu (this is on Civi `v.5.15.1`)
```php
function myext_civicrm_getA...Hello, I was testing the `hook_civicrm_getAssetUrl` hook introduced in [this PR](https://github.com/civicrm/civicrm-core/pull/14135) to increase the height of the main menu (this is on Civi `v.5.15.1`)
```php
function myext_civicrm_getAssetUrl(&$asset, &$params) {
if ($asset == 'crm-menubar.css') {
$params['height'] = 60;
}
}
```
The hook works, but I'm getting some extra spacing between the menu and the rest of the page, caused by the [`.crm-menubar-wrapped`](https://github.com/civicrm/civicrm-core/blob/869b8ee06f2f7c2d11860601d1a51593ecc5b4ab/css/menubar-drupal7.css#L10-L12) class
![height](/uploads/4c2a80aeeb7f69c397efb3edf0e0bfb9/height.png)
I see that that class is [added via JS](https://github.com/civicrm/civicrm-core/blob/869b8ee06f2f7c2d11860601d1a51593ecc5b4ab/js/crm.menubar.js#L441-L442) only if the height of the menu is higher than 50 pixels, but i'm not sure why
```js
function handleResize() {
if ($(window).width() >= 768 && $('#civicrm-menu').height() > 50) {
$('body').addClass('crm-menubar-wrapped');
} else {
$('body').removeClass('crm-menubar-wrapped');
}
}
```
Is this working as expected? Anything that I'm missing?https://lab.civicrm.org/dev/core/-/issues/1123Changing the label for the Inbound Email activity type lets you edit/delete t...2019-09-07T21:07:07ZDaveDChanging the label for the Inbound Email activity type lets you edit/delete them even if the permission disallowsThis is related to dev/core#1116 but I'd like to start with this one first since it's more contained and allows removing a confusing variable that is only ever used once and used incorrectly.
1. To reproduce, set the permission so that ...This is related to dev/core#1116 but I'd like to start with this one first since it's more contained and allows removing a confusing variable that is only ever used once and used incorrectly.
1. To reproduce, set the permission so that editing inbound emails is disallowed. Will probably already be like this by default.
2. Change the activity type label for Inbound Email.
3. Go to a contact's activities tab and click the view link for an inbound email. On the popup there's now edit and delete buttons whereas before there weren't.
4. Click the edit button, make your edit, and save.
The problem is this line in https://github.com/civicrm/civicrm-core/blob/5.15.1/templates/CRM/Activity/Form/Activity.tpl#L252
`{if $action eq 4 && ($activityTName neq 'Inbound Email' || $allow_edit_inbound_emails == 1)}`
$activityTName (which is different than $activityTypeName, although it has the same value) is actually the label, and so if you've changed the label the comparison doesn't work.
This is the only place this variable is used.5.18.0https://lab.civicrm.org/dev/core/-/issues/1062Change the CiviCRM v3 / v4 API to only return active contacts by default. Cur...2019-11-27T21:55:34Zjustinfreeman (Agileware)Change the CiviCRM v3 / v4 API to only return active contacts by default. Currently will include deleted contactsThis is a straight forward request to simply change the CiviCRM v3 / v4 API to only return **active contacts by default**. Currently API calls will include deleted contacts in the results.
This is counter-intuitive and a constant source...This is a straight forward request to simply change the CiviCRM v3 / v4 API to only return **active contacts by default**. Currently API calls will include deleted contacts in the results.
This is counter-intuitive and a constant source of bugs when testing new code. It is not always immediately obvious that deleted contacts are included in the result set, especially if you are testing on a CiviCRM site with no deleted contacts. Then when you move the code to production, BAM! What are all these other contacts in here? That's a big fail (and many sad faces).
The only reason I know of for deleted contacts to be included by default currently was quite eloquently described by @seamuslee in [chat](https://chat.civicrm.org/civicrm/pl/ux97e5idefnxzq8h99zuo5t6jh): "*because we want to keep you on your toes* @agileware_justin"
If you want to return deleted contacts in an API call, then this should be explicit via a parameter. eg. return deleted contacts = true.
Agileware Ref: CIVICRM-1241https://lab.civicrm.org/dev/core/-/issues/1058Display bug for Checkboxes Custom field on Event Confirm / Thank you pages2019-11-29T15:07:45ZsamuelsovDisplay bug for Checkboxes Custom field on Event Confirm / Thank you pagesOn event registration form, check some checkboxes on a checkboxes custom field :
![Screenshot_2019-06-19_-_Event_with_custom_checkboxes](/uploads/ff1f5cc9fb3575f6ace441d4c8355af7/Screenshot_2019-06-19_-_Event_with_custom_checkboxes.png)...On event registration form, check some checkboxes on a checkboxes custom field :
![Screenshot_2019-06-19_-_Event_with_custom_checkboxes](/uploads/ff1f5cc9fb3575f6ace441d4c8355af7/Screenshot_2019-06-19_-_Event_with_custom_checkboxes.png)
On confirm / thank you, the wrong label is chown :
![Screenshot_2019-06-19_Event_with_custom_checkboxes_-_confirm](/uploads/cad6321211977c0a3ef5af0fb1aa16d1/Screenshot_2019-06-19_Event_with_custom_checkboxes_-_confirm.png)5.16.0https://lab.civicrm.org/dev/core/-/issues/964Add time start date and end date values on page contribution widget ajax resp...2019-06-06T13:53:18ZfrancescbassasAdd time start date and end date values on page contribution widget ajax responseContribution page widgets calls civicrm/extern/widget.php to extract info of the campaign related to the widget. In some cases it maybe interesting to have the time to start or to finish the campaign to customize the widget with options ...Contribution page widgets calls civicrm/extern/widget.php to extract info of the campaign related to the widget. In some cases it maybe interesting to have the time to start or to finish the campaign to customize the widget with options such as "Starts in X days", "Ends in X days" or anything else.
in the line of https://issues.civicrm.org/jira/browse/CRM-21454https://lab.civicrm.org/dev/core/-/issues/959Expose contribution page in Contribution Summary report2019-05-24T01:27:11ZyashodhaExpose contribution page in Contribution Summary reportExpose contribution page in Contribution Summary reportExpose contribution page in Contribution Summary report5.15.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/930Performance issue with advanced search result count when searching on several...2022-11-21T05:03:26ZlolcodePerformance issue with advanced search result count when searching on several groups and one or more is a Smart groupIn advanced search we are searching for all users in any one of 3 groups. One of those groups is a fairly large smart group.
One of the slow queries observed and checked in the slow query log (over 60 seconds) is the one for getting the ...In advanced search we are searching for all users in any one of 3 groups. One of those groups is a fairly large smart group.
One of the slow queries observed and checked in the slow query log (over 60 seconds) is the one for getting the total number of results.
```
SELECT count(DISTINCT contact_a.id) as rowCount
FROM civicrm_contact contact_a
LEFT JOIN civicrm_group_contact civicrm_group_contact-2032325,930575
ON (contact_a.id = civicrm_group_contact-2032325,930575.contact_id AND civicrm_group_contact-2032325,930575.status IN ('Added'))
LEFT JOIN civicrm_group_contact_cache civicrm_group_contact_cache_2031143
ON contact_a.id = civicrm_group_contact_cache_2031143.contact_id
WHERE (
(
( civicrm_group_contact-2032325,930575.group_id IN ( 2032325,930575 ) )
OR
( civicrm_group_contact_cache_2031143.group_id IN ("2031143") )
)
)
AND (contact_a.is_deleted = 0);
```
MySQL EXPLAIN gives us a query_cost for this of 5505518.60
I came up with an alternate query at a much lower cost but I don't know enough about the Contact Query code to try it out and test it.
```
SELECT count(DISTINCT c.id) as rowCount
FROM civicrm_contact c
LEFT JOIN
(
select group_id, contact_id
from civicrm_group_contact_cache
WHERE group_id IN (2031143)
UNION
select group_id, contact_id
from civicrm_group_contact
WHERE group_id IN (2032325,930575) AND status IN ('Added')
) G
ON G.contact_id = c.id
WHERE
c.is_deleted = 0 and G.group_id IS NOT NULL
```
MySQL EXPLAIN gives us a query_cost for this one of only 102510.43
![Image_Pasted_at_2019-5-2_11-50](/uploads/b79c15b4b3c565259b4759a56ca6d14c/Image_Pasted_at_2019-5-2_11-50.png)
![Image_Pasted_at_2019-5-2_10-24](/uploads/fdf295fdb7435d156096e578544db0ee/Image_Pasted_at_2019-5-2_10-24.png)https://lab.civicrm.org/dev/core/-/issues/882ACLs don't work on "Tab with table" custom field groups2023-05-31T05:03:19ZJonGoldACLs don't work on "Tab with table" custom field groupsTo replicate on master:
* Create a new role, "Read Only".
* Give the role only the "Access CiviCRM" permission.
* Create a new group "Read Only" of type "Access Control".
* Create a multi-record custom group with display type of "Tab wit...To replicate on master:
* Create a new role, "Read Only".
* Give the role only the "Access CiviCRM" permission.
* Create a new group "Read Only" of type "Access Control".
* Create a multi-record custom group with display type of "Tab with table".
* Create a new user, give them the "Read Only" role and place them in the "Read Only" group.
* Configure an ACL that grants "View" access to one or more contacts. Since "Edit own contact" is a special case, ensure that one of the contacts doesn't belong to the user.
* Configure an ACL that grants "View" access to the multi-record custom group.
Expected result:
* This user shouldn't be able to edit a contact's data.
Actual result:
* This user can edit custom fields that are on a "tab with table".
There's a few things that need fixing, I intend to move at least some of these forward:
* The template doesn't have a permission check on the "Add" button.
* The class doesn't have a permission check on the action links.
* The class doesn't have a permission check on postProcess.
Finally, the "Edit" ACL for custom fields don't seem to be respected - but this is out of scope for this issue.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/867Expose line item name on search2023-04-30T05:03:21ZmaduraExpose line item name on search## Problem
On Advanced Search and Find Contributions there is currently no field to search for the line items. If an admin wants to be able to search for the contacts or contributions based on line items information there is no other se...## Problem
On Advanced Search and Find Contributions there is currently no field to search for the line items. If an admin wants to be able to search for the contacts or contributions based on line items information there is no other search parameters available.
## Proposed Solution
Introduce the "line item name" field in search.
Technical Steps:
- Add a new field to contribution search form and in postprocess, handle it and add suitable where clauses using existing fields as reference.
- Add a new textfield for line item search in CRM_Contribute_BAO_Query::buildSearchForm()
- In CRM_Contribute_BAO_Query::whereClauseSingle add logic for including condition for line item name.https://lab.civicrm.org/dev/core/-/issues/862Feature request: can't lookup Civi ID based on Drupal username via API2022-10-25T05:03:40ZsudomanFeature request: can't lookup Civi ID based on Drupal username via APIWhen visiting `https://exmple.com/civicrm/api#explorer`, select "User" from the `Entity` dropdown menu. Then change `Fields to return` to "ContactID", and under that, change "ContactID" to "username", then enter your user name. Copy the ...When visiting `https://exmple.com/civicrm/api#explorer`, select "User" from the `Entity` dropdown menu. Then change `Fields to return` to "ContactID", and under that, change "ContactID" to "username", then enter your user name. Copy the example Drush command into a terminal as root under the document root for your server. This error is returned:
````
Mandatory key(s) missing from params array: contact_id [error]
````
If you try again, but this time choose "CMS User ID" as the parameter, and enter your CMS User ID, then run the command, then the query works:
````
...
[contact_id] => 123929
...
````
The desired behavior is that querying by username would work, and for the parameter list to perhaps not show an asterisk next to the "Contact ID" option, as if it is required for all queries using that Entity. (It's currently possible to use the "CMS Contact ID" instead.)
Being able to search by username would help remote applications to log people in via a single-sign-on system that returns the user name to that remote application, then to access their Civi accounts via the API. There are ways to work around this issue, but I thought I should mention this scenario in case the behavior of this part of the API is inteded to cover this use case.
Thanks! : )https://lab.civicrm.org/dev/core/-/issues/849CQ: Use Guzzle as our preferred way to retrieve via http2022-10-21T05:03:38ZeileenCQ: Use Guzzle as our preferred way to retrieve via httpGuzzle permits unit testing & tinkering with timeoutsGuzzle permits unit testing & tinkering with timeoutshttps://lab.civicrm.org/dev/core/-/issues/846CQ: Refactor Recurring Contribution Forms2022-10-26T05:03:42Zmattwiremjw@mjwconsult.co.ukCQ: Refactor Recurring Contribution FormsThe contributionrecur forms have poor test coverage, are inconsistent with each other and do not have sensible parameters being passed to them (eg. recur_id). This is a meta issue to track improvements to these forms:
CRM/Contribute/For...The contributionrecur forms have poor test coverage, are inconsistent with each other and do not have sensible parameters being passed to them (eg. recur_id). This is a meta issue to track improvements to these forms:
CRM/Contribute/Form/CancelSubscription
CRM/Contribute/Form/UpdateBilling
CRM/Contribute/Form/UpdateSubscription
All 3 forms have been converted to inherit from the parent class `CRM/Contribute/Form/ContributionRecur` and common functionality will gradually be moved there.