Development issueshttps://lab.civicrm.org/groups/dev/-/issues2021-09-07T10:20:35Zhttps://lab.civicrm.org/dev/core/-/issues/2187Allow for the default number of search results to be configurable2021-09-07T10:20:35ZseamusleeAllow for the default number of search results to be configurableOverview
----------------------------------------
At the present moment the default number of results to be returned on a search is hard coded to 50 in `CRM/Utils/Pager.php` this should ideally be configurable using settings
Example use...Overview
----------------------------------------
At the present moment the default number of results to be returned on a search is hard coded to 50 in `CRM/Utils/Pager.php` this should ideally be configurable using settings
Example use-case
----------------------------------------
A site wants to show 100 contacts / memberships / grants etc on a screen at a time rather than 50
Current behaviour
----------------------------------------
Hard coded default value of 50
Proposed behaviour
----------------------------------------
Create a setting to handle the default value and set it on various search forms.5.39.0https://lab.civicrm.org/dev/core/-/issues/2184OAUTH2 google doesn't seem to give you refresh tokens easily2023-06-15T01:11:27ZDaveDOAUTH2 google doesn't seem to give you refresh tokens easilyIf you run the authorization_code flow to obtain an access token from google I find the response often doesn't contain a refresh token, so then it can't really be used for cron jobs.
There was some suggestion that you have to delete the...If you run the authorization_code flow to obtain an access token from google I find the response often doesn't contain a refresh token, so then it can't really be used for cron jobs.
There was some suggestion that you have to delete the token in the civi admin AND at google. This [issue](https://github.com/googleapis/google-api-python-client/issues/213#issuecomment-612412147) suggests it only gives a refresh token when you are prompted for consent and not subsequent times (or if you pass the prompt=consent parameter).
It may only come up as a problem during a testing cycle where you keep failing and re-requesting, and for people who are setting up an account and get it right the first time it won't be a problem.
TBD5.64.0https://lab.civicrm.org/dev/core/-/issues/2178Cannot manually add contacts immediately after group creation2020-11-20T00:02:45ZandrewcormickdockeryCannot manually add contacts immediately after group creationOverview
----------------------------------------
In Civi 5.31.0, there is difficulty in assigning contacts immediately after a static group creation. This is a regression compared to Civi 5.28.3 (I haven't tested later versions of Civi...Overview
----------------------------------------
In Civi 5.31.0, there is difficulty in assigning contacts immediately after a static group creation. This is a regression compared to Civi 5.28.3 (I haven't tested later versions of Civi than this).
Reproduction steps
----------------------------------------
1. Contacts/New Group, add name, set group type as mailing list, save.
2. Add contacts to group, choose name to find, ensure results have about 10 entries or so.
3. Select all contacts, add. No contacts added. Strange formatting on messages.
Current behaviour
----------------------------------------
Contacts not added to group. Strange formatting in messages, see images.
![image](/uploads/42a94da16ced4f9b6397133cd4b3a4b7/image.png)
![image](/uploads/90ac3eff22ecc5fff1ba4daa3133a99c/image.png)
Note that contacts can still be added to static groups in other ways, I have noticed this problem specifically with the "add contact" screen shown immediately after creating the static group.
Expected behaviour
----------------------------------------
Contacts should be added to the group as indicated by the user.
Environment information
----------------------------------------
* __CiviCRM:__ _5.31.0_
* __PHP:__ _7.3_
* __CMS:__ _Drupal 7.73_
* __Database:__ _MariaDB 10.3.20_
* __Web Server:__ _Nginx 1.10.3_5.31.1https://lab.civicrm.org/dev/core/-/issues/2174Activity Summary report is missing pagination2020-12-11T02:59:51ZMonish DebActivity Summary report is missing paginationSteps to replicate:
1. Go to Activity Summary report
2. Grouping - Contact
3. Submit
It always shows 50 records without pagination, irrespective of total number of records:
![core-activity-summary](/uploads/c3819b7b5e3ba79c3edf9940840...Steps to replicate:
1. Go to Activity Summary report
2. Grouping - Contact
3. Submit
It always shows 50 records without pagination, irrespective of total number of records:
![core-activity-summary](/uploads/c3819b7b5e3ba79c3edf99408400b00c/core-activity-summary.gif)5.34.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/2173Reports don't filter with empty custom fields2020-12-30T06:55:13ZCésarReports don't filter with empty custom fieldsHello,
I have created a group of custom fields and a new custom field type "Alphanumeric". Then I have created two contacts without assigning them any value in the custom field. Finally I have tried to filter the field in the reports as...Hello,
I have created a group of custom fields and a new custom field type "Alphanumeric". Then I have created two contacts without assigning them any value in the custom field. Finally I have tried to filter the field in the reports as "is empty (NULL)" and the report shows only the null results. (When the contact is created it is assigned as empty)
Tested in multiple reports on dmaster:
![report_bug3](/uploads/0f610549cab62df50a03460207f0be5c/report_bug3.gif)5.34.0https://lab.civicrm.org/dev/core/-/issues/2169Contact hash token does not populate in reminders2021-03-28T06:46:04ZdschaferContact hash token does not populate in remindersThe token {contact.hash} does not populate when used in a scheduled reminder.
I works correctly in all other mail contexts.
Using 5.27.5 ESRThe token {contact.hash} does not populate when used in a scheduled reminder.
I works correctly in all other mail contexts.
Using 5.27.5 ESR5.37.0https://lab.civicrm.org/dev/financial/-/issues/156Refund status not set correctly when cancelled_payment_id is set2020-11-09T14:28:28ZJonGoldRefund status not set correctly when cancelled_payment_id is setThis is the same as https://lab.civicrm.org/extensions/stripe/-/issues/260, but the issue lies in core.
### Steps to Replicate
* Create a contribution.
* Refund the entire contribution via `Payment.create`. Set the `cancelled_payment_i...This is the same as https://lab.civicrm.org/extensions/stripe/-/issues/260, but the issue lies in core.
### Steps to Replicate
* Create a contribution.
* Refund the entire contribution via `Payment.create`. Set the `cancelled_payment_id`.
### Expected Result
The contribution's status should be "Refunded".
### Actual Result
The contribution's status remains "Completed".
PR [16148](https://github.com/civicrm/civicrm-core/pull/16148)'s purpose is to set a contribution's status to "Refunded" when the refund's total equals the contribution's total (in `CRM_Financial_BAO_Payment::create()`.
However, this function [returns early](https://github.com/civicrm/civicrm-core/blob/0b44c58f8d6abea7e0be266d89e0100a0e871f60/CRM/Financial/BAO/Payment.php#L99-L102) if the `cancelled_payment_id` is set. Stripe 6.5 [sets that value](https://lab.civicrm.org/extensions/stripe/-/blob/master/CRM/Core/Payment/StripeIPN.php#L318) (as it should). So that code never runs.
Moreover, the test on PR 16148 doesn't set this value, so the bug isn't caught.5.32.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/2165Handle emojis less fatally where not supported2020-12-04T15:18:03ZeileenHandle emojis less fatally where not supportedBoth these api calls
```
$result = civicrm_api3('Contact', 'get', [
'sequential' => 1,
'first_name' => "🦉Claire",
]);
```
and
```
$contacts = \Civi\Api4\Contact::get()
->addWhere('first_name', '=', '🦉Claire')
->setLimit(25)
...Both these api calls
```
$result = civicrm_api3('Contact', 'get', [
'sequential' => 1,
'first_name' => "🦉Claire",
]);
```
and
```
$contacts = \Civi\Api4\Contact::get()
->addWhere('first_name', '=', '🦉Claire')
->setLimit(25)
->execute();
```
result in fatal errors where emoji support is not enabled. I think a 'Claire' search or no results search would be better than a fatal error5.33.0https://lab.civicrm.org/dev/core/-/issues/2164Exporting in localized civicrm crashes due to long translations in columns T_...2021-06-09T13:57:48ZnieloExporting in localized civicrm crashes due to long translations in columns T_BooleanOverview
----------------------------------------
Export tmp tables are created with varchar(16) for T_BOOLEAN types. This may be sufficient for the short-worded language english but if translated we get longer export values. So this sho...Overview
----------------------------------------
Export tmp tables are created with varchar(16) for T_BOOLEAN types. This may be sufficient for the short-worded language english but if translated we get longer export values. So this should be 32 or more
To fix for example change ExportProcessor.php, L1454, to
return "`$fieldName` varchar(64)";5.37.0https://lab.civicrm.org/dev/core/-/issues/2162Reports cannot filter for Contacts with multiple selections in a multi-select...2020-12-02T21:04:03ZjhungerfordReports cannot filter for Contacts with multiple selections in a multi-select Custom FieldOverview
----------------------------------------
If a Contact has multiple selections in a multi-select Custom Field, a Report which filters for "one of" those selections will never find that Contact. There is no "includes" or similar o...Overview
----------------------------------------
If a Contact has multiple selections in a multi-select Custom Field, a Report which filters for "one of" those selections will never find that Contact. There is no "includes" or similar option which finds Contacts who have the specified selection and other selections as well. The generated SQL syntax is not compatible with the storage format of multi-select custom fields when more than one option is selected.
For example: Consider the demo database at https://demo.circle-interactive.co.uk/
It has a Custom Field called "Most Important Issue" with the options "Environment", "Education", and "Social Justice".
Suppose we create another Custom Field which uses the same options, and it is a multi-select. We'll call this field "Important Issues" and check "searchable" and "multi-select".
Now we edit two contacts at random - give one of them "Environment" in their "Important Issues" field, and give the other one "Environment" and "Social Justice" in the same field.
Last, we create a Contact Summary report showing the Important Issues. In the filters, we select "Is one of" - "Environment", and run the report. It will find the Contact who only has "Environment" selected, but the one who has that and "Social Justice" will not be shown.
If you see this issue shortly after it is reported, the described setup may be visible in this report:
https://demo.circle-interactive.co.uk/civicrm/report/instance/39?reset=1&force=1
Reproduction steps
----------------------------------------
- Log into a civi demo site (e.g. demo.circle-interactive.co.uk)
- Create new custom fieldset "Test Report Filter Issue"
- Add a custom field:
- Field Label: Important Issues
- Alphanumeric Select
- Multi-Select is enabled
- Reuse an existing set of multiple choice options if suitable (e.g. from "Most Important Issue") or create a new set
- Searchable: Yes
- Edit two random Contacts
- For one, set the new "Important Issues" field to "Environment"
- For the other, set the new field to "Environment" and "Social Justice"
- Create a new "Constituent Report (Summary)" (/civicrm/report/contact/summary?reset=1)
- in "Columns", tick "First name", "Last name", and "Important Issues" (the new custom field)
- in "Filters", choose "Important Issues" - "Is one of" - "Environment"
- Run the report
Current behaviour
----------------------------------------
The report only finds the Contact who has the single selection.
There is no other way to filter for people who do have the Environment selection (e.g. "includes one of" as distinct from "is exactly one of").
Expected behaviour
----------------------------------------
If some sites do want the "is exactly one of" filter, others (like ours) will need a separate "includes one of" option. I may be able to do this with custom report templates for our site as needed, but a system-wide solution would be much better.
The behaviour appears to have changed when we upgraded to 5.27 from the previous ESR, though we've only noticed it a few months later.
From our perspective, the old behaviour was correct and expected, and the "is one of" text could have been improved by changing it to "includes one of". However, the new behaviour may be desired by some sites. I think that may be implied by this old issue, but I may be misunderstanding since they're also discussing the regex as it relates to the storage format:
https://issues.civicrm.org/jira/browse/CRM-18803
Environment information
----------------------------------------
* __Browser:__ Chrome 86.0.4240.111 (Official Build) Arch Linux (64-bit)
* __CiviCRM:__ 5.27.5, also tested on 5.29.1 and 5.30.1
* __PHP:__ 7.3
* __CMS:__ Drupal 7.73
* __Database:__ MariaDB 10.3
* __Web Server:__ Apache 2.4
Comments
----------------------------------------
A couple of years ago, there was some discussion of a similar issue with contact subtypes, and Eileen wondered whether it might affect custom fields as well:
https://github.com/civicrm/civicrm-core/pull/13158#issuecomment-442334591
At the time, it was still using a regex, but the new SQL generated by the report takes the simpler form "IN ('3')", which will never match a column with a '3' nestled between control codes and other values.
Yesterday when trying to trace the path which generated the SQL, I thought this line might be relevant:
https://lab.civicrm.org/dev/core/-/blob/master/CRM/Core/BAO/CustomField.php#L2583-2584
Considering that the new behaviour might be deliberate, I thought I should report the issue rather than trying to find a solution since the correct path forward is not obvious to me.5.33.0https://lab.civicrm.org/dev/core/-/issues/2158Proposal - remove detail about updating related components when editing a con...2020-11-12T20:48:25ZeileenProposal - remove detail about updating related components when editing a contribution statusI'd like to propose removing the chunk of code that sets a message about related entities being updated when a Contribution Status is edited on the contribution page.
The reason is this code is somewhat toxic in itself but deeply couple...I'd like to propose removing the chunk of code that sets a message about related entities being updated when a Contribution Status is edited on the contribution page.
The reason is this code is somewhat toxic in itself but deeply coupled with the highly toxic 'transitionComponents' function and does not cope well with the scenario where another function (the hook in the cancelcontributioncancel actions or another extension) intervenes and the status is updated in some different way.
We could load the related entities on the form & be more sophisticated about creating a message - but my feeling is that we wouldn't lose much if we just removed it (it's a back-office form & I suspect users just check other tabs on the contact rather than reading the detail of the message.) If the form did a little less I believe it could be more robust about it
```
// get the status message for user.
foreach ($updatedComponents as $componentName => $updatedStatusId) {
if ($componentName == 'CiviMember') {
$updatedStatusName = CRM_Utils_Array::value($updatedStatusId,
CRM_Member_PseudoConstant::membershipStatus()
);
$statusNameMsgPart = 'updated';
switch ($updatedStatusName) {
case 'Cancelled':
case 'Expired':
$statusNameMsgPart = $updatedStatusName;
break;
}
$statusMsg .= "<br />" . ts("Membership for %1 has been %2.", [
1 => $userDisplayName,
2 => $statusNameMsgPart,
]);
}
if ($componentName == 'CiviEvent') {
$updatedStatusName = CRM_Utils_Array::value($updatedStatusId,
CRM_Event_PseudoConstant::participantStatus()
);
if ($updatedStatusName == 'Cancelled') {
$statusMsg .= "<br />" . ts("Event Registration for %1 has been Cancelled.", [1 => $userDisplayName]);
}
elseif ($updatedStatusName == 'Registered') {
$statusMsg .= "<br />" . ts("Event Registration for %1 has been updated.", [1 => $userDisplayName]);
}
}
if ($componentName == 'CiviPledge') {
$updatedStatusName = CRM_Utils_Array::value($updatedStatusId,
CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name')
);
if ($updatedStatusName == 'Cancelled') {
$statusMsg .= "<br />" . ts("Pledge Payment for %1 has been Cancelled.", [1 => $userDisplayName]);
}
elseif ($updatedStatusName == 'Failed') {
$statusMsg .= "<br />" . ts("Pledge Payment for %1 has been Failed.", [1 => $userDisplayName]);
}
elseif ($updatedStatusName == 'Completed') {
$statusMsg .= "<br />" . ts("Pledge Payment for %1 has been updated.", [1 => $userDisplayName]);
}
}
}
```5.33.0https://lab.civicrm.org/dev/core/-/issues/2155Remove 'onlinePendingContribution' payment support from membership edit form2020-11-16T20:05:33ZeileenRemove 'onlinePendingContribution' payment support from membership edit formI want to proposed removing support for 'onlinePendingContribution' from the Membership Edit form.
**What is onlinePendingContribution support you ask?**
It's this box on the membership edit form
![Screen_Shot_2020-10-31_at_6.30.02_PM]...I want to proposed removing support for 'onlinePendingContribution' from the Membership Edit form.
**What is onlinePendingContribution support you ask?**
It's this box on the membership edit form
![Screen_Shot_2020-10-31_at_6.30.02_PM](/uploads/10211382f41b9d0fe92362f620e68d6e/Screen_Shot_2020-10-31_at_6.30.02_PM.png)
**Hey but I've never seen that box!**
Well you only see if if someone has created a pending pay later membership through an online form which you later complete through the membership edit form
**And it allows you to send a customised receipt?**
No, it says you can, you can't
**How else would someone complete that contribution?**
Well - they could do it the same way they would for a pending contribution created in any other way - use the link a moment further down the page
![Screen_Shot_2020-10-31_at_6.27.20_PM](/uploads/3e29866a816528a9265a26a852aa73de/Screen_Shot_2020-10-31_at_6.27.20_PM.png)
**And why do you want to remove it**
There is considerable code complexity needed to support it - about 85 lines of code. Oh, and it's broken in master
**But how do we know no-one is using it**
Well I tested on 5.21 & it's broken there too so my guess is is has broken for a long time....5.33.0https://lab.civicrm.org/dev/core/-/issues/2153BUG: when changing a group option value CiviCRM does not update existing records2020-11-22T17:44:26ZyashodhaBUG: when changing a group option value CiviCRM does not update existing recordsSteps to replicate :
Create a custom field of type Alphanumeric and html Select
Create options one with value(1).
![s](/uploads/0a6b76d48df92f8bca2533a034e91079/s.png)
Edit values for a contact with custom field selected as 'one' and sa...Steps to replicate :
Create a custom field of type Alphanumeric and html Select
Create options one with value(1).
![s](/uploads/0a6b76d48df92f8bca2533a034e91079/s.png)
Edit values for a contact with custom field selected as 'one' and save.
![Screenshot_from_2020-10-30_18_34_27](/uploads/b4a7f4a8315412598349801829fee28b/Screenshot_from_2020-10-30_18_34_27.png)
Go to options and change value of one to 2.
![Screenshot_from_2020-10-30_18_36_12](/uploads/de3b1b73a5e4725a9d235b7b827ff2f8/Screenshot_from_2020-10-30_18_36_12.png)
Contact will no longer display the value 'one' since in DB the value will not have been synce'd to 2 in custom field value table.
![ssss](/uploads/d7336cfb571abcd0496046872f3b1cd1/ssss.png)
This is a regression as this was working before and is quite confusing as the results won't show properly.5.33.0https://lab.civicrm.org/dev/core/-/issues/2148Incorrect use of quotes and escape and ts in CRM_Core_DAO::copyValues2020-11-03T22:36:00ZDaveDIncorrect use of quotes and escape and ts in CRM_Core_DAO::copyValuesThere's a couple things wrong with [this logging line](https://github.com/civicrm/civicrm-core/blob/60080668785d1e389bd81260bb13210b428f224f/CRM/Core/DAO.php#L761):
`Civi::log()->warning(ts('A string for field $dbName has been truncated...There's a couple things wrong with [this logging line](https://github.com/civicrm/civicrm-core/blob/60080668785d1e389bd81260bb13210b428f224f/CRM/Core/DAO.php#L761):
`Civi::log()->warning(ts('A string for field $dbName has been truncated. The original string was %1', [CRM_Utils_Type::escape($value, 'String')]));`
1. I'm not sure it should be ts'd since it's a system-y string usually not seen by end users.
2. It uses a variable inside the ts.
3. The variable gets output as the literal `$dbName` instead of the value because the string uses single quotes.
4. CRM_Utils_Type::escape is sometimes a misleading function name. It doesn't "make the string safe in all circumstances". In this situation it escapes it for insertion into an SQL string which might be what happens if that's the log implementation being used, but isn't necessarily where it ends up. Even if database was the end target, the log implementation should escape it at insertion time, not here.5.32.0https://lab.civicrm.org/dev/core/-/issues/2147IN operator not working in Search2020-11-02T05:46:11ZedvanleeuwenIN operator not working in SearchOverview
----------------------------------------
When selecting multiple groups in contact search, I should get all the contacts of the groups combined. Now, only the contacts of the first group are displayed.
_If you have already post...Overview
----------------------------------------
When selecting multiple groups in contact search, I should get all the contacts of the groups combined. Now, only the contacts of the first group are displayed.
_If you have already posted on https://civicrm.stackexchange.com or https://chat.civicrm.org, please include the link to that conversation._
Reproduction steps
----------------------------------------
1. Click on **Contacts -> Search**.
1. Select **in** and choose more than one group.
1. Only the contacts of the first group chosen are displayed.
Current behaviour
----------------------------------------
_What happens currently. Please provide error messages, screenshots or gifs ([LICEcap](http://www.cockos.com/licecap/), [SilentCast](https://github.com/colinkeenan/silentcast)) where appropriate._
When selecting multiple groups in contact search, I get only the contacts of the first group.
Expected behaviour
----------------------------------------
When selecting multiple groups in contact search, I should get all the contacts of the groups combined.
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __Browser:__ _Edge_
* __CiviCRM:__ _5.30_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __PHP:__ _7.4__
* __CMS:__ _Drupal 7_
* __Database:__ _MariaDB 10.4_
* __Web Server:__ _Apache 2.4_
Comments
----------------------------------------
I have verified and recreated the problem on the demo site.5.31.0https://lab.civicrm.org/dev/core/-/issues/2146Long cyrillic names give error Data too long for column sort_name when saving...2020-10-27T22:27:08ZDaveDLong cyrillic names give error Data too long for column sort_name when saving a contactSee also [stackexchange post](https://civicrm.stackexchange.com/questions/37992/db-error-for-sort-name-when-adding-contacts-with-long-names-in-2-bytes-utf8-char).
The problem is that CRM_Contact_BAO_Contact::add tries to [truncate the s...See also [stackexchange post](https://civicrm.stackexchange.com/questions/37992/db-error-for-sort-name-when-adding-contacts-with-long-names-in-2-bytes-utf8-char).
The problem is that CRM_Contact_BAO_Contact::add tries to [truncate the sort_name](https://github.com/civicrm/civicrm-core/blob/1c8707d6ae7f034474e400a42a4650985616b631/CRM/Contact/BAO/Contact.php#L163-L165) and assumes 1 byte per char. While using substr() instead of mb_substr() would get the number of chars wrong, possibly exceeding the byte length, the main problem is that it can truncate half a character creating an invalid utf8 string. This isn't a utf8 vs utf8mb4 thing either.5.32.0https://lab.civicrm.org/dev/core/-/issues/2145Italian provinces2020-10-27T03:06:52ZmasettoItalian provincesThese Italian provinces
```
-- new Italian provinces, as yet without codes (CRM-5048)
(10010, 1107, "Bar", "Barletta-Andria-Trani"),
(10011, 1107, "Fer", "Fermo"),
(10012, 1107, "Mon", "Monza e Brianza"),
```
now have a definitive abbr...These Italian provinces
```
-- new Italian provinces, as yet without codes (CRM-5048)
(10010, 1107, "Bar", "Barletta-Andria-Trani"),
(10011, 1107, "Fer", "Fermo"),
(10012, 1107, "Mon", "Monza e Brianza"),
```
now have a definitive abbreviation
```
(10010, 1107, "BT", "Barletta-Andria-Trani"),
(10011, 1107, "FM", "Fermo"),
(10012, 1107, "MB", "Monza e Brianza"),
```5.32.0https://lab.civicrm.org/dev/core/-/issues/2143Custom Searches in events fail after 5.30.x upgrade2020-10-27T02:46:00ZspalmstromCustom Searches in events fail after 5.30.x upgradeOverview
----------------------------------------
_Please describe your problem or bug in detail._
After upgrading to CiviCRM 5.30 under Joomla, event based custom searches fail with: *DB Error: value count on row* and a stack trace. I...Overview
----------------------------------------
_Please describe your problem or bug in detail._
After upgrading to CiviCRM 5.30 under Joomla, event based custom searches fail with: *DB Error: value count on row* and a stack trace. I have a development Drupal instance, but that failed to run CiviCRM after the update and I haven't managed to resolve that issue.
It is running under IIS, but we also see it under Linux.
Reproduction steps
----------------------------------------
1. Click on **Search** and select **Custom Searches**
1. Click on **Event Aggregate**
1. Select an event
1. Click **Search**
Current behaviour
----------------------------------------
_What happens currently. Please provide error messages, screenshots or gifs ([LICEcap](http://www.cockos.com/licecap/), [SilentCast](https://github.com/colinkeenan/silentcast)) where appropriate._
Stack trace:
```
#0 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Core\Error.php(148): CRM_Core_Error::backtrace()
#1 <Joomla directory>\administrator\components\com_civicrm\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
#2 <Joomla directory>\administrator\components\com_civicrm\civicrm\packages\DB.php(997): PEAR_Error->__construct("DB Error: value count on row", -22, 16, (Array:2), "\nINSERT INTO civicrm_prevnext_cache (cachekey, entity_id1, data)\n\n ...")
#3 <Joomla directory>\administrator\components\com_civicrm\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php(575): DB_Error->__construct(-22, 16, (Array:2), "\nINSERT INTO civicrm_prevnext_cache (cachekey, entity_id1, data)\n\n ...")
#4 <Joomla directory>\administrator\components\com_civicrm\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php(223): PEAR::_raiseError(Object(DB_mysqli), NULL, -22, 16, (Array:2), "\nINSERT INTO civicrm_prevnext_cache (cachekey, entity_id1, data)\n\n ...", "DB_Error", TRUE)
#5 <Joomla directory>\administrator\components\com_civicrm\civicrm\packages\DB\common.php(1920): PEAR->__call("raiseError", (Array:7))
#6 <Joomla directory>\administrator\components\com_civicrm\civicrm\packages\DB\mysqli.php(936): DB_common->raiseError(-22, NULL, NULL, "\nINSERT INTO civicrm_prevnext_cache (cachekey, entity_id1, data)\n\n ...", "1136 ** Column count doesn't match value count at row 1")
#7 <Joomla directory>\administrator\components\com_civicrm\civicrm\packages\DB\mysqli.php(406): DB_mysqli->mysqliRaiseError()
#8 <Joomla directory>\administrator\components\com_civicrm\civicrm\packages\DB\common.php(1229): DB_mysqli->simpleQuery("\nINSERT INTO civicrm_prevnext_cache (cachekey, entity_id1, data)\n\n ...")
#9 <Joomla directory>\administrator\components\com_civicrm\civicrm\packages\DB\DataObject.php(2696): DB_common->query("\nINSERT INTO civicrm_prevnext_cache (cachekey, entity_id1, data)\n\n ...")
#10 <Joomla directory>\administrator\components\com_civicrm\civicrm\packages\DB\DataObject.php(1829): DB_DataObject->_query("\nINSERT INTO civicrm_prevnext_cache (cachekey, entity_id1, data)\n\n ...")
#11 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Core\DAO.php(445): DB_DataObject->query("\nINSERT INTO civicrm_prevnext_cache (cachekey, entity_id1, data)\n\n ...")
#12 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Core\DAO.php(1551): CRM_Core_DAO->query("\nINSERT INTO civicrm_prevnext_cache (cachekey, entity_id1, data)\n\n ...", TRUE)
#13 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Core\PrevNextCache\Sql.php(43): CRM_Core_DAO::executeQuery("\nINSERT INTO civicrm_prevnext_cache (cachekey, entity_id1, data)\n\n ...", (Array:0), FALSE)
#14 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Contact\Selector.php(1047): CRM_Core_PrevNextCache_Sql->fillWithSql("civicrm search f34df2377021b9d0d51da884d5a36bf1372d6d1cf25a00d692664ad719aadc...", "\n SELECT civicrm_participant.event_id as event_id,\n COUNT(civ...")
#15 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Contact\Selector.php(909): CRM_Contact_Selector->fillupPrevNextCache(Object(CRM_Utils_Sort), "civicrm search f34df2377021b9d0d51da884d5a36bf1372d6d1cf25a00d692664ad719aadc...", 0, 500)
#16 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Contact\Selector\Custom.php(358): CRM_Contact_Selector->buildPrevNextCache(Object(CRM_Utils_Sort))
#17 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Core\Selector\Controller.php(402): CRM_Contact_Selector_Custom->getRows(4, 0, 50, Object(CRM_Utils_Sort), 1, NULL)
#18 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Core\Selector\Controller.php(324): CRM_Core_Selector_Controller->getRows(Object(CRM_Contact_Selector_Controller))
#19 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Contact\Form\Search.php(867): CRM_Core_Selector_Controller->run()
#20 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Contact\Form\Search\Custom.php(157): CRM_Contact_Form_Search->postProcess()
#21 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Core\Form.php(507): CRM_Contact_Form_Search_Custom->postProcess()
#22 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Core\QuickForm\Action\Refresh.php(57): CRM_Core_Form->mainProcess()
#23 <Joomla directory>\administrator\components\com_civicrm\civicrm\packages\HTML\QuickForm\Controller.php(203): CRM_Core_QuickForm_Action_Refresh->perform(Object(CRM_Contact_Form_Search_Custom), "refresh")
#24 <Joomla directory>\administrator\components\com_civicrm\civicrm\packages\HTML\QuickForm\Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Search_Custom), "refresh")
#25 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Core\Controller.php(347): HTML_QuickForm_Page->handle("refresh")
#26 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Core\Invoke.php(312): CRM_Core_Controller->run((Array:4), (Array:0))
#27 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Core\Invoke.php(68): CRM_Core_Invoke::runItem((Array:12))
#28 <Joomla directory>\administrator\components\com_civicrm\civicrm\CRM\Core\Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
#29 <Joomla directory>\administrator\components\com_civicrm\civicrm.php(121): CRM_Core_Invoke::invoke((Array:4))
#30 <Joomla directory>\administrator\components\com_civicrm\civicrm.php(40): civicrm_invoke()
#31 <Joomla directory>\libraries\src\Component\ComponentHelper.php(402): require_once("<Joomla directory>\administrator\components\com_civicrm\civicrm.php")
#32 <Joomla directory>\libraries\src\Component\ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent("<Joomla directory>\administrator/components/com_civicrm/civicrm.php")
#33 <Joomla directory>\libraries\src\Application\AdministratorApplication.php(101): Joomla\CMS\Component\ComponentHelper::renderComponent("com_civicrm")
#34 <Joomla directory>\libraries\src\Application\AdministratorApplication.php(159): Joomla\CMS\Application\AdministratorApplication->dispatch()
#35 <Joomla directory>\libraries\src\Application\CMSApplication.php(196): Joomla\CMS\Application\AdministratorApplication->doExecute()
#36 <Joomla directory>\administrator\index.php(51): Joomla\CMS\Application\CMSApplication->execute()
#37 {main}
```
![image](/uploads/9ddf7a4a28592eaa4e0a986960497142/image.png)
Expected behaviour
----------------------------------------
_What should happen._
Something like:
![image](/uploads/e9361b8bcdcc782ac1398f32cb7adb50/image.png)
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is necessary. -->
* __Browser:__ _Edge_, but probably irrelevant_
* __CiviCRM:__ _5.30.x..._ Upgrading from _5.29.1_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __PHP:__ _7.3.23/7.4.11_ but probably irrelevant
* __CMS:__ _Joomla 3.9.22_ but may be irrelevant
* __Database:__ _MySQL 5.6.40-84.0-log/MySQL 5.7.31-log..._ but probably irrelevant
* __Web Server:__ _Apache/IIS_ but probably irrelevant.
Comments
----------------------------------------
_Anything else you would like the reviewer to note._
I have been attempting to research this, and it appears to be related to how CiviCRM is trying to populate civicrm_prevnext_cache where for the event based searches it is trying to add the wrong number of values. I am reporting it in case someone has a quick fix for the issue.5.31.0https://lab.civicrm.org/dev/core/-/issues/2142Advanced logging detail report improvement2020-11-06T02:35:57ZVangelisPAdvanced logging detail report improvementOverview
----------------------------------------
This issue relates to a discussion we had in CiviCRM [Dev channel](https://chat.civicrm.org/civicrm/pl/83okshh9wif6ufkif3fd3d8w1c) where it was being identified that when we got advanced ...Overview
----------------------------------------
This issue relates to a discussion we had in CiviCRM [Dev channel](https://chat.civicrm.org/civicrm/pl/83okshh9wif6ufkif3fd3d8w1c) where it was being identified that when we got advanced logging activated and a contact triggered batch updates/changes, the detailed report most of the time does not work due to extremely long delays.
That case applies if the target system is having many contact records.
Example use-case / How to reproduce
----------------------------------------
That's a little bit difficult to reproduce due to data sizes but here are the requirements to see the make it:
* Have detailed logging enabled
* Batch import and/or update 5k-10k contacts (more is better!)
* Go to the contact that did run the import
* Go to his/her "Changelog" tab and click on the 'update' link ('View details for this update')
This link should try to render the report `logging/contact/detail` (which points to `CRM_Logging_ReportDetail` ([link here](https://github.com/civicrm/civicrm-core/blob/master/CRM/Logging/ReportDetail.php))
Current behaviour
----------------------------------------
* If the records associated are too many, the report will never finish in a timely manner
* The same issue happens if we hover to the icon next to the action in the changelog tab
Proposed behaviour
----------------------------------------
* Show a list of 50 records per page by adding limit and pagers
* Render a pager on table list
* Disable the pager if layout is overlay (thus limiting the output to 50 rows max in overlay/hover mode)
Comments/Notes
----------------------------------------
As those 50 records per page are showing contacts that might have more than 1 change (change in multiple fields), we're grouping the change entries per contact ID so that we can keep them and then we are concatenating the results on the final table/overlay (tpl) using divs. This will help us maintain a consistency on the records vs rows listed on each page.
Screenshot before applying the grouping (concatenation) function:
![screenshot-before](/uploads/f777e3ee46a12809198bd0803d3cf3f7/screenshot-before.png)
Screenshot after applying the grouping (concatenation) function:
![screenshot-after](/uploads/603d6df7e94ae58530c4fa60fac74951/screenshot-after.png)
Since the main purpose of the overlay is just to show a preview (and not a complete listing), we are not going to use a pager on that display.
PR is here https://github.com/civicrm/civicrm-core/pull/188515.33.0https://lab.civicrm.org/dev/core/-/issues/2138Error in the selected phone to send an SMS when the Mobile type label is modi...2021-03-13T02:40:22ZdmunioError in the selected phone to send an SMS when the Mobile type label is modifiedOverview
----------------------------------------
When wanting to send an SMS, a mobile phone is not identified if it is not primary and if the label of the mobile phone type has been translated or modifed.
Reproduction steps
----------...Overview
----------------------------------------
When wanting to send an SMS, a mobile phone is not identified if it is not primary and if the label of the mobile phone type has been translated or modifed.
Reproduction steps
----------------------------------------
1. Change the label of the "Mobile" phone type.
![image](/uploads/3a758fbef44cf889539d8c47f498b3d4/image.png)
2. Use contact that has:
- Main phone with type other than "Mobile".
- A second "Mobile" type telephone number
![image](/uploads/816ff22a82c194b665cd51a9eb2bb21b/image.png)
3. Add task: Outbound SMS. The phone to which the sms is sent is the primary phone, not the Mobile type phone.
![image](/uploads/fd20d0d1faf8f17a31775170d7adad7a/image.png)5.32.0