Development issueshttps://lab.civicrm.org/groups/dev/-/issues2024-03-07T13:30:53Zhttps://lab.civicrm.org/dev/core/-/issues/5039Call to SmartyCompilerException fails in <drupal root>/vendor/civicrm/civicrm...2024-03-07T13:30:53ZspalmstromCall to SmartyCompilerException fails in <drupal root>/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on template compiler error.Overview
----------------------------------------
When `<drupal root>/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php` fails to compile a template, it attempts to cre...Overview
----------------------------------------
When `<drupal root>/vendor/civicrm/civicrm-packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php` fails to compile a template, it attempts to create a `SmartyCompilerException` by calling this code:
```
$e = new SmartyCompilerException($error_text);
$e->line = $line;
$e->source = trim(preg_replace('![\t\r\n]+!', ' ', $match[ $line - 1 ]));
$e->desc = $args;
$e->template = $this->template->source->filepath;
throw $e;
```
It crashes on the first line giving this message instead.
```
PHP Fatal error: Type of SmartyCompilerException::$line must be int (as in class Exception) in D:\CiviCRM_Custom.git\drupal_test\vendor\civicrm\civicrm-packages\smarty3\vendor\smarty\smarty\libs\sysplugins\smartycompilerexception.php on line 8
```
Reproduction steps
----------------------------------------
1. Attempt to register for an event on line.
1. Enter details.
1. Click Review.
1. Click Register.
Current behaviour
----------------------------------------
With the current (5.70.1) `Events - Registration Confirmation and Receipt (on-line)` template, you get the above error.
|----------------------------------------------------------
Expected behaviour
----------------------------------------
You get a successful registration.
Environment information
----------------------------------------
* __Browser:__ _MS Edge_ but probably irrelevant
* __CiviCRM:__ _5.70.1_
* __PHP:__ _8.3.1__
* __CMS:__ _Drupal 10.2.3_
* __Database:__ _MySQL 8.0._
* __Web Server:__ _IIS_
Comments
----------------------------------------
The fatal error occurs in the first line of the code snippet (line 1153) before the line number is entered. I have been unable to determine which Exception is being extended. This will, of course, only be an issue if there is a problem compiling a template.https://lab.civicrm.org/dev/user-interface/-/issues/67Tracker for making CiviCRM's accordions accessible2024-03-06T20:54:20ZnicolTracker for making CiviCRM's accordions accessibleIn #60 at least eight accordion markup patterns were identified, demonstrated in ThemeTest. This issue is to track progress on updating all Civi accordion markup to being accessible.
The table below tracks the progress of all of these p...In #60 at least eight accordion markup patterns were identified, demonstrated in ThemeTest. This issue is to track progress on updating all Civi accordion markup to being accessible.
The table below tracks the progress of all of these patterns: bundling pattern 1 and 8 which use the same JS, then there's just three patterns left to make accessible (four, if another instance of an accordion fieldset can be found).
Statuses are either:
- Recommended - a new/agreed pattern, themes should support
- Supported - old pattern but it's still being used, so themes need to support
- Deprecated - old pattern, not being used, so themes can drop support
| Pattern | Status | Initial PR | Current PR |
|---------|--------|------------|------------|
| 1\. crm-accordion-wrapper & crm-accordion-master-wrapper | Supported | [28415](https://github.com/civicrm/civicrm-core/pull/28415) | 64 instances - [29448](https://github.com/civicrm/civicrm-core/pull/29448) |
| 2\. crm-dashlet | Supported | [29613](https://github.com/civicrm/civicrm-core/pull/29613) | (only instance, so same) |
| 3\. crm-collapsible | Supported | [28430](https://github.com/civicrm/civicrm-core/pull/28430) | 9 instances - 8 fixed in [29533](https://github.com/civicrm/civicrm-core/pull/29533) |
| 4\. fieldset | Deprecated (?) | [28441](https://github.com/civicrm/civicrm-core/pull/28441) | That PR might have been only instance |
| 5\. Extensions table | Deprecated | [28473](https://github.com/civicrm/civicrm-core/pull/28473) | Was only instance |
| 6\. Angular directive | Deprecated | [28467](https://github.com/civicrm/civicrm-core/pull/28467) | Was only instance |
| 7\. FormBuilder generated accordion | Deprecated | [28449](https://github.com/civicrm/civicrm-core/pull/28449) | Was only instance |
| 8\. crm-accordion-master-wrapper | Supported | [28421](https://github.com/civicrm/civicrm-core/pull/28421) | Bundled with pattern 1 |
Testing of new patterns should be on all CMSs with their default admin theme (e.g. Claro on Drupal 9+) and Civi's Greenwich (default) theme.
### Testing [29533](https://github.com/civicrm/civicrm-core/pull/29533)
| File | Testing URL | UI works? | likely related JS? | status | notes |
|------|-------------|-----------|--------------------|--------|-------|
| templates/CRM/Admin/Form/ScheduleReminders.tpl | civicrm/admin/scheduleReminders?reset=1 & click 'add reminder' | yes: d7+d10+sa+wp | none | functional | tested with and without an sms provider enabled |
| templates/CRM/Admin/Page/APIExplorer.tpl | civicrm/api3 & then select an Entity, such as ACLRole | breaks: d7+d10+sa+wp | yes, [APIExplorer.js](https://github.com/civicrm/civicrm-core/blob/735b4e27d76f8cc9f0da3c573217eb35a6250720/templates/CRM/Admin/Page/APIExplorer.js), broken | broken | documentation tab content appears below explorer tab content; entity dropdowns don't have intended behavior |
| templates/CRM/Case/Form/ActivityTab.tpl | civicrm/contact/view/case?reset=1 under Activities/SearchFilters | yes: d7 | none that controls the accordion | functional | some extra borders appear around the details |
### Testing [29448](https://github.com/civicrm/civicrm-core/pull/29448)
Would remove all instances of pattern 1 and pattern 8 (the majority of Civi's accordions).
- [x] CRMAccordionToggle - Contact/Import/Form/Preview.tpl - civicrm/import/contact \> page 3
- [x] CRMAccordionToggle - Financial/Form/BatchTransaction.tpl - civicrm/batchtransaction?reset=1&bid=1 (after creating a batch)
- [x] Contact dashboard issues - Contact/Form/Contact.tpl
- [x] Contact dashboard issues - Contact/Form/Edit/Address.tpl
- [x] Contact dashboard issues - Contact/Form/Edit/CommunicationPreferences.tpl
- [x] Contact dashboard issues - Contact/Form/Edit/CustomData.tpl
- [x] Contact dashboard issues - Contact/Form/Edit/Demographics.tpl
- [x] Contact dashboard issues - Contact/Form/Edit/Notes.tpl
- [x] Contact dashboard issues - Contact/Form/Edit/TagsAndGroups.tpl
- [x] Doesn't open on validation error - Activity/Form/FollowUp.tpl - civicrm/activity?reset=1&action=add&context=standalone
- [x] Doesn't open on validation error - Core/Form/RecurringEntity.tpl - civicrm/activity?reset=1&action=add&context=standalone
- [x] Doesn't open on validation error - Form/attachment.tpl - civicrm/activity?reset=1&action=add&context=standalone, civicrm/activity/email/add
- [x] Other issue - common/fatal.tpl - make an error, ie civicrm/payment
- [x] Other markup issue - Contribute/Form/AdditionalPayment.tpl - civicrm/payment?action=add&reset=1&id=1
- [x] Other markup issue - Custom/Page/CustomDataView.tpl - tested by @shaneonabike and requesting feedback (seems ok)
- [x] Other markup issue - Contribute/Form/Contribution.tpl - civicrm/contribute/add
- [x] Other UX issue - Case/Form/Activity.tpl - civicrm/contact/view/case (add activity modal)
- [x] Other tiny issue - Pledge/Form/Search.tpl - civicrm/pledge/search?reset=1 - tested by @shaneonabike and requesting feedback (seems ok)
- [x] Ajax issue - Contact/Page/View/GroupContact.tpl - civicrm/contact/view -\> Groups
- [x] Ajax issue - Pledge/Form/Pledge.tpl - civicrm/pledge/add?reset=1&action=add&context=standalone
- [x] Remove from PR - Case/Form/ActivityTab.tpl - civicrm/contact/view/case
- [ ] ~~This shouldn't be accordion - Financial/Form/FinancialAccount.tpl - civicrm/admin/financial/financialAccount?reset=1 + add~~ see #68
- [ ] ~~Does this need to be an accordion? - Case/Form/CaseFilter.tpl - civicrm/case~~ see #68
- [ ] ~~Does this need to be an accordion? - Contribute/Form/ContributionPage/Premium.tpl - civicrm/admin/contribute/custom?action=update&reset=1&id=1&selectedChild=premium~~ see #68
- [ ] ~~Does this need to be an accordion? - SMS/Form/Group.tpl - civicrm/sms/send?reset=1 (install & config SMS dummy ext)~~ see #68
- [ ] ~~Does this need to be an accordion? - SMS/Form/Schedule.tpl - civicrm/sms/send?reset=1~~ see #68
- [x] Custom/Form/Search.tpl (e.g. civicrm/activity/search?reset=1)
- [ ] ~~Cannot find to test - Mailing/Form/Approve.tpl~~ (there is a path but class isn't called anywhere, does it do anything? New issue https://lab.civicrm.org/dev/core/-/issues/5055)
- [x] Create membership, and then click Edit/View and see the Related Contributions - Member/Form/Membership.tpl
- [x] Create report, click a report like Constituent Summary, and view Custom fields in Field selection- Report/Form/Tabs/FieldSelection.tpl
- [x] Create report, click a report like Constituent Summary, and view fields in Filter - Report/Form/Tabs/Filters.tpl
Edit: moved review summary to a comment.
#### Related class issues
These files are not affected by [29448](https://github.com/civicrm/civicrm-core/pull/29448) but have references to `.crm-accordion-wrapper`, `.crm-accordion-header` or `.crm-master-accordion-header` and need attention to eliminate those classes.
- Activity/Form/Search.tpl
- Case/Form/CaseView.js
- Campaign/Form/Gotv.tpl
- Contact/Form/Search/AdvancedCriteria.tpl
- Contact/Page/View/CustomDataView.tpl
- Contact/Page/View/Summary.js
- Dashlet/Page/Blog.tpl
- Financial/Form/FinancialAccount.tpl - see above
We will need to merge [29563](https://github.com/civicrm/civicrm-core/pull/29563) as well for theming issue fix.Improve Civi's front-endnicolnicolhttps://lab.civicrm.org/dev/user-interface/-/issues/66Add a resets file / section to core CSS. List necessary resets here2024-03-01T23:42:31ZnicolAdd a resets file / section to core CSS. List necessary resets hereOpening this as an issue rather than PR in order to gather sufficient number of resets needed before creating a single place in the CSS folder to put them.
CMS admin themes sometimes clash with Civi's CSS. For e.g. Claro (default admin...Opening this as an issue rather than PR in order to gather sufficient number of resets needed before creating a single place in the CSS folder to put them.
CMS admin themes sometimes clash with Civi's CSS. For e.g. Claro (default admin theme in D9+) does this:
```
td {
height: 4rem;
}
```
which makes Civi tables look like this:
![image](/uploads/b38c89de3e97838a2fc94dd3314dd4d2/image.png)
Instead of
![image](/uploads/d44351e711abbe61b08279ed9f5b73cf/image.png)
(reset with `.crm-container td {height: inherit;}`). These resets will be needed in core and any Civi themes.
Some things are smaller, e.g. the new SearchKit UI on Claro looks like this:
![image](/uploads/b6f81108f635fd89300f1b5be10cde75/image.png)
because of the following non-namespaced CSS that ships in Claro:
```
.panel {
margin-block: 1em 3em;
…
```
which can be reset with putting at the top of Civi's css:
```
.crm-container .panel {
margin-block: 0;
…
```https://lab.civicrm.org/dev/core/-/issues/5034Schedule Reminders task for Events fail to complete when Event tokens used in...2024-02-28T12:49:12ZmarcusjwilsonSchedule Reminders task for Events fail to complete when Event tokens used in combination with "Also include" ContactsOverview
----------------------------------------
When Scheduled Reminders are set up for an Event in CiviCRM, and the content of that email includes Tokens relating to the Event (Event Title, Start Date, etc.) AND the user includes addi...Overview
----------------------------------------
When Scheduled Reminders are set up for an Event in CiviCRM, and the content of that email includes Tokens relating to the Event (Event Title, Start Date, etc.) AND the user includes additional Contacts to include in the Scheduled Reminder (in the "Also include" field), this breaks the Scheduled Reminder scheduled task, and it fails to complete.
Reproduction steps
----------------------------------------
1. From an event, set up a Scheduled Reminder to send based on the Event, i.e. 24 hours before the Start Date
2. In the body content of the Scheduled Reminder email, include one or more Tokens related to the Event (Event Title, Event Start Date)
3. In the "Limit or Add Recipients" field for the Scheduled Reminder "Also include" a Contact who is NOT registered as a Participant for the given event
Current behaviour
----------------------------------------
When the scenario above is in place, Scheduled Reminder task trigger by the CiviCRM Cron starts to fail and not complete.
Expected behaviour
----------------------------------------
Scheduled Reminder tasks should continue to run, complete and include the additional Contacts in the Reminder email as well as the Event Participants.
Environment information
----------------------------------------
* __CiviCRM:__ 5.64.4
* __PHP:__ _7.4/8.0__
* __CMS:__ _WordPress 6.4.3_
Comments
----------------------------------------
Tested and reproduced on production site and on a clean Civi+WP site using CiviBuild in test CiviCRM site.https://lab.civicrm.org/dev/core/-/issues/5033Fatal error visiting event registration page with a disabled pricefield2024-02-28T17:30:52Zmagnolia61Fatal error visiting event registration page with a disabled pricefieldOverview
----------------------------------------
Opening a registration page with a priceset with one of the pricefields disabled results in a fatal error.
TypeError: Argument 1 passed to CRM_Event_Form_Registration::getUsedSeatsCount(...Overview
----------------------------------------
Opening a registration page with a priceset with one of the pricefields disabled results in a fatal error.
TypeError: Argument 1 passed to CRM_Event_Form_Registration::getUsedSeatsCount() must be of the type int, null given, called in /var/www/vhosts/xyz/web/sites/all/modules/civicrm/CRM/Event/Form/Registration.php on line 956 in CRM_Event_Form_Registration->getUsedSeatsCount() (line 1040 of /var/www/vhosts/xyz/web/sites/all/modules/civicrm/CRM/Event/Form/Registration.php).
The problem for us is somewhere in the function isOptionFullID.
Something in our priceset does not resolve to valid value for $optId = $option['id'];
when from IsOptionFullID the function getUsedSeatsCount is called it results in an error because it expects an int value for priceFieldValueID
protected function getUsedSeatsCount(int $priceFieldValueID) : int {
Reproduction steps
----------------------------------------
1. An event has a priceset with one of the pricefields disabled
2. Opening the registration page results in a fatal error
Current behaviour
----------------------------------------
![image](/uploads/041bb8c19666fc3f99c3f5bec78606bb/image.png)
![image](/uploads/2ff1b9c96e300515694d0a6930409328/image.png)
Expected behaviour
----------------------------------------
The registration page would show, with the pricefield disabled
Environment information
----------------------------------------
Current master / sandbox
Comments
----------------------------------------
My limited detective and coding skills enable me to reach this far, I have no clue on where to search further and what piece of code is the root cause of this.5.71.0https://lab.civicrm.org/dev/core/-/issues/5031Standalone - multi-lingual fatals when accessing OptionValues2024-03-06T15:18:42ZufundoStandalone - multi-lingual fatals when accessing OptionValues@bgm :
> if we enable multi-lingual (tested on 5.72/master), it fatals because it tries to access Option Values before i18n dbLocale seems to have been set (i.e. I see it querying civicrm_option_value and not civicrm_option_value_en_US)...@bgm :
> if we enable multi-lingual (tested on 5.72/master), it fatals because it tries to access Option Values before i18n dbLocale seems to have been set (i.e. I see it querying civicrm_option_value and not civicrm_option_value_en_US).
> It happens immediately after enabling multi-lingual: ex: https://smaster.demo.civicrm.org/civicrm/admin/setting/localization?reset=1
>
> Go to Administer > Localization > Translation. Enable multi-lingual, fatals.
>
> I haven't dug into it, but part of me would be pretty happy to deprecate multi-lingual mode, and not support it in Standalone. I do use it, but there are other ways we could support config translation.https://lab.civicrm.org/dev/core/-/issues/5028Add CKEditor/WYSIWYG to the Event Confirmation Email Text Field2024-02-28T12:47:28ZpbarmakAdd CKEditor/WYSIWYG to the Event Confirmation Email Text FieldPer a discussion with Eileen, it would be great to finally get the Confirmation Email Text field of Event Online Registrations to use CKEditor. That will allow admins to create much nicer confirmation emails (with embedded graphics and b...Per a discussion with Eileen, it would be great to finally get the Confirmation Email Text field of Event Online Registrations to use CKEditor. That will allow admins to create much nicer confirmation emails (with embedded graphics and branding) without the need to learn HTML. Given the Registration Screen Introductory Text and Thank-you Screen text both have this option, it seems like a good idea to also have it for the confirmation email.https://lab.civicrm.org/dev/core/-/issues/5027Event Confirmation Email Text Token Should be Set as text/html2024-02-28T12:46:59ZpbarmakEvent Confirmation Email Text Token Should be Set as text/htmlPer a chat with Eileen and Seamus, adding a ticket here. The Event confirmation email text is currently not rendering any input HTML tags. It seems this is because the token is not set as "text/html".
Seamus recommended changing https:/...Per a chat with Eileen and Seamus, adding a ticket here. The Event confirmation email text is currently not rendering any input HTML tags. It seems this is because the token is not set as "text/html".
Seamus recommended changing https://github.com/civicrm/civicrm-core/blob/master/CRM/Event/Tokens.php#L239 from this:
```
else {
$tokens[$fieldName]['text/plain'] = $event[$fieldName];
}
```
to this:
```
else {
$type = ($fieldName === 'confirm_email_text' ? 'text/html' : 'text/plain');
$tokens[$fieldName][$type] = $event[$fieldName];
}
```
For my testing, I just added this line around line 227:
`$tokens['confirm_email_text']['text/html'] = $event['confirm_email_text'];`
Either of those seem to solve the issue, converting the value of that field to actual html code.https://lab.civicrm.org/dev/core/-/issues/5024FormBuilder: "edit" and "clone" broken for Core Packaged forms2024-02-26T13:16:50ZnoahFormBuilder: "edit" and "clone" broken for Core Packaged formsTo reproduce:
1. Go to https://dmaster.demo.civicrm.org/civicrm/admin/afform
2. On the Submission Forms tab, click "Edit" or "Clone" next to afformQuickAddIndividual or afformQuickAddOrganization.
What happens:
A blank FormBuilder con...To reproduce:
1. Go to https://dmaster.demo.civicrm.org/civicrm/admin/afform
2. On the Submission Forms tab, click "Edit" or "Clone" next to afformQuickAddIndividual or afformQuickAddOrganization.
What happens:
A blank FormBuilder config screen appears.
What should happen:
The config & elements from the selected form should load.colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/5022MailingEventSubscribe Error2024-02-28T12:46:24ZjmargrafMailingEventSubscribe ErrorOverview
----------------------------------------
MailingEventSubscribe does result in an error message
Reproduction steps
----------------------------------------
1. Check the ID of an existing mailing list group (eg. 60)
2. Open AP...Overview
----------------------------------------
MailingEventSubscribe does result in an error message
Reproduction steps
----------------------------------------
1. Check the ID of an existing mailing list group (eg. 60)
2. Open API-Explorer
3. Send API-Request:
```
$result = civicrm_api3('MailingEventSubscribe', 'create', [
'group_id' => 60,
'email' => "test@example.com",
]);
```
4. Got Error Message:
```
{
"error_code": 0,
"entity": "MailingEventSubscribe",
"action": "create",
"is_error": 1,
"error_message": "Failed to find key by ID or tag (I2s19RqQP0fDuuRcyoyhUhRQiAY)"
}
```
Current behaviour
----------------------------------------
Error Message: "error_message": "Failed to find key by ID or tag (I2s19RqQP0fDuuRcyoyhUhRQiAY)"
Expected behaviour
----------------------------------------
Subscribe to Mailing-List
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __Browser:__ _Firefox 59.0.1/Chrome 78.0.3904/Safari 13_
* __CiviCRM:__ 5.69.5
* __PHP:__ 8.1
* __CMS:__ Drupal 10.2.3
* __Database:__ MariaDB
* __Web Server:__ Apachehttps://lab.civicrm.org/dev/core/-/issues/5020Provide support for the Peppol standard to send invoices from CiviCRM to othe...2024-03-18T15:29:58Zjustinfreeman (Agileware)Provide support for the Peppol standard to send invoices from CiviCRM to other organisationsThis is just a placeholder to see if there is any interest in providing support for the Peppol standard. Did some searching and couldn't find any mentions about this in Lab.
Basically, the idea is to provide support for the Peppol stand...This is just a placeholder to see if there is any interest in providing support for the Peppol standard. Did some searching and couldn't find any mentions about this in Lab.
Basically, the idea is to provide support for the Peppol standard to send invoices from CiviCRM to other organisations. See https://peppol.org/ and participating organisations will be listed here, https://directory.peppol.eu/publichttps://lab.civicrm.org/dev/core/-/issues/5017Fatal Error with Angular Manager.php after upgrading to CiviCRM 5.69.52024-02-23T15:18:48ZLKuttnerFatal Error with Angular Manager.php after upgrading to CiviCRM 5.69.5After upgrading to CiviCRM 5.69.5 from 5.64.4 we get a WSOD.
`Parse error: syntax error, unexpected '=' in .../modules/civicrm/Civi/Angular/Manager.php on line 98`
`Fatal error: Exception thrown without a stack frame in Unknown on line...After upgrading to CiviCRM 5.69.5 from 5.64.4 we get a WSOD.
`Parse error: syntax error, unexpected '=' in .../modules/civicrm/Civi/Angular/Manager.php on line 98`
`Fatal error: Exception thrown without a stack frame in Unknown on line 0
`
I have not been able to identify what is causing this.
I have disabled all the non-standard CiviCRM extensions, with no change.
This is on Drupal 7.99 with PHP 7.3.33. Thank you for any help you can offer.https://lab.civicrm.org/dev/core/-/issues/5015'Clean-up Temporary Data and Files' doesn't empty the tplCache by default2024-02-23T15:18:23ZAndrew West'Clean-up Temporary Data and Files' doesn't empty the tplCache by defaultThe 'Clean-up temporary data and files' scheduled job [doesn't clean the tpl directory by default](https://github.com/civicrm/civicrm-core/blob/06540d39dc2cedcadb19be5c351ef831a9133534/api/v3/Job.php#L631). Should it? We see this balloon...The 'Clean-up temporary data and files' scheduled job [doesn't clean the tpl directory by default](https://github.com/civicrm/civicrm-core/blob/06540d39dc2cedcadb19be5c351ef831a9133534/api/v3/Job.php#L631). Should it? We see this ballooning to tens of gigabytes when sending large mailings.
Workaround is to add the parameter, but it seems like this might catch some people out.
![image](/uploads/85b4275fb08070a8995fe094e32d466e/image.png)https://lab.civicrm.org/dev/core/-/issues/5009SearchKit table display: some pager settings doesn't stick2024-02-14T10:09:42ZnoahSearchKit table display: some pager settings doesn't stick![hidepager](/uploads/df0e16539b7cc4b283b277aa7b036fd6/hidepager.gif)
The screen recording shows that the "Adjustable Page Size" setting doesn't save. This is also true for "Hide Pager if One Page" and most if not all other pager settings.![hidepager](/uploads/df0e16539b7cc4b283b277aa7b036fd6/hidepager.gif)
The screen recording shows that the "Adjustable Page Size" setting doesn't save. This is also true for "Hide Pager if One Page" and most if not all other pager settings.https://lab.civicrm.org/dev/core/-/issues/5002Number field input validation does not respect decimal separator (member cust...2024-03-07T12:13:16ZCésarNumber field input validation does not respect decimal separator (member custom field)## Overview
Hello I think its related to: https://lab.civicrm.org/dev/core/-/issues/4941 and https://lab.civicrm.org/dev/core/-/issues/4154
## Reproduction steps
1. Under Administer > Localization > Languages, Currency, Locations, set...## Overview
Hello I think its related to: https://lab.civicrm.org/dev/core/-/issues/4941 and https://lab.civicrm.org/dev/core/-/issues/4154
## Reproduction steps
1. Under Administer > Localization > Languages, Currency, Locations, set "Thousands Separator" to "." (dot) and "Decimal Delimiter" to "," (comma).
2. Create a custom field extending Memberships. Data type: Number. (money works)
3. Edit an existing member (or: add a new member). In the number field, enter a number that includes a comma, such as "1,5".
## Current behaviour
Validation fails with the error message "**Error One of parameters (value: 1,5) is not of the type Float**"
## Environment information
Tested on https://dmaster.demo.civicrm.org/ 5.72.alpha1https://lab.civicrm.org/dev/core/-/issues/5000SearchKit: Allow formatting of the totals in the footer2024-02-14T10:06:39Zsimon.hermannSearchKit: Allow formatting of the totals in the footerSearchKit allows to create a footer row, where the total of a column can be displayed. However, this total does not allow for any formatting or reproduces the formatting of the columns it sums.
It would be great if there would be either ...SearchKit allows to create a footer row, where the total of a column can be displayed. However, this total does not allow for any formatting or reproduces the formatting of the columns it sums.
It would be great if there would be either an option to choose a formatting (decimal separators, thousand separators, currencies if applicable etc) or if the total would reflect the formatting of the column it sums.https://lab.civicrm.org/dev/core/-/issues/4999Imagine a world without CodeGen2024-03-05T04:32:51ZcolemanwImagine a world without CodeGenCurrently we use `CRM_Core_CodeGen` to take our schema/xml files and generate DAO.php, install.sql and uninstall.sql files, which have to be periodically regenerated. This is a minor inconvenience for a core developer, a potential gotcha...Currently we use `CRM_Core_CodeGen` to take our schema/xml files and generate DAO.php, install.sql and uninstall.sql files, which have to be periodically regenerated. This is a minor inconvenience for a core developer, a potential gotcha for an extension developer, and a major coordination difficulty across *all* extensions in `universe` (whenever any aspect of the generated code needs to change).
But what if we didn't have to generate those files? What if we could read schema information directly from the xml (or potentially a different source).
Current Structure:
-----
**Key:** ✍️ Handwritten file | 📠 Generated file
| File | Purpose | In Core | In Extensions |
| --- | --- | --- | --- |
| ✍️ `schema/xml` | Canonical declaration of entity + all metadata | Run `setup.sh -g` | Run `civix generate:entity-boilerplate` |
| 📠 Install sql | Add schema tables | `civicrm.mysql` | `auto_install.sql` |
| 📠 Uninstall sql | Drop schema tables | `civicrm_drop.mysql` | `auto_uninstall.sql` |
| 📠 Entity.php | Declare entity's existence | `AllCoreTables.data.php` | `*.entityType.php` + `entity-types-php` mixin |
| 📠 `CRM/Core/I18n/SchemaStructure.php` | Lists localizable table columns | Seems kinda redundant with other metadata? | Doesn't exist |
| ✍️ `CRM_Core_DAO` | Base class for all generated DAOs | All DAOs extend this class | Extension DAOs also extend core class (makes change-management across `universe` difficult) |
| 📠 `CRM_*_DAO_*` | Generated from the xml file | Must be generated | Must be generated |
The generated DAO file (including stuff it inherits from `CRM_Core_DAO`) serves a variety of purposes:
1. OO class that allows a database table to be used like a php object, e.g.
```
$contact = new CRM_Contact_DAO_Contact();
$contact->first_name = 'Bob';
$contact->save();
```
This is a neat idea and probably ahead of its time, but is basically deprecated now, mostly because, in a relational database, having access to only one table at a time isn't very useful. If it weren't for legacy core & extension code still using this pattern, we could drop it in favor of more robust tools like APIv4.
2. Static methods like `fields()` and `indices()` which return the data from the xml file in php format.
3. Localizes strings, because CodeGen wraps titles and labels in `ts()`.
4. A bunch of other random static methods (e.g. `disableFullGroupByMode()`) which seem like they'd be better-placed in a separate utility class.
New Structure
----------
If we no longer want to generate files and just read from a canonical source, then the main question is, "what should be the canonical source of entity metadata?"
1. **Stick with XML:** Keep the existing xml files but delete the generated stuff. Parse the xml at runtime to get that data.
- Pro: It's already there, no rewrites needed.
- Con: Poor DX (developers don't generally enjoy writing XML files).
- Con: It's very slow (the slowest by far of all the options) so heavy caching would be needed.
- Con: Without generating php files, another method of i18n string extraction would be needed ([such as this](https://github.com/civicrm/civistrings/pull/17)).
2. **DAO Files:** Delete the `schema/xml` files and run everything from the generated DAO files, which going forward will be hand-edited instead of regenerated.
- Pro: DAO files are already there.
- Con: Also poor DX (the boilerplate in those files would not be fun to write/edit by hand).
3. **Somewhere Else:** Move schema info to e.g. json files or better-structured PHP files.
- Pro: DX and performance could be optimized.
- Con: XML files must be rewritten (could be scripted).
- Con: Migration management for core and extensions.
Supporting Dynamic/Virtual Entities
--------
It's also worth keeping in mind that there are now several types of entities that are dynamic & share a DAO:
- Multi-record custom fields
- ECK entities
- SearchKit materialized displays
The DAO structure doesn't cope with this very well, as the assumption has always been 1-1-1 between table, entity & DAO class. But while we're restructuring things let's avoid adding more code that makes this assumption. An ideal DAO from the POV of virtual entities would be an object that takes entity name in its constructor & initializes itself with the appropriately corresponding tablename, fields, and other metadata.https://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/core/-/issues/4996Standalone - user documentation for user management functionality2024-02-23T16:54:58ZufundoStandalone - user documentation for user management functionalityWould be good to write some user documentation for how to use the standaloneusers user management screen.
I think this belongs somewhere here: https://docs.civicrm.org/sysadmin/en/latest/setup/ ?Would be good to write some user documentation for how to use the standaloneusers user management screen.
I think this belongs somewhere here: https://docs.civicrm.org/sysadmin/en/latest/setup/ ?https://lab.civicrm.org/dev/core/-/issues/4994Standalone - issues with haveibeenpwned on password setting screen?2024-03-26T11:33:19ZufundoStandalone - issues with haveibeenpwned on password setting screen?RichRich