Development issueshttps://lab.civicrm.org/groups/dev/-/issues2024-02-20T00:52:26Zhttps://lab.civicrm.org/dev/user-interface/-/issues/61Modals: move from Jquery UI Dialog to something else?2024-02-20T00:52:26ZnicolModals: move from Jquery UI Dialog to something else?At present Civi's modals (aka popups) are generated using [JQuery UI Dialog](https://jqueryui.com/dialog/). This inserts the modal's markup just above the bottom `</body>` closing tag, which is outside of `#crm-container` and `#bootstrap...At present Civi's modals (aka popups) are generated using [JQuery UI Dialog](https://jqueryui.com/dialog/). This inserts the modal's markup just above the bottom `</body>` closing tag, which is outside of `#crm-container` and `#bootstrap-theme` divs. This is perhaps related to [an issue where](https://chat.civicrm.org/civicrm/pl/fywkz1tcetdp5ms6s39zqfxcbw) modals can't render Bootstrap elements from Form Builder output.
![image](/uploads/71aee3e41f4455dfe65476ab6e821fd9/image.png)
JQuery UI dates back to 2007, is tricky to theme, and doesn't include modern accessibility Aria labels. What are the other options?:
1. replace with [Bootstrap 3's modal component](https://getbootstrap.com/docs/3.4/javascript/#modals) that ships with Civi. Upside is it's more accessibile, reduces code, is easier to retheme or share styles with the base theme.
Downside is there's no grabber to resize the modal, and you can't have multiple modals open at the same time, which Civi likes to do at present. Multiple modals is [considered bad UX](https://app.uxcel.com/courses/ui-components-n-patterns/modals--dialogs-best-practices-166) - Bootstrap5 offers [toggling between multiple modals](https://getbootstrap.com/docs/5.3/components/modal/#toggle-between-modals). There's also scripts that extend Bootstrap Modal to support multiple, ie https://codepen.io/neni9/pen/dJVwqr.
![image](/uploads/4dee863b5b5bd40d0d8a0d95084a0c7b/image.png)
2. use an Angular modal method (e.g. https://jasonwatmore.com/post/2016/07/13/angularjs-custom-modal-example-tutorial)
3. use another modal library
4. use the html element `<dialog>` (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog). Accessible by default, requires no javascript library (can use the native [showModal](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal) method), widely supported, should never grow old/need replacing, easy to theme… (am writing the upsides in the hope someone replies below with the downsides).
5. change nothing, just ensure that #bootstrap-theme can be applied to the contents of a modal.Improve Civi's front-endhttps://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/4700Email attachments with unicode filename get munged2023-10-13T13:46:38ZJonGoldEmail attachments with unicode filename get mungedOverview
----------------------------------------
If you send an email with an attachment, and the filename has Unicode, the Unicode will be converted to underscores.
Reproduction steps
----------------------------------------
1. Create...Overview
----------------------------------------
If you send an email with an attachment, and the filename has Unicode, the Unicode will be converted to underscores.
Reproduction steps
----------------------------------------
1. Create a new file `Montréal.txt`.
2. Send an email to yourself, attaching the file.
Current behaviour
----------------------------------------
Email attachment is named `Montr_al.txt`.
Expected behaviour
----------------------------------------
Email attachment is named `Montréal.txt`.5.68.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/4699MessageTemplate - Graduate new editing UI2023-10-16T09:41:00ZtottenMessageTemplate - Graduate new editing UIRe: @eileen's comment on https://github.com/civicrm/civicrm-core/pull/24981#issuecomment-1753901505
> as an aside - I was thinking about the fact there are 2 parts to the message admin - this search display & the edit form (well those a...Re: @eileen's comment on https://github.com/civicrm/civicrm-core/pull/24981#issuecomment-1753901505
> as an aside - I was thinking about the fact there are 2 parts to the message admin - this search display & the edit form (well those are the major parts).
>
> I feel like the edit form is mature enough to remove the quick form one - but where would it sit?
My first impulse was skeptical, but now I kinda see it. Let me try to talk it through:
* When we implemented the new editor (for translatable system-workflow messages), we put it in an extension (`message_admin`) for fear that it wouldn't be at par with the existing editor.
* The "Message Templates" are two things -- "user-defined templates" and "system-workflow messages". The suitability depends on how strongly you make that distinction.
* The attitude can be: "_They're both `MessageTemplate`, so they're the same thing, so they should use the same editor_" ... In that case, no, the current `message_admin` editor is not ready to handle "user-defined templates".
* The attitude can be "_They're really different things, and we should split them apart_" .... In that case, yes, I think we could basically elevate the `message_admin` editor-screen for system-workflow messages on all sites.
* In brainstorming with Coleman for #4454, I quite liked the idea of providing separate nav-links for those screens. (Add a separate link for "Admin > Communications > Workflow Messages".)
There are a few differences between the screens:
* Editing widget
* The old editor uses the `ckeditor` widget. User-defined templates lean more on prose and layout. Using a rich-text widget is more agreeable.
* The new editor uses the `monaco` widget. Workflow-message templates lean more on logic and data. Using a structured widget is more agreeable.
* Missing options
* The old editor has some "PDF" options
* The old editor has an option to upload a document (instead of editing in browser).
* Extra options
* There are various options+buttons that appear in the new workflow-message editor -- but haven't been thought-through for the user-defined stuff - e.g. "Original", "Draft", "Locale", "Activate"
IMHO, this would be the shortest path to elevating/blessing the new editor for all sites:
1. Conceptually, accept "User-defined templates" and "System-workflow messages" as different things (with different screens).
2. Setup separate links/titles for the pages
3. Examine (and possibly port) the missing options (esp PDF dropdown).
4. Move the editor to core.https://lab.civicrm.org/dev/core/-/issues/4698Editing a contribution does not consider all related line items.2023-10-20T07:50:26ZjitendraEditing a contribution does not consider all related line items.Original issue raised on webform_civicrm project - https://www.drupal.org/project/webform_civicrm/issues/3390363
Contribution created with multiple line items overwrites the total amount with participant, if tax amount is included for a...Original issue raised on webform_civicrm project - https://www.drupal.org/project/webform_civicrm/issues/3390363
Contribution created with multiple line items overwrites the total amount with participant, if tax amount is included for all the line items.
**Steps to reproduce**
- Create a webform including event registration with participant fee and contribution with at least one additional line item.
- Ensure all the fees have tax included.
- Make a submission to generate a contribution with multiple line items.
- In civicrm access the contribution's edit form and save.
- On submit, the total amount and tax amount is recalculated and will only include the participant fee, additional line items are ignored.
The issue is possibly at this point - https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/Form/Contribution.php#L1668
Not sure why its required to update the total amount on edit action, when we have a freezed display of it on screen?https://lab.civicrm.org/dev/core/-/issues/4697Standalone: civicrm/user path conflicts with existing path to user dashboard2023-11-29T02:10:00ZcolemanwStandalone: civicrm/user path conflicts with existing path to user dashboardThe path `civicrm/user` is declared by the Standalone extension, but it was already in use by core.
See https://lab.civicrm.org/dev/core/-/blob/f04bfacb5ed5131c9d29e8a9c0725c3059caeef0/CRM/Core/xml/Menu/Contact.xml#L213-218The path `civicrm/user` is declared by the Standalone extension, but it was already in use by core.
See https://lab.civicrm.org/dev/core/-/blob/f04bfacb5ed5131c9d29e8a9c0725c3059caeef0/CRM/Core/xml/Menu/Contact.xml#L213-218https://lab.civicrm.org/dev/core/-/issues/4696(5.66 upgrade error) Action Schedule field is too short2023-10-25T20:48:36ZJonGold(5.66 upgrade error) Action Schedule field is too short`civicrm_action_schedule`.`name` is currently `VARCHAR(64)`.
In the upgrade:
`Incremental/sql/5.66.alpha1.mysql.tpl` has the statement:
```
UPDATE `civicrm_action_schedule` a1, `civicrm_action_schedule` a2
SET a2.name = CONCAT(a2.name, ...`civicrm_action_schedule`.`name` is currently `VARCHAR(64)`.
In the upgrade:
`Incremental/sql/5.66.alpha1.mysql.tpl` has the statement:
```
UPDATE `civicrm_action_schedule` a1, `civicrm_action_schedule` a2
SET a2.name = CONCAT(a2.name, '_', a2.id)
WHERE a2.name = a1.name AND a2.id > a1.id;
```
However, the name can quite easily already be 64 characters, so this causes a `data too long` error.
Additionally, `CRM/Upgrade/Incremental/php/FiveSixtySix.php` has the following line:
```
$this->addTask('Make ActionSchedule.name required', 'alterColumn', 'civicrm_action_schedule', 'name', "varchar(64) NOT NULL COMMENT 'physical tablename for entity being joined to discount, e.g. civicrm_event'");
```
So if you manually alter your table, the `varchar(64)` portion of this causes it to break again. I was able to finish the incomplete upgrade via `cv` with `--skip`.5.66.1https://lab.civicrm.org/dev/core/-/issues/4695Deprecated function: Optional parameter $from declared before required parame...2024-01-05T03:43:07ZAndrew WassonDeprecated function: Optional parameter $from declared before required parameter $element## Overview
Deprecated function: Optional parameter $from declared before required parameter $element is implicitly treated as a required parameter in require_once() (line 19 of /sites/all/modules/civicrm/drupal/modules/civicrm_rules/ci...## Overview
Deprecated function: Optional parameter $from declared before required parameter $element is implicitly treated as a required parameter in require_once() (line 19 of /sites/all/modules/civicrm/drupal/modules/civicrm_rules/civicrm_rules.rules.inc).
The deprecated error issue is related to two files in the civicrm_rules sub module.
* line 20 of /civicrm/drupal/modules/civicrm_rules/civicrm_rules.mailing-eval.inc
* line 27 of civicrm/drupal/modules/civicrm_rules/civicrm_rules.contact-eval.inc
_This issue is referenced at:_ https://lab.civicrm.org/dev/core/-/issues/3958#note_152174
## Reproduction steps
1. Provision a new Drupal 7 / CiviCRM site on PHP 8.2 or change an existing site to PHP 8.2
2. Got an error "**Fatal error: Deprecated function: Optional parameter $from declared before required parameter $element is implicitly treated as a required parameter in require_once() (line 19 of /sites/all/modules/civicrm/drupal/modules/civicrm_rules/civicrm\_****rules.rules.inc****).**".
## Environment information
* **CiviCRM:** version 5.66.0 (any version)
* **PHP:** _8.2.x_
* **CMS:** Drupal 7.98 (any Drupal 7 version)
* **Database:** _MySQL 5.7.7/MariaDB 10.4/..._
* **Web Server:** _Apache 2.4/Nginx 1.16/..._
## Comments
The fix is to set the optional parameter $from = NULL to string $from = NULL.
* The sites where I have found this issue all use the Drupal Rules module so this may not impact sites that don't use Drupal Rules in their workflow.
I will create a PR shortly.5.68.0https://lab.civicrm.org/dev/core/-/issues/4694PHP 8.2 Deprecated ${} string interpolation drupal.module file2023-11-06T18:55:40ZAndrew WassonPHP 8.2 Deprecated ${} string interpolation drupal.module file## Overview
_CiviCRM can not be installed or updated on PHP 8.2.x because of a PHP 8.2 Deprecated ${} string interpolation issue with the file at line 1058 of /civicrm/drupal/civicrm.module._
_This issue is referenced at:_ https://lab....## Overview
_CiviCRM can not be installed or updated on PHP 8.2.x because of a PHP 8.2 Deprecated ${} string interpolation issue with the file at line 1058 of /civicrm/drupal/civicrm.module._
_This issue is referenced at:_ https://lab.civicrm.org/dev/core/-/issues/3958#note_152174
## Reproduction steps
1. Provision a Drupal website on PHP 8.2.x
2. Install of update CiviCRM.
3. Got an error "**Fatal error:** _Deprecated ${} string interpolation issue with the file at line 1058 of /civicrm/drupal/civicrm.module._".
## Environment information
* **CiviCRM:** version 5.66.0 (any version)
* **PHP:** _8.2.x_
* **CMS:** Drupal 7.98 (any Drupal 7 version)
* **Database:** _MySQL 5.7.7/MariaDB 10.4/..._
* **Web Server:** _Apache 2.4/Nginx 1.16/..._
## Comments
_Will supply PR shortly._
* How do I add Labels to relate this to PHP 8.2 and Drupal 7?5.68.0https://lab.civicrm.org/dev/core/-/issues/4693Admin UI: Maturation model2023-10-20T07:49:58ZtottenAdmin UI: Maturation model(**This issue is `type:exploration`. It is intended to discuss/explain/invite comment. It is not a singular action-item for implementation. The discussion may lead to other more concrete things. We can close the discussion when the appro...(**This issue is `type:exploration`. It is intended to discuss/explain/invite comment. It is not a singular action-item for implementation. The discussion may lead to other more concrete things. We can close the discussion when the approach is agreed; it doesn't need every possible follow-up task.**)
Context
-------
* Much of CiviCRM UI was originally built with one particular architecture. (Key concepts: `HTML_Quickform`, `Smarty`, `Selector`, `StateMachine`.) (Short-hand: "Civi-Quickform" or "CQF")
* We're in the middle of a multiyear project to convert large swaths of the CiviCRM UI to another architecture. (Key concepts: APIv4, Form Builder, SearchKit, Angular, Managed Entities.) (Short-hand: "SearchKit/FormBuilder" or "SKFB")
* The "Admin UI" extension (`civicrm_admin_ui`) is a bundle of SKFB screens (which replace CQF screens). The bundle currently provides ~20 screens.
Question
--------
As the screens in "Admin UI" mature, how do we roll them out to the user-base?
Opinions/Thoughts
--------
* The great thing about "Admin UI" extension is this: we can "move fast and break things" while keeping the ship "pointed in one direction" and also allowing "real-world testing".
* For site-builders, it's an opt-in that doesn't interfere with their existing screens. They can try new-screens and easily switch back to the familiar screens.
* For developers, it lowers the effort to get started -- you don't need perfection. You can do a first-pass in February -- it's a "good/decent" screen with a couple quirks or missing-features. You can take some time to get feedback or think-through the quirks. Then in May, you come back and make a better version.
* `civicrm_admin_ui` is accumulating a set of viable replacements.
* But they're not *all* equally viable.
* There are still many screens that don't have replacements -- screens which will need their own maturation time.
* There was some discussion about whether we're ready to enable `civicrm_admin_ui` by default. Some options are:
* __No, keep it disabled by default__ (until the entire UI has been re-done). But then a lot users don't get the benefit of perfectly good (*improved*) screens. And developers still have to maintain both the old+new variant of each.
* __Yes, enable it by default__ (while conversions are on-going). But then it puts more pressure for new screens to be perfect. You can't merge a replacement unless you've addressed all the features of the original.
Proposal
--------
Replacement-screens go through process of incubation/graduation, mediated by `civicrm_admin_ui`.
1. __Incubation__: When a new replacement is written in SKFB, put it in `civicrm_admin_ui`. Allow 3-9 months for additional development, real-world usage, etc.
2. __Graduation__: When the replacement is sufficiently mature, move it to a standard/universal folder. (Ex: A new CiviContribute SKFB screen will go to `ext/civi_contribute/`.)
3. __Cleanup__: Three months after graduation, delete the old screen.https://lab.civicrm.org/dev/core/-/issues/4692Clone command at Manage Contribution Pages doesn't work2023-11-23T07:51:00ZUpperholmeClone command at Manage Contribution Pages doesn't workOverview
----------------------------------------
On the 'Manage Contribution Pages' page at /civicrm/admin/contribute?reset=1 - which is now a packaged search made with Searchkit, there is an option to Clone any listed contribution page...Overview
----------------------------------------
On the 'Manage Contribution Pages' page at /civicrm/admin/contribute?reset=1 - which is now a packaged search made with Searchkit, there is an option to Clone any listed contribution page. Clicking the 'clone' button should presumably refresh the page view and show the user the new list of contribution pages, including the freshly cloned page.
Clicking the button certainly appears to rebuild the page, but no new contribution page is listed. refreshing the page doesn't help, so I'm assuming no new contribution page is created.
Reproduction steps
----------------------------------------
1. Go to 'Manage Contribution Pages' /civicrm/admin/contribute?reset=1
1. Click on the 'clone' button against any listed page.
1. View the refreshed list of pages, which does not include any cloned page.
Expected behaviour
----------------------------------------
I would expect to see my new page, with a name like 'clone of whatever the old page was called'.
Environment information
----------------------------------------
Repeatable in both Firefox and Safari, and on dmaster.https://lab.civicrm.org/dev/core/-/issues/4691missing "deleted_date" for table civicrm_contact2023-10-16T09:30:54ZMariaVmissing "deleted_date" for table civicrm_contactEvery now and then happens that contacts are deleted on a certain date, but is not noticed until a few days later.
Is there currently a solution how I find out on which day which contact was deleted?
When I look at the database table ci...Every now and then happens that contacts are deleted on a certain date, but is not noticed until a few days later.
Is there currently a solution how I find out on which day which contact was deleted?
When I look at the database table civicrm_contact, I find "is_deleted" and "modified_date".
"modified_date" does not change automatically when deleting a contact. So it seems to me that this information is not stored.
The workaround to compare backup database files seems to me very complex.
Therefore I see 2 options here:
1. "modified_date" will be modified when contact is deleted
2. adding an additional column for "deleted_date"
Any thoughts on that?https://lab.civicrm.org/dev/core/-/issues/4674civicrm_admin_ui blocks links from oauth-client2024-01-02T22:54:30Ztottencivicrm_admin_ui blocks links from oauth-clientOverview
----------------------------------------
Links for registering new OAuth-email integrations are gone.
Reproduction steps
----------------------------------------
1. Enable `civicrm_admin_ui` and `oauth_client`
1. In "Admin > S...Overview
----------------------------------------
Links for registering new OAuth-email integrations are gone.
Reproduction steps
----------------------------------------
1. Enable `civicrm_admin_ui` and `oauth_client`
1. In "Admin > System > OAuth", enable an email integration - such as Google Mail or MS Exchange. (You don't need real credentials -- just make up a random client ID/secret.)
1. Go to "Admin > Mail > Mail Accounts"
Current behaviour
----------------------------------------
There is no option to add accounts from Google Mail / MS Exchange.
Expected behaviour
----------------------------------------
This is what appears on the regular UI.
![Screenshot_2023-10-04_at_6.12.00_PM](/uploads/ec8ddfd6d888e3d769b0bbc9f9d7181e/Screenshot_2023-10-04_at_6.12.00_PM.png)
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __Browser:__ Firefox
* __CiviCRM:__ 5.66
* __PHP:__ 8.1
* __CMS:__ D7
* __Database:__ MySQL 8.0
* __Web Server:__ apachehttps://lab.civicrm.org/dev/core/-/issues/4673Proposal: SearchKit > Enable use of Extras fields (current date) in Field Tra...2023-10-05T11:51:51ZJustin657Proposal: SearchKit > Enable use of Extras fields (current date) in Field Transformations for Date Comparisons to TodayOverview
----------------------------------------
In SearchKit users/developers should be able to use the UI to add a column that does a datediff between **today** and a selected **date field** using the Field Transformation "Days betwee...Overview
----------------------------------------
In SearchKit users/developers should be able to use the UI to add a column that does a datediff between **today** and a selected **date field** using the Field Transformation "Days between two dates".
Example use-case
----------------------------------------
1. Create a new SearchKit query (saved search)
1. Add a column: Extras > Current Date
1. Open Field Transformations
1. Select "Days between two dates" before the column "Current Date"
1. On the right of that column, select from the dropdown the desired date field to compare to today.
Current behaviour
----------------------------------------
When creating queries in SearchKit, there is currently no easy way in the UI to do a datediff between the current date (CURDATE()) and a date field stored in the database.
Current workaround
----------------------------------------
We can hack our way to doing this by manually editing the SELECT clause of the query API call like this:
`"DATEDIFF(CURDATE(), birth_date) AS DATEDIFF_today_birth_date",`
You can do this directly in the "api_params" field of the saved search.
Or you can export the saved search, edit the API call, and then import the saved search using the SearchKit Import UI.
Comments
----------------------------------------
Verified this behaviour on Civi 5.65.0
See: [StackExchange Thread: How to calculate number of days to/from a date](https://civicrm.stackexchange.com/q/45654/15346)https://lab.civicrm.org/dev/core/-/issues/4641CiviMail - Add support for List-Unsubscribe=One-Click2024-02-21T10:44:20ZtottenCiviMail - Add support for List-Unsubscribe=One-ClickOverview
----------------------------------------
There was a [recent announcement](https://blog.google/products/gmail/gmail-security-authentication-spam-protection/) that Gmail would begin [requiring `List-Unsubscribe=One-Click`](https...Overview
----------------------------------------
There was a [recent announcement](https://blog.google/products/gmail/gmail-security-authentication-spam-protection/) that Gmail would begin [requiring `List-Unsubscribe=One-Click`](https://support.google.com/mail/answer/81126) from mailing lists circa Feb 2024. The relevant protocols are described by:
* https://datatracker.ietf.org/doc/html/rfc2369
* https://datatracker.ietf.org/doc/html/rfc8058
Example use-case
----------------------------------------
1. Create a "New Mailing"
2. Send it
3. As a recipient, view the headers of the message
4. Check the content of `List-Unsubscribe` and `List-Unsubscribe-Post`
Current behavior
----------------------------------------
CiviMail generates one header:
```
List-Unsubscribe: <mailto:u.1.1.rrpjscmw7whtdg4e@example.org>
```
Proposed behavior
----------------------------------------
CiviMail generates two headers:
```
List-Unsubscribe-Post: List-Unsubscribe=One-Click
List-Unsubscribe: <https://example.org/civicrm/mailing/oneclick?jid=1&qid=1&h=rrpjscmw7whtdg4e>
```5.70.0https://lab.civicrm.org/dev/core/-/issues/4640Site Crash after creating custom EntityReference field for Organizations2023-10-22T02:26:56ZJustin657Site Crash after creating custom EntityReference field for OrganizationsOverview
----------------------------------------
Today I managed to inadvertently take down the [dmaster](https://dmaster.demo.civicrm.org/) and [d10-master](https://d10-master.demo.civicrm.org/) CiviCRM demo sites by creating a custom ...Overview
----------------------------------------
Today I managed to inadvertently take down the [dmaster](https://dmaster.demo.civicrm.org/) and [d10-master](https://d10-master.demo.civicrm.org/) CiviCRM demo sites by creating a custom field of DataType=EntityReference and Entity=Organizations.
Those sites were running CiviCRM version 5.67.alpha1.
Reproduction steps
----------------------------------------
1. Create a new custom field, set Data Type = *Entity Reference* and Entity = *Organizations*.
2. When you click Save, the site crashes.
Current behaviour
----------------------------------------
The error thrown after clicking save on this page:
https://d10-master.demo.civicrm.org/civicrm/admin/custom/group/fields
```
The website encountered an unexpected error. Please try again later.
TypeError: CRM_Core_DAO_AllCoreTables::getTableForEntityName(): Return value must be of type string, null returned in CRM_Core_DAO_AllCoreTables::getTableForEntityName() (line 365 of /srv/buildkit/build/d10-master/vendor/civicrm/civicrm-core/CRM/Core/DAO/AllCoreTables.php).
Civi\Api4\Service\Schema\SchemaMapBuilder->addCustomFields() (Line: 73)
Civi\Api4\Service\Schema\SchemaMapBuilder->loadTables() (Line: 51)
Civi\Api4\Service\Schema\SchemaMapBuilder->build() (Line: 286)
Civi\Api4\Utils\CoreUtil::getSchemaMap() (Line: 772)
Civi\Api4\Query\Api4SelectQuery->autoJoinFK() (Line: 393)
Civi\Api4\Query\Api4SelectQuery->getField() (Line: 312)
Civi\Api4\Query\Api4SelectQuery->fillEntityValues() (Line: 83)
Civi\Api4\Query\Api4SelectQuery->__construct() (Line: 106)
Civi\Api4\Generic\DAOGetAction->getObjects() (Line: 94)
Civi\Api4\Generic\DAOGetAction->_run() (Line: 72)
Civi\Api4\Provider\ActionObjectProvider->invoke() (Line: 156)
Civi\API\Kernel->runRequest() (Line: 256)
Civi\Api4\Generic\AbstractAction->execute() (Line: 51)
Civi\Search\AfformSearchMetadataInjector::Civi\Search\{closure}()
call_user_func() (Line: 59)
Civi\Angular\ChangeSet::applyHtmlFilters() (Line: 19)
Civi\Angular\ChangeSet::applyResourceFilters() (Line: 295)
Civi\Angular\Manager->getPartials() (Line: 160)
Civi\Angular\Page\Modules->getMetadata() (Line: 82)
Civi\Angular\Page\Modules::buildAngularModules() (Line: 220)
Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (Line: 56)
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (Line: 263)
Civi\Core\CiviEventDispatcher->dispatch() (Line: 168)
CRM_Utils_Hook->invoke() (Line: 2782)
CRM_Utils_Hook::buildAsset() (Line: 226)
Civi\Core\AssetBuilder->render() (Line: 198)
Civi\Core\AssetBuilder->build() (Line: 136)
Civi\Core\AssetBuilder->getUrl() (Line: 169)
Civi\Angular\AngularLoader->Civi\Angular\{closure}() (Line: 394)
CRM_Core_Region->getSettings() (Line: 142)
CRM_Core_Region->{closure}() (Line: 157)
CRM_Core_Region->render() (Line: 37)
civicrm_page_attachments() (Line: 311)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 388)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 312)
Drupal\Core\Render\MainContent\HtmlRenderer->invokePageAttachmentHooks() (Line: 285)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 592)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 286)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 187)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)
```
Expected behaviour
----------------------------------------
It should save the custom field and return to the list of fields in the custom field set.
Environment information
----------------------------------------
* __CiviCRM:__ 5.67.alpha1https://lab.civicrm.org/dev/core/-/issues/4639New approaches to ACL caching (and smart groups?)2024-02-16T16:22:42ZJonGoldNew approaches to ACL caching (and smart groups?)A lot of work has gone into improving the efficiency and frequency of ACL calculation. Let's attack the performance of writing the results to db?
I have a site where contacts change frequently, and ACLed users need to wait for 100,000 ...A lot of work has gone into improving the efficiency and frequency of ACL calculation. Let's attack the performance of writing the results to db?
I have a site where contacts change frequently, and ACLed users need to wait for 100,000 records to be written each time. Disabling opportunistic flushes only partly mitigates the issue.
Here are some ideas:
* Could we move ACL/smart group caching into `\Civi::cache`? Then we could use Redis etc.
* Instead of truncating and writing all contacts - what if we only `INSERT` and `DELETE` changes from the existing cache?
* When a contact's edited, could we just calculate cache for that contact? For any ACL based on a static group, this should be trivial. Even with smart groups/custom code - are there scenarios where we'd ever need to calculate ACLs for anyone but the changed contact and all their related contacts?https://lab.civicrm.org/dev/wordpress/-/issues/145Merge tags for communication preferences and unsubscribe incorrect in Mosaico...2023-10-20T07:58:08ZchristodhunterMerge tags for communication preferences and unsubscribe incorrect in Mosaico mailingsWe have a preferences block in our Mosaico template which looks like this:
`<a href="{CommunicationPreferences.comm_pref_supporter_url}" style="text-decoration: underline; color: #FFFFFF; font-weight: 600;">Update communication preferen...We have a preferences block in our Mosaico template which looks like this:
`<a href="{CommunicationPreferences.comm_pref_supporter_url}" style="text-decoration: underline; color: #FFFFFF; font-weight: 600;">Update communication preferences</a><br>
<a href="{action.unsubscribeUrl}" style="text-decoration: underline; color: #FFFFFF; font-weight: 600;">Opt out of all communications</a>`
When the mailing goes out, the location of the Mosaico template is prepended to the links, so they end up like this:
`<a href="https://www.XXX.org.uk/wp-content/uploads/civicrm/mosaico_tpl/XXX/https://www.XXX.org.uk/civicrm/gdpr/comms-prefs/update/?reset=1&cid=64128&cs=04e32b40536295bc9b37d124ecfe51ce_1696349918_240" style="text-decoration: underline; color: #FFFFFF; font-weight: 600" target="_new">Update communication preferences</a><br>
<a href="https://www.XXX.org.uk/wp-content/uploads/civicrm/mosaico_tpl/XXX/https://www.XXX.org.uk/civicrm/mailing/unsubscribe/?reset=1&jid=&qid=&h=fakehash" style="text-decoration: underline; color: #FFFFFF; font-weight: 600" target="_new">Opt out of all communications</a>`
This is on:
CiviCRM 5.65.2
Mosaico 3.2.1691060437
WordPress 6.3.1https://lab.civicrm.org/dev/core/-/issues/4638Searchkit column styles and icons not working properly with all conditionals ...2023-10-23T13:59:14Zxavi-xalocSearchkit column styles and icons not working properly with all conditionals for custom fields## Overview
_Conditional "if equal" only works in Searchkit column styles and icons for custom fields when value is one-word and doesn't include accents or hyphens_
## Reproduction steps
1. Create a new **set of custom fields** used f...## Overview
_Conditional "if equal" only works in Searchkit column styles and icons for custom fields when value is one-word and doesn't include accents or hyphens_
## Reproduction steps
1. Create a new **set of custom fields** used for **memberships** _\[e.g. **Contribution status**\]_
2. Inside that **set**, create a new **drop-down custom field** _\[e.g. **Status**\]_ with several **multiple choice options**
3. Some of those **multiple choice options** must be one-word _\[e.g. **Active**, **Inactive**\]_ while others must contain whitespaces or hyphens _\[e.g. **Act-ive**, **Blocked and waiting**, **Act ive**\]_
4. Edit/create some **memberships** and choose the values that we have previously created for the **custom field** _\[each **membership** with a **different value**\]_
5. Create a new **Searchkit** that searchs for **memberships**
6. Create a **table** from **Compose Search**
7. In the column corresponding to the **custom field**, add several **styles** for the different values of the field with contidional _if \<custom field\> =_
## Current behaviour
_Searchkit only applies style to one-word values:_
![image.png](/uploads/54749e4a90b60da78cd81cd4fad71816/image.png)
![image.png](/uploads/0ff1abe438af8bda76870f5c5f04a88e/image.png)
## Expected behaviour
_Styles should be applied to all custom field values_
## Environment information
* **Browser:** _Chrome 114.0.5735.133_
* **CiviCRM:** _dmaster_https://lab.civicrm.org/dev/core/-/issues/4637Profile Update from SearchKit doesn't work2023-10-03T20:55:03ZlarsssandergreenProfile Update from SearchKit doesn't workIf you try to use Profile Update in SK, it pops up a modal to select the profile and then just closes when you click continue. Verified this is the behaviour back to at least 5.58. Probably makes more sense to get in-place editing workin...If you try to use Profile Update in SK, it pops up a modal to select the profile and then just closes when you click continue. Verified this is the behaviour back to at least 5.58. Probably makes more sense to get in-place editing working well enough to replace Profile Update, but at least we should remove it if is broken.