CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2021-07-02T03:13:28Zhttps://lab.civicrm.org/dev/core/-/issues/2412Allow Entities within Afform to reference each other for values2021-07-02T03:13:28ZseamusleeAllow Entities within Afform to reference each other for valuesProposal:
To allow Entities to reference each other to get the relevant values to be used by afform:
Example:
Create an Afform that has Individual Fields but also you want to create an Activity with it, Allow for the source_contact_id...Proposal:
To allow Entities to reference each other to get the relevant values to be used by afform:
Example:
Create an Afform that has Individual Fields but also you want to create an Activity with it, Allow for the source_contact_id field to be set to something like `Individual1.id` or similar which is then translated in the save process to the appropriate id
Perhaps initially this should just be limited to ID fields I'm not sure. I'm thinking that we would probably have to come up with a angular way of dynamically populating the list of known fields about the other entity and then in the Save pass through an array of created Entities but this may also need to do some work on working through the logic i.e. ensure that Individual is created before the Activity for instance
@colemanw @eileen @totten @JoeMurray5.39.0seamusleeseamusleehttps://lab.civicrm.org/dev/core/-/issues/2390Add hook support for Activity Contact2021-03-21T21:40:18ZyashodhaAdd hook support for Activity ContactCurrently, there is no hook support for Activity Contact.Currently, there is no hook support for Activity Contact.5.37.0yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/2385Investigate replacing civicase views with something that is not views2021-12-08T09:00:21ZDaveDInvestigate replacing civicase views with something that is not viewsRelated to https://lab.civicrm.org/dev/core/-/issues/2262.
CiviCase uses mysql views (as opposed to drupal views) and is the only component that does so. I'm not sure if they're still truly needed the way they originally were. In additi...Related to https://lab.civicrm.org/dev/core/-/issues/2262.
CiviCase uses mysql views (as opposed to drupal views) and is the only component that does so. I'm not sure if they're still truly needed the way they originally were. In addition to the issue above, they hardcode activity status id and the number 14 (nothing against the number 14, but hey) making it difficult to override those.
I haven't looked at the full query lately but at one time it had a self-join on the view which was where it was convenient to have the view since at the time you couldn't self-join to temporary tables, which might still be true.5.37.0https://lab.civicrm.org/dev/core/-/issues/2372Prevent double clicking submit button2021-03-21T21:41:08Zahed_compucorpPrevent double clicking submit buttonOverview
----------------------------------------
A typical problem with HTML forms that if you click fast enough, you can submit the form twice - or more, mostly if the server response was slow. CiviCRM is no exception.
Reproduction st...Overview
----------------------------------------
A typical problem with HTML forms that if you click fast enough, you can submit the form twice - or more, mostly if the server response was slow. CiviCRM is no exception.
Reproduction steps
----------------------------------------
- Any page that has a standard form - without Ajax. (e.g. Find Contributions or New Contribution or Some of the result actions).
- Click submit button fast enough.
![2021-02-08_16-26](/uploads/4b85a3b6e4b4fd659955b4e61ab267d7/2021-02-08_16-26.png)
Current behaviour
----------------------------------------
Find Contributions
![Peek_2021-02-08_16-06](/uploads/f552cc398264ba3ffc28de6eee7a1ea7/Peek_2021-02-08_16-06.gif)
New Contribution
![Peek_2021-02-08_16-10](/uploads/fe4c0118c1cba067fab6192c9c78000c/Peek_2021-02-08_16-10.gif)
Send Invoice - Search Action
Will send multiple emails.
![Peek_2021-02-08_16-40](/uploads/7020983f5986408972ea564f53f14e48/Peek_2021-02-08_16-40.gif)
Expected behaviour
----------------------------------------
Disable button during submission. Maybe something like Record Contribution (Ajax form Using the jQuery BlockUI Plugin)
![Peek_2021-02-08_16-14](/uploads/24c71d97550650e78b6629e249f9df76/Peek_2021-02-08_16-14.gif)
Any thoughts on this?
PR: https://github.com/civicrm/civicrm-core/pull/196105.36.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/2369Fatal error reported when photo cannot be found2021-05-31T15:47:08Zmagnolia61Fatal error reported when photo cannot be foundI use a profile for people to update their profile picture.
For some reason when their photo is not available anymore the error log logs a fatal error.
Also the reporterror extension sends an email on this but of course that's out of cor...I use a profile for people to update their profile picture.
For some reason when their photo is not available anymore the error log logs a fatal error.
Also the reporterror extension sends an email on this but of course that's out of core scope (reported it [there](https://lab.civicrm.org/extensions/reporterror/-/issues/3#note_53134) also)
I have been experiencing this since quite a few versions of CiviCRM back. Currently running 5.34 (Drupal 7.78)
Could it be that the code for this in core is a bit too harsh?
```
[error]
$Fatal Error Details = array:3 [
"message" => "Photo does not exist"
"code" => null
"exception" => CRM_Core_Exception {#3616
-errorData: array:1 [
"error_code" => 0
]
#cause: null
-_trace: null
#message: "Photo does not exist"
#code: 0
#file: "/var/www/vhosts/xyz/web/sites/all/modules/civicrm/CRM/Contact/Page/ImageFile.php"
#line: 58
trace: {
/var/www/vhosts/xyz/web/sites/all/modules/civicrm/CRM/Contact/Page/ImageFile.php:58 {
› else {
› throw new CRM_Core_Exception(ts('Photo does not exist'));
› }
}
/var/www/vhosts/xyz/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:312 { …}
/var/www/vhosts/xyz/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:68 { …}
/var/www/vhosts/xyz/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:36 { …}
/var/www/vhosts/xyz/web/sites/all/modules/civicrm/drupal/civicrm.module:458 { …}
/var/www/vhosts/xyz/web/includes/menu.inc:527 { …}
/var/www/vhosts/xyz/web/index.php:21 { …}
}
}
]
```5.39.0https://lab.civicrm.org/dev/core/-/issues/2366php 7.4 - get_magic_quotes_gpc() deprecated in IDS_Monitor2021-04-13T00:10:20ZDaveDphp 7.4 - get_magic_quotes_gpc() deprecated in IDS_Monitor`Deprecated function: Function get_magic_quotes_gpc() is deprecated in IDS_Monitor->_detect() (line 338 of ...\vendor\civicrm\civicrm-packages\IDS\Monitor.php).`
Also line 342.
Function will be removed in php 8.
Hmm. This package is v...`Deprecated function: Function get_magic_quotes_gpc() is deprecated in IDS_Monitor->_detect() (line 338 of ...\vendor\civicrm\civicrm-packages\IDS\Monitor.php).`
Also line 342.
Function will be removed in php 8.
Hmm. This package is very old.5.37.0https://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/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/2044Proposal apiv4 - revisit required parameters on location entities2020-10-02T01:41:10ZeileenProposal apiv4 - revisit required parameters on location entitiesI propose we adjust the location api required fields inn v4api
- Address - don't require contact_id, make location_type_id required in xml
- Email - don't require contact_id, make location_type_id required in xml
- Phone - don't require...I propose we adjust the location api required fields inn v4api
- Address - don't require contact_id, make location_type_id required in xml
- Email - don't require contact_id, make location_type_id required in xml
- Phone - don't require contact_id, make location_type_id required in xml
For all these entities we have a valid use case for no contact_id in the context of location blocks for addresses. I wanted to cleanup the code in ManageLocation around addresses https://github.com/civicrm/civicrm-core/pull/18488 & found I can't use Address::save to do in a better way due to the above
@colemanw how far did you go down this path?5.31.0https://lab.civicrm.org/dev/core/-/issues/1933Failed scheduled reminders should log message somewhere more useful2021-12-16T14:06:16ZAndy ClarkFailed scheduled reminders should log message somewhere more usefulOverview
----------------------------------------
A failed schedule reminder should log the error in a place that the end user can see why it failed.
Example use-case
----------------------------------------
A schedule reminder is set u...Overview
----------------------------------------
A failed schedule reminder should log the error in a place that the end user can see why it failed.
Example use-case
----------------------------------------
A schedule reminder is set up to send an SMS to a contact with a bad phone number. The reminder will fail, and a message will be added to table civicrm_action_log. The user who set up the reminder will not know whether it failed, or why, since they cannot view database tables.
Proposed behaviour
----------------------------------------
I propose a couple of alternatives:
1. The error message should be logged as an activity, either against the creator of the schedule reminder or the target. Then the user can check for this.
Or
2. The error message should be written to the system log, so at least someone with the 'Log Viewer' extension could see it.
Comments
----------------------------------------
My preference would be the first of the alternatives. There are a number of questions on SE about analysing failed Schedule Reminders - this would be a help with that.5.46.0https://lab.civicrm.org/dev/core/-/issues/1913Add in hook to allow for altering of Profile Schemas2020-08-13T00:10:00ZseamusleeAdd in hook to allow for altering of Profile SchemasOverview
----------------------------------------
in 5.24.0 a new hook was added in that allowed for extensions to modify which fields can be added to Profiles https://github.com/civicrm/civicrm-core/pull/16655 However that didn't extend...Overview
----------------------------------------
in 5.24.0 a new hook was added in that allowed for extensions to modify which fields can be added to Profiles https://github.com/civicrm/civicrm-core/pull/16655 However that didn't extend to what fields can be available within the profile editing modal / schemas.
I propose a new hook profileSchemas which would allow extensions to modify the profileSchemas used in the backbone.marionette modal5.30.0https://lab.civicrm.org/dev/core/-/issues/1825Merge/bundle flexmailer into core2020-10-23T13:46:59ZbgmMerge/bundle flexmailer into coreFollow-up to: https://github.com/civicrm/org.civicrm.flexmailer/issues/26 - publish a stable version.
Rationale:
* Flexmailer provides cleaner an alternative to a lot of core civimail code
* It adheres to Lexim, in that eventually it w...Follow-up to: https://github.com/civicrm/org.civicrm.flexmailer/issues/26 - publish a stable version.
Rationale:
* Flexmailer provides cleaner an alternative to a lot of core civimail code
* It adheres to Lexim, in that eventually it was meant to replace the core code (i.e. the core code should be flagged as deprecated and eventually removed).
What steps would be required to ship flexmailer in core?
I recall Tim mentioning two options:
* (1) Merge flexmailer in the same way that Api4 was merged, if both versions are highly inter-dependent.
* (2) Bundle flexmailer as a core-extension, similar to sequentialcreditnotes or eventually eventcart (i.e. clearly separate isolation between code bases, but core can assume that the extension is enabled).
I feel like we are more in the second situation, because flexmailer is stable and not tightly coupled with the version of CiviCRM core. However, it may be a bit more work, since we have to tweak the packaging/distribution of CiviCRM?
cc @totten @eileen5.28.0https://lab.civicrm.org/dev/core/-/issues/1697set is_deceased to not null in schema and upgrade script2020-04-09T23:07:11ZMichael McAndrewset is_deceased to not null in schema and upgrade scriptOver the past few years, compelling evidence has has emerged to suggest that Zombies do exist in CiviCRM databases. Here are a couple of the most high profile cases:
- https://civicrm.org/extensions/zombie-check
- https://civicrm.org/bl...Over the past few years, compelling evidence has has emerged to suggest that Zombies do exist in CiviCRM databases. Here are a couple of the most high profile cases:
- https://civicrm.org/extensions/zombie-check
- https://civicrm.org/blog/simonparkervitiligosocietyorguk/solution-all-recipients-not-showing-up-for-sending-mass-email
Whilst various attempts have been made to eliminate the scourge of zombies once and for ever, the most notable of which being https://lab.civicrm.org/dev/core/-/blob/master/CRM/Upgrade/Incremental/sql/4.7.beta2.mysql.tpl#L15-17 ...
```sql
-- CRM-17147 People with empty deceased-flag ('is null') get removed from recipient list of a mailing
UPDATE civicrm_contact SET is_deceased = 0 WHERE is_deceased IS NULL;
ALTER TABLE civicrm_contact ALTER COLUMN is_deceased SET DEFAULT 0;
```
... it has come to light that Zombies persist across CiviCRM instances.
Although the upgrade script defaults all existing fields to 0, and new sites have a default of 0, this does not prevent the columns from being asssigned a null value.
:coffin: :cross:
PR here that alters the definition for new tables and adds another upgrade step: https://github.com/civicrm/civicrm-core/pull/170255.26.0https://lab.civicrm.org/dev/core/-/issues/1665MySQL uses filesort index when building the query which can cause performance...2020-08-13T00:03:03Zjustinfreeman (Agileware)MySQL uses filesort index when building the query which can cause performance issuesMySQL uses filesort index when building the query which can cause performance issues. This can be solved by simply removing the GROUP BY and ORDER BY options from query in **function alphabetQuery**, **CRM/Contact/BAO/Query.php** see htt...MySQL uses filesort index when building the query which can cause performance issues. This can be solved by simply removing the GROUP BY and ORDER BY options from query in **function alphabetQuery**, **CRM/Contact/BAO/Query.php** see https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/BAO/Query.php#L5012
Original query:
~~~
$query = "SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name
{$sqlParts['from']}
{$sqlParts['where']}
{$sqlParts['having']}
GROUP BY sort_name
ORDER BY sort_name asc";
~~~
Change query to:
~~~
$query = "SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name
{$sqlParts['from']}
{$sqlParts['where']}
{$sqlParts['having']}";
~~~
This change has no visible impact on the search results pager or listing.
The query was generated by CiviCRM when doing an Advanced Search and selecting 6 CiviCRM Groups (not Smart Groups) - displaying results as contacts.
Before this change, note the "Using filesort" on 24754 rows. Query takes longer than 90 seconds to complete - can trigger a PHP timeout.
~~~
MariaDB [ajpulmse_crm]> explain SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name FROM civicrm_contact contact_a LEFT JOIN civicrm_group_contact `civicrm_group_contact-5e742600a44d
7` ON (contact_a.id = `civicrm_group_contact-5e742600a44d7`.contact_id AND `civicrm_group_contact-5e742600a44d7`.status IN ('Added')) LEFT JOIN civicrm_group_contact `civicrm_group_contact-
5e742600a47a7` ON (contact_a.id = `civicrm_group_contact-5e742600a47a7`.contact_id AND `civicrm_group_contact-5e742600a47a7`.status IN ('Added')) LEFT JOIN civicrm_group_contact `civicrm_gr
oup_contact-5e742600a4a78` ON (contact_a.id = `civicrm_group_contact-5e742600a4a78`.contact_id AND `civicrm_group_contact-5e742600a4a78`.status IN ('Added')) LEFT JOIN civicrm_group_contact
`civicrm_group_contact-5e742600a4d39` ON (contact_a.id = `civicrm_group_contact-5e742600a4d39`.contact_id AND `civicrm_group_contact-5e742600a4d39`.status IN ('Added')) LEFT JOIN civicrm_g
roup_contact `civicrm_group_contact-5e742600a4fde` ON (contact_a.id = `civicrm_group_contact-5e742600a4fde`.contact_id AND `civicrm_group_contact-5e742600a4fde`.status IN ('Added')) LEFT JO
IN civicrm_group_contact `civicrm_group_contact-5e742600a529d` ON (contact_a.id = `civicrm_group_contact-5e742600a529d`.contact_id AND `civicrm_group_contact-5e742600a529d`.status IN ('Adde
d')) WHERE ( ( ( ( `civicrm_group_contact-5e742600a44d7`.group_id IN ("498") ) ) ) OR ( ( ( `civicrm_group_contact-5e742600a47a7`.group_id IN ("499") ) ) ) OR ( ( ( `civicrm_group_contact-5
e742600a4a78`.group_id IN ("505") ) ) ) OR ( ( ( `civicrm_group_contact-5e742600a4d39`.group_id IN ("504") ) ) ) OR ( ( ( `civicrm_group_contact-5e742600a4fde`.group_id IN ("503") ) ) ) OR
( ( ( `civicrm_group_contact-5e742600a529d`.group_id IN ("502") ) ) ) ) AND (contact_a.is_deleted = 0) GROUP BY sort_name;
+------+-------------+-------------------------------------+------+----------------------------+----------------------------+---------+---------------------------+-------+------------------
-----------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra
|
+------+-------------+-------------------------------------+------+----------------------------+----------------------------+---------+---------------------------+-------+-----------------------------------------------------------+
| 1 | SIMPLE | contact_a | ref | index_is_deleted_sort_name | index_is_deleted_sort_name | 1 | const | 24754 | Using where; Using index; Using temporary; Using filesort |
| 1 | SIMPLE | civicrm_group_contact-5e742600a44d7 | ref | UI_contact_group | UI_contact_group | 4 | ajpulmse_crm.contact_a.id | 1 | Using where; Distinct |
| 1 | SIMPLE | civicrm_group_contact-5e742600a47a7 | ref | UI_contact_group | UI_contact_group | 4 | ajpulmse_crm.contact_a.id | 1 | Using where; Distinct |
| 1 | SIMPLE | civicrm_group_contact-5e742600a4a78 | ref | UI_contact_group | UI_contact_group | 4 | ajpulmse_crm.contact_a.id | 1 | Using where; Distinct |
| 1 | SIMPLE | civicrm_group_contact-5e742600a4d39 | ref | UI_contact_group | UI_contact_group | 4 | ajpulmse_crm.contact_a.id | 1 | Using where; Distinct |
| 1 | SIMPLE | civicrm_group_contact-5e742600a4fde | ref | UI_contact_group | UI_contact_group | 4 | ajpulmse_crm.contact_a.id | 1 | Using where; Distinct |
| 1 | SIMPLE | civicrm_group_contact-5e742600a529d | ref | UI_contact_group | UI_contact_group | 4 | ajpulmse_crm.contact_a.id | 1 | Using where; Distinct |
+------+-------------+-------------------------------------+------+----------------------------+----------------------------+---------+---------------------------+-------+-----------------------------------------------------------+
7 rows in set, 1 warning (0.00 sec)
~~~
After this change, note absence of the "Using filesort". Query completes in 5 seconds or less.
~~~
MariaDB [ajpulmse_crm]> explain
-> SELECT DISTINCT LEFT(contact_a.sort_name, 1) as sort_name FROM civicrm_contact contact_a LEFT JOIN civicrm_group_contact `civicrm_group_contact-5e742600a44d7` ON (contact_a.id = `civ
icrm_group_contact-5e742600a44d7`.contact_id AND `civicrm_group_contact-5e742600a44d7`.status IN ('Added')) LEFT JOIN civicrm_group_contact `civicrm_group_contact-5e742600a47a7` ON (contact
_a.id = `civicrm_group_contact-5e742600a47a7`.contact_id AND `civicrm_group_contact-5e742600a47a7`.status IN ('Added')) LEFT JOIN civicrm_group_contact `civicrm_group_contact-5e742600a4a78`
ON (contact_a.id = `civicrm_group_contact-5e742600a4a78`.contact_id AND `civicrm_group_contact-5e742600a4a78`.status IN ('Added')) LEFT JOIN civicrm_group_contact `civicrm_group_contact-5e
742600a4d39` ON (contact_a.id = `civicrm_group_contact-5e742600a4d39`.contact_id AND `civicrm_group_contact-5e742600a4d39`.status IN ('Added')) LEFT JOIN civicrm_group_contact `civicrm_grou
p_contact-5e742600a4fde` ON (contact_a.id = `civicrm_group_contact-5e742600a4fde`.contact_id AND `civicrm_group_contact-5e742600a4fde`.status IN ('Added')) LEFT JOIN civicrm_group_contact `
civicrm_group_contact-5e742600a529d` ON (contact_a.id = `civicrm_group_contact-5e742600a529d`.contact_id AND `civicrm_group_contact-5e742600a529d`.status IN ('Added')) WHERE ( ( ( ( `civicr
m_group_contact-5e742600a44d7`.group_id IN ("498") ) ) ) OR ( ( ( `civicrm_group_contact-5e742600a47a7`.group_id IN ("499") ) ) ) OR ( ( ( `civicrm_group_contact-5e742600a4a78`.group_id IN
("505") ) ) ) OR ( ( ( `civicrm_group_contact-5e742600a4d39`.group_id IN ("504") ) ) ) OR ( ( ( `civicrm_group_contact-5e742600a4fde`.group_id IN ("503") ) ) ) OR ( ( ( `civicrm_group_conta
ct-5e742600a529d`.group_id IN ("502") ) ) ) ) AND (contact_a.is_deleted = 0);
+------+-------------+-------------------------------------+------+----------------------------+----------------------------+---------+---------------------------+-------+------------------
------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra
|
+------+-------------+-------------------------------------+------+----------------------------+----------------------------+---------+---------------------------+-------+------------------
------------+
| 1 | SIMPLE | contact_a | ref | index_is_deleted_sort_name | index_is_deleted_sort_name | 1 | const | 24754 | Using index; Usin
g temporary |
| 1 | SIMPLE | civicrm_group_contact-5e742600a44d7 | ref | UI_contact_group | UI_contact_group | 4 | ajpulmse_crm.contact_a.id | 1 | Using where; Dist
inct |
| 1 | SIMPLE | civicrm_group_contact-5e742600a47a7 | ref | UI_contact_group | UI_contact_group | 4 | ajpulmse_crm.contact_a.id | 1 | Using where; Dist
inct |
| 1 | SIMPLE | civicrm_group_contact-5e742600a4a78 | ref | UI_contact_group | UI_contact_group | 4 | ajpulmse_crm.contact_a.id | 1 | Using where; Dist
inct |
| 1 | SIMPLE | civicrm_group_contact-5e742600a4d39 | ref | UI_contact_group | UI_contact_group | 4 | ajpulmse_crm.contact_a.id | 1 | Using where; Dist
inct |
| 1 | SIMPLE | civicrm_group_contact-5e742600a4fde | ref | UI_contact_group | UI_contact_group | 4 | ajpulmse_crm.contact_a.id | 1 | Using where; Dist
inct |
| 1 | SIMPLE | civicrm_group_contact-5e742600a529d | ref | UI_contact_group | UI_contact_group | 4 | ajpulmse_crm.contact_a.id | 1 | Using where; Dist
inct |
+------+-------------+-------------------------------------+------+----------------------------+----------------------------+---------+---------------------------+-------+------------------
------------+
7 rows in set (0.00 sec)
~~~
Agileware ref: CIVICRM-14575.30.0https://lab.civicrm.org/dev/core/-/issues/1638Introduce "civi.dao.preUpdate" and "civi.dao.preInsert" events2020-05-18T17:53:27ZhaystackIntroduce "civi.dao.preUpdate" and "civi.dao.preInsert" eventsOverview
----------------------------------------
Following on from the action taken some time ago in [Add civi.dao.preDelete event](https://issues.civicrm.org/jira/browse/CRM-20458) (and the proposal raised in #161 to an extent) it woul...Overview
----------------------------------------
Following on from the action taken some time ago in [Add civi.dao.preDelete event](https://issues.civicrm.org/jira/browse/CRM-20458) (and the proposal raised in #161 to an extent) it would be helpful to apply the same `hook_civicrm_pre` + `hook_civicrm_post` pattern to the Symfony events in `CRM_Core_DAO::save()`. I propose CiviCRM introduces `civi.dao.preUpdate` and `civi.dao.preInsert` events to complement the existing `civi.dao.preDelete` event.
Symfony events have advantages over "old-style" hooks of the form `hook_civicrm_preSave`. The old-style hook format is likely to lead some devs to write callbacks in the format `extensionname_civicrm_preSave_table_name` which are difficult to unhook or prevent from running endlessly. Symfony events _can_ be unhooked and therefore make it relatively easy to avoid endless loops such as @colemanw raises concerns about in [his comment](https://lab.civicrm.org/dev/core/issues/161#note_9549). Also, they are largely undocumented and therefore avoid the effort of having to add to the Docs :-)
Example use-case
----------------------------------------
Let's look at what can be done with operations on "Option Value" data:
In both the [CiviCRM Event Organiser](https://github.com/christianwach/civicrm-event-organiser) and the [CiviCRM ACF Integration](https://github.com/christianwach/civicrm-acf-integration) plugins, I'd like to be able to inspect an Option Value _before_ it is saved to the database so that I know what the full state of the Option Value was before the update is applied. Once the edit has happened, there's (obviously) no way of retrieving the required data.
(FWIW, this is to perform actions on synced entities in WordPress rather than modifying the Option Value before it is saved, but the same applies should Option Value data need to be modified.)
Current behaviour
----------------------------------------
As far as I can tell, there isn't a hook available for me to inspect an Option Value data prior to it being created or updated programatically. I _partially_ solve this for changes made via the CiviCRM UI using the equivalent pre-post combination of `hook_civicrm_preProcess` and `hook_civicrm_postProcess`. However changes made via AJAX actions on the main "Event Type Options" listing screen can only be detected _after_ the edit has been made.
Proposed behaviour
----------------------------------------
To mirror the pattern of `hook_civicrm_pre` + `hook_civicrm_post` and `hook_civicrm_preProcess` + `hook_civicrm_postProcess` and the existing pattern of `civi.dao.preDelete` + `civi.dao.postDelete` to complete the set with:
* `civi.dao.preInsert` + `civi.dao.postInsert`
* `civi.dao.preUpdate` + `civi.dao.postUpdate`
Comments
----------------------------------------
PR to follow.5.26.0haystackhaystackhttps://lab.civicrm.org/dev/core/-/issues/1613updating misleading labels on buttons to confirmation pages2023-06-20T23:09:15Zyosefromanoupdating misleading labels on buttons to confirmation pagesOn contribution forms, the button leading to the confirmation page (if enabled) says 'confirm payment' which in many cases makes the user think that clicking the button submits the contribution.
On event forms, the button leading to th...On contribution forms, the button leading to the confirmation page (if enabled) says 'confirm payment' which in many cases makes the user think that clicking the button submits the contribution.
On event forms, the button leading to the confirmation page (if enabled) says 'continue' which again in many cases is misconstrued to mean 'continue and complete'
I get constant feedback from at least 50 different sites that their constituents are leaving the form before submitting it because they assume it was submitted leading to loss of revenue.
From looking at all shopping websites the industry standard with buttons leading to confirmation pages seems to be to use the word 'review'
The proposed solution in both cases is that the button label should simply say 'Review'.5.25.0https://lab.civicrm.org/dev/core/-/issues/1580Allow to search on contribution id2023-03-10T06:17:56ZyashodhaAllow to search on contribution idAllow to search on contribution idAllow to search on contribution id5.28.1yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/1569Need to Increase Data Size for `form_values` column on civicrm_report_instanc...2020-03-19T21:27:11Ztunbola@compucorp.co.ukNeed to Increase Data Size for `form_values` column on civicrm_report_instance tableOverview
----------------------------------------
Currently form_values column of the civicrm_report_instance table is of data type TEXT. This is sufficient for saving most report instances. However we have a couple of custom reports bas...Overview
----------------------------------------
Currently form_values column of the civicrm_report_instance table is of data type TEXT. This is sufficient for saving most report instances. However we have a couple of custom reports based on the Core Civi report functionality with some dynamic filters that may vary based on some conditions in the system. As such some of the reports have a lot of custom form filters fields and when these reports are saved in the database, the serialized data in the `form_values` column of the civicrm_report_instance table gets truncated and this renders the saved report unusable.
Proposed behaviour
----------------------------------------
The Proposal is to change the data type of the form_values column of the civicrm_report_instance table to MEDIUMTEXT which can hold much more data (~16MB) as compared with TEXT (64KB). With this change, the data will not be truncated and any custom report form with much form fields will not having any issue getting saved at all.5.25.0https://lab.civicrm.org/dev/core/-/issues/1565Failing to copy file when creating new attachment with APIv32020-02-10T03:07:09ZalbionbrownFailing to copy file when creating new attachment with APIv3In this block of code in civicrm/api/v3/Attachment.php:
```
$path = $config->customFileUploadDir . DIRECTORY_SEPARATOR . $fileDao->uri;
if (is_string($content)) {
file_put_contents($path, $content);
}
elseif (is_string($moveF...In this block of code in civicrm/api/v3/Attachment.php:
```
$path = $config->customFileUploadDir . DIRECTORY_SEPARATOR . $fileDao->uri;
if (is_string($content)) {
file_put_contents($path, $content);
}
elseif (is_string($moveFile)) {
// CRM-17432 Do not use rename() since it will break file permissions.
// Also avoid move_uplaoded_file() because the API can use options.move-file.
copy($moveFile, $path);
unlink($moveFile);
}
```
Is there a reason why we can't check if the copy failed and throw an API_Exception if it did?
The reason being, is that I've had some issues with the new Catalina MacOS update and the NFS mounting option lately. I couldn't figure out why my file upload wasn't working. Ultimately it came down to directory permissions as a result of the Catalina update.
Is it possible we could change this to:
```
$path = $config->customFileUploadDir . DIRECTORY_SEPARATOR . $fileDao->uri;
if (is_string($content)) {
file_put_contents($path, $content);
}
elseif (is_string($moveFile)) {
// CRM-17432 Do not use rename() since it will break file permissions.
// Also avoid move_uploaded_file() because the API can use options.move-file.
if (!copy($moveFile, $path)) {
throw new API_Exception("Cannot copy uploaded file ".$moveFile." to ".$path);
}
unlink($moveFile);
}
```
So we know when the move has failed?5.24.0