Development issueshttps://lab.civicrm.org/groups/dev/-/issues2022-12-20T18:24:57Zhttps://lab.civicrm.org/dev/core/-/issues/2467[Meta] XLTS Angular JS longer-term-support2022-12-20T18:24:57Zhomotechsual[Meta] XLTS Angular JS longer-term-support@JoeMurray raised in chat that [AngularJS goes EoL in December](https://chat.civicrm.org/civicrm/pl/cm6jqmcex3n39ekf3zzx4tiree) there is a company [XLTS](https://xlts.dev/angularjs) providing extended LTS support through 2026. I've send ...@JoeMurray raised in chat that [AngularJS goes EoL in December](https://chat.civicrm.org/civicrm/pl/cm6jqmcex3n39ekf3zzx4tiree) there is a company [XLTS](https://xlts.dev/angularjs) providing extended LTS support through 2026. I've send them an enquiry asking how much they are likely to look to charge given the open-source nature of CiviCRM to see if, perhaps, they'd be willing to "donate" the XLTS to us.
We lose nothing by asking!JoeMurrayJoeMurrayhttps://lab.civicrm.org/dev/core/-/issues/4891[PHP 8.1] Weight notices @ trash contact folder2024-02-09T20:39:06Zjofranzfranz@systopia.de[PHP 8.1] Weight notices @ trash contact folderOverview
----------------------------------------
_Weight notices @ trash contact folder_
Reproduction steps
----------------------------------------
1. Delete a contact in a non-permanent way
2. Go to: https://dmaster.demo.civicrm.org/...Overview
----------------------------------------
_Weight notices @ trash contact folder_
Reproduction steps
----------------------------------------
1. Delete a contact in a non-permanent way
2. Go to: https://dmaster.demo.civicrm.org/civicrm/contact/search/advanced (user/pass: demo demo)
3. Select: "Search in Trash
(deleted contacts)" (Important!!!)
4. Hit "Search"
Current behaviour
----------------------------------------
Many weight notices:
```
Warning: Undefined array key "weight" in CRM_Core_Action::{closure}() (line 318 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Action.php).
Warning: Undefined array key "weight" in CRM_Core_Action::{closure}() (line 318 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Action.php).
Warning: Undefined array key "weight" in CRM_Core_Action::{closure}() (line 318 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Action.php).
Warning: Undefined array key "weight" in CRM_Core_Action::{closure}() (line 318 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Action.php).
```
Expected behaviour
----------------------------------------
No notices.
Environment information
----------------------------------------
* __Browser:__ _Firefox_
* __CiviCRM:__ _5.68.1 (guess also below and above)_
* __PHP:__ _8.1+_
* __CMS:__ _Drupal10_
* __Database:__ _WhateverDB_
* __Web Server:__ _An amazing one even!_
----------------------------------------
_systopia reference: 23444_eileeneileenhttps://lab.civicrm.org/dev/core/-/issues/4801[PHP 8.2] Access to an undefined property in CRM_Event_Badge_*2023-12-11T23:28:11Zjofranzfranz@systopia.de[PHP 8.2] Access to an undefined property in CRM_Event_Badge_*If I spot them correctly these are yet not covered by a unit test:
```
------ --------------------------------------------------------------------------------------
Line Logo.php ...If I spot them correctly these are yet not covered by a unit test:
```
------ --------------------------------------------------------------------------------------
Line Logo.php
------ --------------------------------------------------------------------------------------
17 Access to an undefined property CRM_Event_Badge_Logo::$format.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
31 Access to an undefined property CRM_Event_Badge_Logo::$lMarginLogo.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
32 Access to an undefined property CRM_Event_Badge_Logo::$tMarginName.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
40 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
41 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
43 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
51 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo::$border.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo::$lMarginLogo.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo::$lMarginLogo.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
54 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
54 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
56 Access to an undefined property CRM_Event_Badge_Logo::$border.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
56 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
56 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
58 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo::$border.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo::$tMarginName.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
60 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo::$border.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ --------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------
Line Logo5395.php
------ --------------------------------------------------------------------------------------
17 Access to an undefined property CRM_Event_Badge_Logo5395::$format.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
31 Access to an undefined property CRM_Event_Badge_Logo5395::$lMarginLogo.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
32 Access to an undefined property CRM_Event_Badge_Logo5395::$tMarginName.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
40 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
41 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
43 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
51 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo5395::$border.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo5395::$lMarginLogo.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo5395::$lMarginLogo.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
52 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
54 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
54 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
56 Access to an undefined property CRM_Event_Badge_Logo5395::$border.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
56 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
56 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
58 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo5395::$border.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
59 Access to an undefined property CRM_Event_Badge_Logo5395::$tMarginName.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
60 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo5395::$border.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
61 Access to an undefined property CRM_Event_Badge_Logo5395::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ --------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------
Line NameTent.php
------ --------------------------------------------------------------------------------------
33 Access to an undefined property CRM_Event_Badge_NameTent::$lMargin.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
34 Access to an undefined property CRM_Event_Badge_NameTent::$tMargin.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
37 Access to an undefined property CRM_Event_Badge_NameTent::$format.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
55 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
62 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
62 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
65 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
65 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
66 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
67 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
68 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
68 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
69 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
70 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
78 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
79 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
79 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
79 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
79 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
81 Access to an undefined property CRM_Event_Badge_NameTent::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ --------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------
Line Simple.php
------ --------------------------------------------------------------------------------------
31 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
32 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
33 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
34 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
34 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
34 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
35 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
36 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
36 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
36 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
37 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
38 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
38 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
39 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
39 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
39 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
40 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
41 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
41 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
42 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
42 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
42 Access to an undefined property CRM_Event_Badge_Simple::$pdf.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ --------------------------------------------------------------------------------------
```
Related: #4072https://lab.civicrm.org/dev/core/-/issues/4998[PHP 8] Undefined properties @ ext/Standaloneusers DAO2024-02-14T10:05:35Zjofranzfranz@systopia.de[PHP 8] Undefined properties @ ext/Standaloneusers DAOPhpStan is reporting some Undefined properties on current master @ eacd1f4206fab41f0cf14bcbd80b5f7187b42bea
```
β standaloneusers (master) phpstan analyse -c ~/repositories/ext/phpstan.d11.neon.dist -l 0 . ...PhpStan is reporting some Undefined properties on current master @ eacd1f4206fab41f0cf14bcbd80b5f7187b42bea
```
β standaloneusers (master) phpstan analyse -c ~/repositories/ext/phpstan.d11.neon.dist -l 0 . β β
50/50 [ββββββββββββββββββββββββββββ] 100%
------ --------------------------------------------------------------------------------------
Line CRM/Standaloneusers/DAO/Role.php
------ --------------------------------------------------------------------------------------
100 Access to an undefined property CRM_Standaloneusers_DAO_Role::$__table.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ --------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------
Line CRM/Standaloneusers/DAO/Session.php
------ --------------------------------------------------------------------------------------
74 Access to an undefined property CRM_Standaloneusers_DAO_Session::$__table.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ --------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------
Line CRM/Standaloneusers/DAO/User.php
------ --------------------------------------------------------------------------------------
171 Access to an undefined property CRM_Standaloneusers_DAO_User::$__table.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ --------------------------------------------------------------------------------------
------ --------------------------------------------------------------------------------------
Line CRM/Standaloneusers/DAO/UserRole.php
------ --------------------------------------------------------------------------------------
65 Access to an undefined property CRM_Standaloneusers_DAO_UserRole::$__table.
π‘ Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-property
------ --------------------------------------------------------------------------------------
------ ---------------------------------------------------------------------
Line Civi/Api4/Action/User/PasswordReset.php
------ ---------------------------------------------------------------------
36 Instantiated class API_Exception not found.
π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
45 Instantiated class API_Exception not found.
π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
------ ---------------------------------------------------------------------
------ ---------------------------------------------------------------------
Line Civi/Api4/Action/User/SendPasswordReset.php
------ ---------------------------------------------------------------------
40 Instantiated class API_Exception not found.
π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
------ ---------------------------------------------------------------------
------ -----------------------------------------------------------------------------------------
Line Civi/Api4/Action/User/WriteTrait.php (in context of class Civi\Api4\Action\User\Create)
------ -----------------------------------------------------------------------------------------
56 Instantiated class API_Exception not found.
π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
59 Instantiated class API_Exception not found.
π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
------ -----------------------------------------------------------------------------------------
------ ---------------------------------------------------------------------------------------
Line Civi/Api4/Action/User/WriteTrait.php (in context of class Civi\Api4\Action\User\Save)
------ ---------------------------------------------------------------------------------------
56 Instantiated class API_Exception not found.
π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
59 Instantiated class API_Exception not found.
π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
------ ---------------------------------------------------------------------------------------
------ -----------------------------------------------------------------------------------------
Line Civi/Api4/Action/User/WriteTrait.php (in context of class Civi\Api4\Action\User\Update)
------ -----------------------------------------------------------------------------------------
56 Instantiated class API_Exception not found.
π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
59 Instantiated class API_Exception not found.
π‘ Learn more at https://phpstan.org/user-guide/discovering-symbols
------ -----------------------------------------------------------------------------------------
------ ------------------------------------------------------------------------------------------------------------
Line Civi/Standalone/Security.php
------ ------------------------------------------------------------------------------------------------------------
24 Unsafe usage of new static().
π‘ See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
328 Regex pattern is invalid: Unknown modifier '+' in pattern: /
^
\$([a-z0-9-]{1,32}) # Match 1 algorithm identifier
(\$v=[0-9+])? # Match 2 optional version
(\$[a-z0-9-]{1,32}=[a-zA-Z0-9/+.-]*(?:,[a-z0-9-]{1,32}=[a-zA-Z0-9/+.-]*)*)? # 3: optional parameters
\$([a-zA-Z0-9/+.-]+) # Match 4 salt
\$([a-zA-Z0-9/+]+) # Match 5 B64 encoded hash
$/x
------ ------------------------------------------------------------------------------------------------------------
[ERROR] Found 15 errors
```
Touches #4072
Config used: https://github.com/jofranz/civicrm-code-scanshttps://lab.civicrm.org/dev/drupal/-/issues/16[webform_civicrm] - edits to 'cart' display when using installments functiona...2020-07-16T17:23:38ZKarinG[webform_civicrm] - edits to 'cart' display when using installments functionalityWorking on this with CompuCorp
**Before:**
![image](/uploads/7ed8454c61bf9b3b098e7281d7e1b5ca/image.png)
Imagine this was configured as pay in 2 installments (two payments of $96/each) - how about something like this:
**After:**
![im...Working on this with CompuCorp
**Before:**
![image](/uploads/7ed8454c61bf9b3b098e7281d7e1b5ca/image.png)
Imagine this was configured as pay in 2 installments (two payments of $96/each) - how about something like this:
**After:**
![image](/uploads/73dc36a7fb0d1e6b590f77bb666f2a0e/image.png)https://lab.civicrm.org/dev/drupal/-/issues/24[webform_civicrm] - monies display properly but don't get processed when usin...2020-07-16T17:23:38ZKarinG[webform_civicrm] - monies display properly but don't get processed when using webform_calculator module to calculate e.g. participant fees![image](/uploads/c6a3f46f1ca9a57819370b9c3f4012dd/image.png)
![image](/uploads/ed87bfaed0cda7b8e3061573c4168735/image.png)
![image](/uploads/7ca2158df886d944766a86459a23be2f/image.png)
![image](/uploads/f7eb9556cd07695f72bed3f28ab4c8...![image](/uploads/c6a3f46f1ca9a57819370b9c3f4012dd/image.png)
![image](/uploads/ed87bfaed0cda7b8e3061573c4168735/image.png)
![image](/uploads/7ca2158df886d944766a86459a23be2f/image.png)
![image](/uploads/f7eb9556cd07695f72bed3f28ab4c8dd/image.png)
![image](/uploads/595a14b6ec110408df2560e23fce1673/image.png)colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/4086`processor_id` and `trxn_id` is not properly being set on recurring contribut...2023-08-08T15:16:15Zbrienne`processor_id` and `trxn_id` is not properly being set on recurring contributions with PayPal ProOverview
----------------------------------------
When a user submits a new, recurring payment on a site that uses PayPal Pro, the `processor_id` and `trxn_id` are immediately set to a long alphanumeric string on submission and these val...Overview
----------------------------------------
When a user submits a new, recurring payment on a site that uses PayPal Pro, the `processor_id` and `trxn_id` are immediately set to a long alphanumeric string on submission and these values are not getting updated with the proper format (a shorter, alphanumeric string that starts with 'I-') that is sent back from PayPal.
This causes an immense issue if the user then wants to cancel their recurring contribution because even though it may seem canceled in CiviCRM, the payment is not canceled on PayPal's side, and so the user continues to be charged. This happens because the PayPalPro IPN is no longer being properly set in the CiviCRM database, so when the request to cancel the recurring payment profile goes to PayPal, it does not have the correct `processor_id` needed to cancel it.
Reproduction steps
----------------------------------------
0. If you don't already have one, set up a PayPal Pro Sandbox account that has DPRP enabled for testing recurring payments. Add the API credentials (found in **Activity > API Access > NVP/SOAP API integration**) of this sandbox account to CivCRM as a test payment processor.
* *Fair warning, this set up process with PayPal was not that easy, so if you don't have PayPal Pro, I wouldn't recommend trying this*
1. From your PayPal Pro Sandbox account settings, go to **Notifications**, then click **Update** on **Instant payment notifications**. If your site is not publicly accessible to the internet (i.e. a local dev site for testing), then set up a [webhook.site](https://webhook.site) listening endpoint.
1. Submit a new, recurring contribution (*while not logged in on CiviCRM and using a [PayPal generated credit card for testing](https://developer.paypal.com/tools/sandbox/card-testing/)*) using the PayPal Pro payment processor.
1. On the web UI of webhook.site, take a look at the `recurring_payment_id` for the POST request that has `'recurring_payment_profile_created'` as the `'txn_type'`.
1. In CiviCRM, either with the API explorer or however you look at the data in the databases, look at the `processor_id` and `trxn_id` in the `civicrm_contribution_recur` table.
1. You will find that these strings don't match.
Current behaviour
----------------------------------------
The `processor_id` and `trxn_id` are being set to long alphanumeric strings, such as 'e13d51f14f7fff9fb6923820022ebc77' upon submission of a recurring payment on a CiviCRM installation that is using PayPal Pro. These values are stored in the `civicrm_contribution_recur` table and become problematic for updating or canceling recurring payments.
Expected behaviour
----------------------------------------
The `processor_id` and `trxn_id` should be set to (and stored as) the PayPal Pro IPN that is generated when the `'txn_type'` is `'recurring_payment_profile_created'`. The PayPal Pro IPN is an alphanumeric string that notably starts with 'I-', such as 'I-818V5WCCXF2H'
Additional Info
----------------------------------------
Some backstory - a few years ago, `processor_id` was initially set to `NULL` and was later updated with the IPN. In that scenario, the logic that CiviCRM used (in `/CRM/Core/PaymentPayPalProIPN.php`) made sense, as it checked if that value was set and returned early if it was. However, [PR #21539](https://github.com/civicrm/civicrm-core/pull/21539) added `processor_id` to parameters that get passed to the `recur()` function in PayPalProIPN.php, so the code that sets the value of `processor_id` (and `trxn_id`) to the properly formatted IPN was not being reached.
@JonGold and I currently have a PR with a fix for this in the works, but are doing further testing with a client.
Given that this issue has been going on for a while (9 months, at least), there are many recurring contributions that have a malformed `processor_id`. The PR that will be submitted also includes a check for when `'txn_type'` is `'recurring_payment'` (i.e. subsequent recurring payments) to update the `processor_id` and `trxn_id` to the proper format, if needed.https://lab.civicrm.org/dev/translation/-/issues/84`testLocalizedData()` failing after recent strings update2024-03-13T12:59:26Ztotten`testLocalizedData()` failing after recent strings updateIn CI, the test `testLocalizedData()` has started failing consistently. I've done some hunting and may have an explanation (*but don't know the next step*).
__The Test__: `testLocalizedData()` generates the SQL data-set in two locales. ...In CI, the test `testLocalizedData()` has started failing consistently. I've done some hunting and may have an explanation (*but don't know the next step*).
__The Test__: `testLocalizedData()` generates the SQL data-set in two locales. It spot-checks the data for a common string that should usually be translated. Specifically, `New Organization` is a link in the default menu. It's translated as `Neue Organisation` (`de_DE`) or `Nouvelle organisation` (`fr_FR`).
__Compare__: The test passes on my laptop but not in CI. My laptop has older translation data than the server.
You can manually inspect by running a small script and grepping the output (`cv scr printsql.php | grep Neue`):
```php
function _getSqlLive($locale) {
$schema = new \CRM_Core_CodeGen_Schema(\Civi\Test::codeGen());
$files = $schema->generateLocaleDataSql($locale);
foreach ($files as $file => $content) {
if (preg_match(';^civicrm_data\.;', $file)) {
return $content;
}
}
throw new \Exception("Failed to generate $locale");
}
echo _getSqlLive('de_DE');
```
Both outputs include some translated strings, but the newer doesn't have as many:
```diff
---Local machine, old data
+++Server machine, new data
("Individual,Contact",NULL,"4","0","1","new_individual","Neue Person"),
-("Organization,Contact",NULL,"5","0","1","new_organization","Neue Organisation"),
-("Household,Contact",NULL,"6","0","1","new_household","Neuer Haushalt"),
+("Organization,Contact",NULL,"5","0","1","new_organization","New Organization"),
+("Household,Contact",NULL,"6","0","1","new_household","New Household"),
```
If I inspect the data (`msgunfmt civicrm.mo -o civicrm.po`), I find these in the old data-set:
```
msgid "New Individual"
msgstr "Neue Person"
msgid "New Organization"
msgstr "Neue Organisation"
msgctxt "menu"
msgid "New Individual"
msgstr "Neue Person"
msgctxt "menu"
msgid "New Organization"
msgstr "Neue Organisation"
```
And these in the new data-set:
```
msgid "New Individual"
msgstr "Neue Person"
msgctxt "menu"
msgid "New Individual"
msgstr "Neue Person"
msgctxt "menu"
msgid "New Organization"
msgstr "Neue Organisation"
```
So it's missing `New Organization` in the default context. Additionally, the phrases `Phone Call` and `Meeting` appear in the old data-set but not the new data-set. I see similar omissions in `fr_FR`.
I assume that the SQL translation is evaluating everything in the default context. (It doesn't seem to use the `menu` translations). I don't know if that's good or bad. But regardless, it's probably bad that `Phone Call` and `Meeting` are missing.
In the CI logs for `testTranslatedData()`, the failure starts on roughly Feb 4. (Some places seem to start Feb 5 -- l10n data is cached for a bit.) I'm guessing this is related the new strings released around Feb 4 (https://chat.civicrm.org/civicrm/pl/jyqia56a47dp5dnrouiabnmnuw).
(ping @bgm)https://lab.civicrm.org/dev/core/-/issues/4471`updateRelatedMemberships` does not fire "pre" and "post" hooks2023-08-07T12:12:48Zmasetto`updateRelatedMemberships` does not fire "pre" and "post" hooksThe method `updateRelatedMemberships` in file `CRM/Member/BAO/Membership.php` does not call "pre" and "post" hooks. Is it a bug or is it intentional
This is the function:
```php
public static function updateRelatedMemberships($ownerMe...The method `updateRelatedMemberships` in file `CRM/Member/BAO/Membership.php` does not call "pre" and "post" hooks. Is it a bug or is it intentional
This is the function:
```php
public static function updateRelatedMemberships($ownerMembershipId, $params) {
$membership = new CRM_Member_DAO_Membership();
$membership->owner_membership_id = $ownerMembershipId;
$membership->find();
while ($membership->fetch()) {
$relatedMembership = new CRM_Member_DAO_Membership();
$relatedMembership->id = $membership->id;
$relatedMembership->copyValues($params);
$relatedMembership->save();
}
}
```
The effect is, because I'm using the `hook_civicrm_post` hook, I don't have the update hook of related memberships.
I propose to change it as:
```php
public static function updateRelatedMemberships($ownerMembershipId, $params) {
$membership = new CRM_Member_DAO_Membership();
$membership->owner_membership_id = $ownerMembershipId;
$membership->find();
while ($membership->fetch()) {
CRM_Utils_Hook::pre('edit', 'Membership', $membership->id, $params);
$relatedMembership = new CRM_Member_DAO_Membership();
$relatedMembership->id = $membership->id;
$relatedMembership->copyValues($params);
$relatedMembership->save();
CRM_Utils_Hook::post('edit', 'Membership', $membership->id, $relatedMembership);
}
}
```https://lab.civicrm.org/dev/core/-/issues/5049Ability to add custom css class and/or ID to any formbuilder element2024-03-12T19:08:51ZnoahAbility to add custom css class and/or ID to any formbuilder elementOverview
----------------------------------------
In FormBuilder, the user should be able to add an arbitrary css class or id to any container, fieldset, field, button etc.
Based on discussion among @colemanw @JonGold @shaneonabike @tot...Overview
----------------------------------------
In FormBuilder, the user should be able to add an arbitrary css class or id to any container, fieldset, field, button etc.
Based on discussion among @colemanw @JonGold @shaneonabike @totten at the Montreal sprint.colemanwcolemanwhttps://lab.civicrm.org/dev/user-interface/-/issues/10Ability to edit Contribution page "Confirm Contribution" button2023-11-23T07:35:02ZHeatherOliverAbility to edit Contribution page "Confirm Contribution" buttonIt would be useful to be able to control what the submission button says on a Contribution page in the same way that you can control the "Register now" button in events.
"Confirm Contribution" isn't very meaningful. For example:
Member...It would be useful to be able to control what the submission button says on a Contribution page in the same way that you can control the "Register now" button in events.
"Confirm Contribution" isn't very meaningful. For example:
Membership registration, Standard donation page and Campaign donation page you may wish to customise this button.https://lab.civicrm.org/dev/user-interface/-/issues/7Ability to exclude activities that appear on the actions button on a contact ...2019-10-07T13:29:15ZHeatherOliverAbility to exclude activities that appear on the actions button on a contact recordAll activity types that are added to CiviCRM are included in the Actions button when you view a contact record. For sites with a lot of activities (particularly those which are used in connection with Drupal webforms andnot normally trig...All activity types that are added to CiviCRM are included in the Actions button when you view a contact record. For sites with a lot of activities (particularly those which are used in connection with Drupal webforms andnot normally triggered in CiviCRM directly) this becomes a bit frustrating to manage.
Adding / filtering activities in other places uses the look up function, meaning the the length of the list in those places isn't really an issue.
See two attached images as an example. This isn't even all the activities for this site.
![image-1](/uploads/9b605ca4b8c666484a20ffb6be744651/image-1.PNG)![image-2](/uploads/56b30fe891eeaa9bbab310c74328cfb5/image-2.PNG)https://lab.civicrm.org/dev/core/-/issues/5086Ability to export FormBuilder forms from the UI2024-03-18T15:35:22ZherbdoolAbility to export FormBuilder forms from the UIWe've got an export link for SearchKit, but if a saved search is wrapped up in a FormBuilder form there's no easy way to also export those files. I can imagine a modal with the text from the forms files (`*.html`, `*.json`) and a link to...We've got an export link for SearchKit, but if a saved search is wrapped up in a FormBuilder form there's no easy way to also export those files. I can imagine a modal with the text from the forms files (`*.html`, `*.json`) and a link to copy it. Or even ability to save the files as a zip file.
And I suppose we'd need an import link as well to import on a different site (similar to SearchKit's link).https://lab.civicrm.org/dev/core/-/issues/5043Ability to set font type, font size and line spacing as default2024-02-29T16:43:58Zaydunsaidan.saunders@squiffle.ukAbility to set font type, font size and line spacing as default(From a user at a visibility charity.)
When you create a new activity, the text box for the activity defaults to sand-serif and 13 point.
It would be beneficial to have the ability to set a default font type and size, along with defaul...(From a user at a visibility charity.)
When you create a new activity, the text box for the activity defaults to sand-serif and 13 point.
It would be beneficial to have the ability to set a default font type and size, along with default line spacing, for all text boxes.
For example, we mandate Arial, 14 pt and 1.5 line spacing for electronic communications. Thatβs what we would like to have a standard on our version of CiviCRM. Having the ability to set these as default on CiviCRM saves workers from having to manually change font type and size when using the activity details box.
I donβt think there is any way to set line spacing in Civi. This would be a much-needed addition, if possible.https://lab.civicrm.org/dev/core/-/issues/4198Access to undeclared variable in merge code2023-03-23T14:06:20ZRichAccess to undeclared variable in merge codeAt:
https://lab.civicrm.org/dev/core/-/blob/96d550c70dd1f406851895ddfe236fbfd718ab77/CRM/Dedupe/Merger.php#L1376
we reference `$migrationData` which is not declared. I have a hunch it should be `$migrationInfo`?
Ping @eileenAt:
https://lab.civicrm.org/dev/core/-/blob/96d550c70dd1f406851895ddfe236fbfd718ab77/CRM/Dedupe/Merger.php#L1376
we reference `$migrationData` which is not declared. I have a hunch it should be `$migrationInfo`?
Ping @eileenhttps://lab.civicrm.org/dev/user-interface/-/issues/60Accordions: Eight patterns in Civi markup β reduce & make more accessible?2024-03-06T20:20:40ZnicolAccordions: Eight patterns in Civi markup β reduce & make more accessible?At present [Civi docs recommends](https://docs.civicrm.org/dev/en/latest/framework/ui/#accordions) making an accordion interface element with `.crm-accordion-wrapper`. There's at least another seven ways accordions are implemented in Civ...At present [Civi docs recommends](https://docs.civicrm.org/dev/en/latest/framework/ui/#accordions) making an accordion interface element with `.crm-accordion-wrapper`. There's at least another seven ways accordions are implemented in Civi, as seen in #56. Some of these look/behave differently, and maybe have to be different, but perhaps some could be merged.
Furthermore, none of these use the basic [aria-labels](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded) recommended in the [Bootstrap3 method](https://getbootstrap.com/docs/3.4/javascript/#collapse) (which remains in Bootstrap5), for letting screen-readers know if an accordion is open or closed, and which contents should be read or not. This is a long-standing issue - https://lab.civicrm.org/dev/core/-/issues/3294 - raised by the late accesibility expert Rachel Olivero (the Olivero theme is named after her). Sidenote: Bootstrap's accordion pattern (`.collapse`) doesn't seem to be used anywhere in Civi.
This meta issue is designed to clarify two points, to further the goals of #57 (and support #58 & #59), and follows @eileen's [question here](https://lab.civicrm.org/dev/user-interface/-/issues/59#note_151554):
- [ ] can we reduce the number of accordion markup patterns that a theme must support from 7 to anything less?
- [ ] can we amend the recommend accordion markup (and in turn civi's accordion implementations) to be more accessible (+ modern/responsive)?
#### The patterns:
1. `.crm-accordion-wrapper` - as recommended in the docs UI reference guide
2. (related) `.crm-dashlet-header` - as seen on the home dashboard. Looks the same but only the expand icon (e.g. arrow) is clickable as the rest of the header needs to be a drag-gable region.
3. `.crm-collapsible` - notably used on the field groups on the contact record main tab - it has no background for the header or body
4. (related) `.crm-collapsible` on a fieldset - as seen on event signup pages
5. `.collapsed` in a table - as seen on the extensions listing page
6. using the `.crm-ui-accordion` angular directive. This is a shorthand to generate the `.crm-accordion-wrapper` type accordion top.
7. `.af-collapsible` on a FormBuilder element - as seen in forms generated by Form Builder - a new JS/CSS/markup pattern [added in 2022](https://github.com/civicrm/civicrm-core/blob/master/ext/afform/admin/ang/afGuiEditor/afGuiMenuItemCollapsible.component.js)
8. there's another Jquery/Angular fieldset accordion used in Searchkit builder that's not in ThemeTest yet.
#### Range of characteristics
These eight variations cover 5 different visual/interaction patterns:
- click on full header to expand/close
- click only on expand/close icon to expand/close
- shaded background for header and body
- transparent background for header and body
- expand a region outside of the parent accordion wrapper (5 - maybe soon to be replaced with SK/FB)
#### Merging patterns
Initial thought is that with a bit of extra css and a tiny bit of rewriting, all of these could be done with two patterns - one based on the current recommended `wrapper > header + body`, with the full header clickable and the icon added entirely in css; and one based on an icon wrapped in an <a> tag that toggles the visibility of another region, as seen in patterns 2 and 5 above (while 5 may soon be replaced and 2 is one-off)..
- A utility class like `crm-accordion-clear` could be applied next to `.crm-accordion-wrapper` to provide 1) above with the same UI as 3)
- Likewise two new CSS selectors could allow the same pattern to be applied to 4) & 8) . Both these changes are demonstrated in a new ThemeTest branch: [Proposals](https://lab.civicrm.org/extensions/themetest/-/commits/proposals)
- I'm not sure why in 7) + 8) the new SK/FB Angular accordions diverged in markup/js/css from Civi's recommend accordion - maybe needs @colemanw to feed in.
- The extensions page 5) will be rewritten with FB/SK at some point so can maybe ignore.
- That leaves 2) - an accordion where only the icon triggers an expand/close so the rest the header is a dragable region. I think that making this use the same markup/css pattern as the others would require rewriting all the others, so it might be safest to leave this an exception for now. There is an attempt to merge the patterns in [Proposals](https://lab.civicrm.org/extensions/themetest/-/commits/proposals) but the header is doing a lot - dragging and right-floated icons. A toggle behavior is more compelling than an accordion, even if it should look like an accordion.
- But even with keeping 2), then potentially only 2 patterns left out of 8.
#### Thoughts on accessibility
[Work has been done](https://github.com/civicrm/civicrm-core/pull/11955) to implement [JQuery Accessible Accordion Aria](https://libraries.io/bower/jquery-accessible-accordion-aria) into Civi (demo of the plugin - https://a11y.nicolas-hoffmann.net/accordion/). Not sure if that is still a promising path, or there's a JQuery free methods now.
The current recommended pattern could be made more accessible with something like the following, based on Bootstrap3's collapse. There's fewer ARIA labels than the JQuery plugin, but it makes clear if the accordion is open or not, and links the header to the expand region with an id, two recommendations of [this walkthru](https://www.hassellinclusion.com/blog/accessible-accordion-pattern/) on accessible accordions.
```
<div class="crm-accordion-wrapper collapsed">
<div class="crm-accordion-header" aria-expanded="false" aria-controls="uniqueID">
Accordion Title here
</div>
<div class="crm-accordion-body" id="uniqueID">
<div class="crm-block crm-form-block crm-form-title-here-form-block">
Accordion Body here
</div>
</div>
</div>
```
This would require two changes - a unique ID added to every unique accordion on a page, and an `aria-expanded="false"` attribute that toggles true/false.
#### Questions
- why did the new angular accordions take another approach? Speed of development or something practical?
- is it worth trying to reduce these down to two recommended patterns, by swapping out the new angular patterns and adding a few new css classes into core? Or better to wait and flag this for the future?
- what's the easiest way to make civi accordions more screen reader friendly?Improve Civi's front-endhttps://lab.civicrm.org/dev/core/-/issues/2122Account for time zone on event registration pages2023-11-05T14:13:53ZwmortadaAccount for time zone on event registration pagesOverview
----------------------------------------
There doesn't appear to be a way to account for the time zone on an event registration page.
This is less of an issue for a local event, but is quite a problem for a global online event....Overview
----------------------------------------
There doesn't appear to be a way to account for the time zone on an event registration page.
This is less of an issue for a local event, but is quite a problem for a global online event.
At a minimum I would expect there to be an option to set the time zone for the event and for the time zone to display on the event registration page. (Ideally you'd want the page to show the time in the user's time zone.)
Current behaviour
----------------------------------------
There is no option to set the time zone for an event. (I presume that the system time zone is used but I'm not sure.)
![image](/uploads/6727ccb71e4b3129120a3275240c56cf/image.png)
The time zone isn't displayed on the event registration page.
![image](/uploads/a16d1c595ab9020e2d9e9c2d668e114c/image.png)
Proposed behaviour
----------------------------------------
There is an option to set the time zone when creating an event. This should default to the user's time zone.
The time zone is displayed on the event registration page.
Comments
----------------------------------------
I became aware of this when trying to register for this event: https://civicrm.org/civicrm/event/info?reset=1&id=1553
Probably relates to https://lab.civicrm.org/dev/core/-/issues/441
Agileware Ref: CIVICRM-404 (feature not found)https://lab.civicrm.org/dev/financial/-/issues/186Accounting entries incorrect in a number of cases... especially with pending ...2023-05-01T17:18:33ZJamie Novick - CompucoAccounting entries incorrect in a number of cases... especially with pending refunds and overpaymentsFirstly - sorry for the wall of text. This has ended up being a much longer piece of analysis than expected but I thought I should share it so that we can agree a way ahead.
This all started as we were looking at the best way to impleme...Firstly - sorry for the wall of text. This has ended up being a much longer piece of analysis than expected but I thought I should share it so that we can agree a way ahead.
This all started as we were looking at the best way to implement refunds for a payment processor. Some work was done here to discuss this: https://lab.civicrm.org/dev/financial/-/issues/87 but I can see this stalled somewhat - probably due to some of the issues I'm going to discuss here.
# Background: The problems with the contribution status field
Just for complete disclosure I hate the CiviCRM contribution status field. Hopefully everyone already knows that. I've probably started discussions on getting rid of it at every CiviCON and documented this on every financial gitlab ticket. It is the biggest blocker we have to reaching an accounting implementation that aligns to standard concepts of accounting.
Why is that?
We appear to have 2 use cases for it, both of which are undocumented.
1. For users to quickly change whether the amounts owed are
a) expected to be paid or
b) are paid.
2. To reflect the payment status of the contribution
i.e. whether the total sum of the line items is >, < or = to the net amount paid in or refunded on that contribution (this is important and Iβll come back to it)
This is a bit of a problem as itβs all a bit chicken and egg! If the user changes the status we need to understand whether we should be creating payments or not (or creating refund payments or not), and if the user records payments or refund payments we need to update the status to something meaningful and consistent.
The following is an analysis of the allowed contribution status changes from and to that a user can perform:
**Table 1:**
- Black = Option hidden
- X - Val = Option shown but user cannot change to it as we have a validation message
- Y (black) = Option shown, user can select this and I donβt see issues with accounting that occurs
- N/A = Couldnβt test
- Y (red) = Option shown, user can select this and there are issues with accounting that occurs
![Screenshot_2021-09-15_at_15.33.12](/uploads/8db825597f091f0bf34d590b38b2ed2f/Screenshot_2021-09-15_at_15.33.12.png)
Iβd note that itβs a bit confusing to users to see a value in the dropdown they canβt use. I think we should just hide values they cannot select as this would be much clearer for them.
We end up with some very strange and in some cases incorrect behaviour when allowing users to change the status in a "partially paid" and "pending refund" scenarios:
**Table 2:**
![Screenshot_2021-09-15_at_15.47.11](/uploads/827aafd531d7dbe54866b8237758ce42/Screenshot_2021-09-15_at_15.47.11.png)
# Ground Rules
As such I would like to suggest some ground rules to work towards:
1. The only time a user can change the status of a contribution should be when it has no payments or refunds attached to it.
2. Once a payment has been received we manage everything through either the line item editor or the βchange selectionsβ on the event form or "record paymentβ or βrecord refundβ. If any changes to each are made to any of these we recalculate the contribution status based on one set of rules:
The rules to calculate the contribution status should be:
**Table 3:**
![Screenshot_2021-09-15_at_15.38.43](/uploads/b77e518446862474f4e6823e045e11a3/Screenshot_2021-09-15_at_15.38.43.png)
Delving deeper, there are a number of situations within CiviCRM that do not confirm to this currently and instead we end up with a status this is confusing for the user:
(Note this is not be a comprehensive list - just to give some examples).
**Table 4:**
![Screenshot_2021-09-15_at_15.39.45](/uploads/3a9e238f9ec1071de6b056c543c68522/Screenshot_2021-09-15_at_15.39.45.png)
# Specific Scenarios
This all said there are some specific use cases that we need to consider and have appropriate workflows for:
Table 5:![Screenshot_2021-09-15_at_15.40.49](/uploads/a922e2c0f5a52b92adba895c5fd89654/Screenshot_2021-09-15_at_15.40.49.png)
# Actions:
As such I think the actions could be:
1. Agree to the "ground rules" for the contribution status field above so we are all working towards a common goal.
1. I think we should hide values they cannot select as this would be much clearer for them. i.e. all items that are marked as βX-valβ in the table above. Perhaps we can refactor the code that show/hides the options to a central place.
1. I think we should change the way the status field is calculated to use the business logic suggested in Table 3 above in all cases. This shouldnβt be something that extensions should take care of but should be calculated any time a contribution haas itβs line items / financial transactions changed. Obviously I donβt know what this means from a code perspective and I assume this would be a significant refactor but I think we could clear up a lot of business logic by doing so.
1. Discuss and agree which of the options from table 5.1 are suitable and then agree the UX for this.
1. So that we can then remove the option to make the status changes as per table 1: 3f, 4e, 4f without degrading users ability to do the things they need.
I actually think if we do these things we can consider CiviCRMβs accounting to be βcorrectβ if not completely intuitive (at least for now).
@mattwire @eileen @KarinG @JoeMurrayhttps://lab.civicrm.org/dev/core/-/issues/4950Acivity tab timing out after 5.70 upgrade on large DB2024-02-08T19:14:09ZElliott EgglestonAcivity tab timing out after 5.70 upgrade on large DBThe admin_ui version of the activity tab is generating queries for some CIDs that don't return in a reasonable amount of time. EXPLAIN shows that filesort is being used for the first subquery.
One example query, generated for a contact ...The admin_ui version of the activity tab is generating queries for some CIDs that don't return in a reasonable amount of time. EXPLAIN shows that filesort is being used for the first subquery.
One example query, generated for a contact with only 18 activities: https://phabricator.wikimedia.org/P55961
Wikimedia's tracking task, with the SQL query explain: https://phabricator.wikimedia.org/T356269
Oddly, I WAS able to load the activities tab for my own user which has 700+ activities, so it's not just related to the number of activities on a contact.
If I just roll back 04078d359e298a5a02ea274404dcdb8af83225dd it restores the previous activity tab and I can load the CID's activity tab fine with no runaway query generated.5.70.0colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/4482Action schedule effective start and end dates ignored when using an absolute ...2023-08-09T13:56:33ZjamieAction schedule effective start and end dates ignored when using an absolute trigger dateHere's an action schedule that did not go as expected:
![image](/uploads/8205f1e5dbba0c9f0b056b72d4f6c261/image.png)
Notice how there is an absolute date as the "When (trigger) date" *that does not allow you to enter a time* and also a...Here's an action schedule that did not go as expected:
![image](/uploads/8205f1e5dbba0c9f0b056b72d4f6c261/image.png)
Notice how there is an absolute date as the "When (trigger) date" *that does not allow you to enter a time* and also an "Effective Start Date" that *does allow you to enter a time.*
In the [code](https://github.com/civicrm/civicrm-core/blob/4e4de633c452fd2e9a36df61bdbdb258b9f88ed7/Civi/ActionSchedule/RecipientBuilder.php#L418) we seem to ignore the effective start and end dates when an absolute date is specified.
So, this email was sent at 12:05 am on August 5th instead of 8:05 am on August 5th.
I get it. If you are specifying an absolute start date, why would you need an effective start date?
Well, in this case it's because you are fine-tuning with a time.
I see three options:
1. Change the UI so that the effective start and end dates are greyed out if you enter an absolute date. This seems like the easiest to implement.
2. Change the code so that we don't ignore the effective start and end date when using an absolute date. I'm not crazy about messing with the Action Schedule code. But, this seems like it could be pulled off without a lot of work or risk.
3. Allow setting an absolute date with a time attached to it (and also doing number two). I would rather have a root canal than be responsible for this one. But, it does seem like the best option