Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-08-01T05:03:26Zhttps://lab.civicrm.org/dev/core/-/issues/2569afform - how to refresh display on submit2023-08-01T05:03:26Zeileenafform - how to refresh display on submitI'm not sure if this is a feature request of a documentation request but I seem close to having configuration & display working via afform & search kit for my custom entity 'Monolog' 'out of the box'.
eg git clone https://github.com/ei...I'm not sure if this is a feature request of a documentation request but I seem close to having configuration & display working via afform & search kit for my custom entity 'Monolog' 'out of the box'.
eg git clone https://github.com/eileenmcnaughton/monolog.git
enable & go to
civicrm/monolog
You can see I have a display of configured monologs below a form that allows you to add a new monolog. What I'd like is that the bottom display refreshes once the first is submitted
![image](/uploads/677229d37558e2fca0d18224378f3bc9/image.png)
@totten @colemanwhttps://lab.civicrm.org/dev/core/-/issues/2704Search kit request - calculated field in display2023-07-31T14:53:02ZeileenSearch kit request - calculated field in displayFeature request for the option to have calculated fields in search displays e.g a field that displays SUM('custom_money_field' + 'total_amount') - or COALLESCE('nick_name', 'first_name')Feature request for the option to have calculated fields in search displays e.g a field that displays SUM('custom_money_field' + 'total_amount') - or COALLESCE('nick_name', 'first_name')https://lab.civicrm.org/dev/core/-/issues/2460Ordering of theme CSS files2023-07-30T05:03:20Zaydunsaidan.saunders@squiffle.ukOrdering of theme CSS filesOverview
----------------------------------------
Change the ordering of CSS files so that theme files can easily override core files.
Current behaviour
----------------------------------------
A theme can declare itself through a `myex...Overview
----------------------------------------
Change the ordering of CSS files so that theme files can easily override core files.
Current behaviour
----------------------------------------
A theme can declare itself through a `myextension.theme.php` file which is handled by the civix boilerplate using `hook_civicrm_themes()`. If the theme is active it causes the theme's CSS files to be loaded in place of the default Greenwich theme.
Other CSS files like `contactSummary.css` are loaded after the theme's CSS file making it difficult to override.
Proposed behaviour
----------------------------------------
Change the order so that theme CSS files are loaded after other core CSS so that theme files can do their job more easily.
Example
-------
`contactSummary.css` has:
```
#crm-container div.crm-summary-display_name {
font-size: 19px;
padding-bottom: 10px;
}
```
`civicrm.css` (from Finsbury Park) has:
```
#crm-container div.crm-summary-display_name {
font-size: 1.4rem;
margin: 30px 0 20px;
line-height: 1.4rem;
}
```
The current ordering results in the theme's font-size being overridden by core.
Comments
----------------------------------------
Can someone point me to where the theme's CSS gets added to the page?https://lab.civicrm.org/dev/core/-/issues/2492Search-kit sql error I managed to create2023-07-30T05:03:19ZeileenSearch-kit sql error I managed to createI was able to configure this in the UI (with the custom field in the INNER JOIN) but it died on attempting to search by it
![image](/uploads/40e097316a3ed1ad97d73a411a9347e5/image.png)
Generated mysql - note requires table wmf_donor w...I was able to configure this in the UI (with the custom field in the INNER JOIN) but it died on attempting to search by it
![image](/uploads/40e097316a3ed1ad97d73a411a9347e5/image.png)
Generated mysql - note requires table wmf_donor with field lifetime_usd_total
```
SELECT GROUP_CONCAT(DISTINCT `Contribution_Contact_contact_id_01`.`display_name` SEPARATOR "�" ) AS `GROUP_CONCAT_DISTINCT_Contribution_Contact_contact_id_01_display_name`
FROM civicrm_contribution a
LEFT JOIN `wmf_donor` `wmf_donor` ON Contribution_Contact_contact_id_01.id = wmf_donor.entity_id
INNER JOIN `civicrm_contact` `Contribution_Contact_contact_id_01` ON `a`.`contact_id` = `Contribution_Contact_contact_id_01`.`id` AND `a`.`receive_date` BETWEEN "2019-07-01 00:00:00" AND "2020-06-30 23:59:59" AND `wmf_donor`.`lifetime_usd_total` >= "1000"
LEFT JOIN `civicrm_contribution` `Contribution_Contact_contact_id_01_Contact_Contribution_contact_id_01` ON `Contribution_Contact_contact_id_01`.`id` = `Contribution_Contact_contact_id_01_Contact_Contribution_contact_id_01`.`contact_id` AND `Contribution_Contact_contact_id_01_Contact_Contribution_contact_id_01`.`receive_date` BETWEEN "2020-07-01 00:00:00" AND "2021-06-30 23:59:59"
WHERE (`a`.`is_test` = "0") AND (`a`.`is_template` = "0") AND (`Contribution_Contact_contact_id_01_Contact_Contribution_contact_id_01`.`id` IS NULL)
GROUP BY `a`.`contact_id`
LIMIT 60
OFFSET 0
```
Note I tested the alternatives that might have been constructed - they 'worked' in the sense that they completed with error on my demo sites. On the server I had to kill them as they were taking more than a couple of minutes by the time I killed them. I don't think this query can work without the group filter TBH
```
SELECT GROUP_CONCAT(DISTINCT `Contribution_Contact_contact_id_01`.`display_name` SEPARATOR "�" ) AS `GROUP_CONCAT_DISTINCT_Contribution_Contact_contact_id_01_display_name`
FROM civicrm_contribution a
** INNER JOIN `civicrm_contact` `Contribution_Contact_contact_id_01` ON `a`.`contact_id` = `Contribution_Contact_contact_id_01`.`id` AND `a`.`receive_date` BETWEEN "2019-07-01 00:00:00" AND "2020-06-30 23:59:59"
INNER JOIN `wmf_donor` `wmf_donor` ON a.contact_id = wmf_donor.entity_id AND `wmf_donor`.`lifetime_usd_total` >= "1000"**
LEFT JOIN `civicrm_contribution` `Contribution_Contact_contact_id_01_Contact_Contribution_contact_id_01` ON `Contribution_Contact_contact_id_01`.`id` = `Contribution_Contact_contact_id_01_Contact_Contribution_contact_id_01`.`contact_id` AND `Contribution_Contact_contact_id_01_Contact_Contribution_contact_id_01`.`receive_date` BETWEEN "2020-07-01 00:00:00" AND "2021-06-30 23:59:59"
WHERE (`a`.`is_test` = "0") AND (`a`.`is_template` = "0") AND (`Contribution_Contact_contact_id_01_Contact_Contribution_contact_id_01`.`id` IS NULL)
GROUP BY `a`.`contact_id`
LIMIT 60
OFFSET 0
``
and
```
SELECT GROUP_CONCAT(DISTINCT `Contribution_Contact_contact_id_01`.`display_name` SEPARATOR "�" ) AS `GROUP_CONCAT_DISTINCT_Contribution_Contact_contact_id_01_display_name`
FROM civicrm_contribution a
** INNER JOIN `wmf_donor` `wmf_donor` ON a.contact_id = wmf_donor.entity_id AND `wmf_donor`.`lifetime_usd_total` >= "1000"
INNER JOIN `civicrm_contact` `Contribution_Contact_contact_id_01` ON `a`.`contact_id` = `Contribution_Contact_contact_id_01`.`id` AND `a`.`receive_date` BETWEEN "2019-07-01 00:00:00" AND "2020-06-30 23:59:59"**
LEFT JOIN `civicrm_contribution` `Contribution_Contact_contact_id_01_Contact_Contribution_contact_id_01` ON `Contribution_Contact_contact_id_01`.`id` = `Contribution_Contact_contact_id_01_Contact_Contribution_contact_id_01`.`contact_id` AND `Contribution_Contact_contact_id_01_Contact_Contribution_contact_id_01`.`receive_date` BETWEEN "2020-07-01 00:00:00" AND "2021-06-30 23:59:59"
WHERE (`a`.`is_test` = "0") AND (`a`.`is_template` = "0") AND (`Contribution_Contact_contact_id_01_Contact_Contribution_contact_id_01`.`id` IS NULL)
GROUP BY `a`.`contact_id`
LIMIT 60
OFFSET 0
```https://lab.civicrm.org/dev/core/-/issues/2551Proposal - add support for defining 'fields' within json blobs2023-07-29T05:03:23ZeileenProposal - add support for defining 'fields' within json blobsThis covers a discussion at https://chat.civicrm.org/civicrm/pl/pt4nizctz7db8xecrq1triy38e
whereby we have a few entities with configuration options that can't be adequately captured in fields. We sort of make this work with payment_pro...This covers a discussion at https://chat.civicrm.org/civicrm/pl/pt4nizctz7db8xecrq1triy38e
whereby we have a few entities with configuration options that can't be adequately captured in fields. We sort of make this work with payment_processor by having fields that we kinda rename via the payment_processor_type table and as long as there are only 4 fields it's fine. However, it's not a great structure.
I'm working on a monolog extension and like payment processor and geocoders the configuration options desired by the service varies - but it's not 100% open ended - ie we don't want to just pass through 'whatever'. The best data model to store this is a json blob- however, we then have no UI knowledge of what would go in there and afform is unable to present this field in a UI-friendly way
We looked at the idea of having something like
```
<field>
<name>contact_type</name>
</field>
<field>
<name>contact_sub_type</name>
</field>
<field>
<name>options</name>
<type>text</type>
<serialize>json</serialize>
<schema-callback>CRM_My_Schema::getFields</schema-callback>
<schema-watch>contact_type,contact_sub_type</schema-watch>
</field>
```
Where the UI layer would need to implement the ability to watch the fields defined as schema-watch and update the UI based on it (presumably only for fields that are ALSO already displayed)
A simple xml definition of subfields might look like https://gist.github.com/totten/84c140310d4adc9b5d3842b5d3364a9e - which could be rendered by a generic function.
@totten @seamuslee - anything else you think is important to transfer over here?https://lab.civicrm.org/dev/core/-/issues/2545Free memberschip sign up (eg. prayerteam) assumes contribution involved2023-07-29T05:03:22Zmagnolia61Free memberschip sign up (eg. prayerteam) assumes contribution involvedOverview
----------------------------------------
Managing memberships in civicrm currently pretty much assumes a contribution is involved. Which is not the case for many forms of memberships. It is even not possible to create a membersh...Overview
----------------------------------------
Managing memberships in civicrm currently pretty much assumes a contribution is involved. Which is not the case for many forms of memberships. It is even not possible to create a membership sign up page without using a contribution page!
Right now for our summercamps it's pretty strange for people to sign up to become a member of the prayerteam to "review their contribution". Although technically they give their contribution in the form of prayer one could argue.
Example use-case
----------------------------------------
1. Create a membership sign up page in CiviCRM for a free membership
2. Look at the wording of the sign-up button
Current behaviour
----------------------------------------
The current button to sign up for a membership says 'review your contribution'.
Proposed behaviour
----------------------------------------
The button text here should be editable, or for signing up for free memberships a different default wording should be used.
Comments
----------------------------------------
Consistent UI would be I guess to be able to create a membership sign up page from the membership menu. Underwater this could be a contribution page with or without fees involved.https://lab.civicrm.org/dev/core/-/issues/3721Add Entity Reference custom field type (implementing EntityRef QuickForm elem...2023-07-28T15:04:53ZjensschuppeAdd Entity Reference custom field type (implementing EntityRef QuickForm element type)Overview
----------------------------------------
`EntityRef` ist a QuickForm element type being used to reference CiviCRM entities in several forms. But there is no custom field type implementing this, apart from the *ContactReference* ...Overview
----------------------------------------
`EntityRef` ist a QuickForm element type being used to reference CiviCRM entities in several forms. But there is no custom field type implementing this, apart from the *ContactReference* custom field type, which is (surprise!) restricted to referencing contacts.
Allowing users to model their "real world" use cases in CiviCRM using the UI without mis-using entity types for things they have not been intended for, just because you need some kind of relation between two things, would be a great improvement.
At this time, we are evaluating requirements for a current project where this might be needed, but wanted to discuss our thoughts with some Core people, especially @colemanw who already offered help with reviewing code, before we start, because this will have to be a PR to Core, probably with some refactoring involved.
Example use-case
----------------------------------------
With either Core or custom entities (such as multi-value custom field groups or [ECK entities](https://github.com/systopia/de.systopia.eck)), you might want to model references to different "things" in your business logic, not just contacts.
Imagine a *Project* entity that you would like to add references to contacts, but also to specific activities, contributions, etc. - without a *Project* having to be a contact type or a *Case*, or a *Campaign* because that might not be suitable because of reasons.
Current behaviour
----------------------------------------
Only contact entites can be referenced in custom fields.
Proposed behaviour
----------------------------------------
* Add a custom field type *Entity Reference* with configurable
* entity type
* label property (a property of the selected entity type that will be used for displaying the referenced entity when rendering the field value)
* entity filters (API parameters for the entity)
* Migrate the *Contact Reference* custom field type to be an *Entity Reference* field type with *Contact* as the referenceable entity type and the `display_name` as the label property
* Maybe allow custom field types be extendable, i.e. allow extensions to define additional custom field types
* Maybe add support for SearchKit (e.g. for defining filters or providing widget displays)
Technical Details
----------------------------------------
* *Contact Reference* fields currently store their API filters in the `filter` column of the `civicrm_custom_field` table. The entity itself might be just added there
* The label/title property might be stored in the `attributes` column, which is used for different stuff depending on the custom field type. Alternatively, a new column could be added to the `civicrm_custom_field` table (just as there are columns for other field types), although this is not that good of a design IMO
* Alternatively, all field-type-specific configuration could be migrated into a generic JSON-formatted `configuration` or `properties` column, at least for this new field type for now. There are many columns only needed for specific field types:
* `mask`
* `options_per_line`
* `text_length`
* `start_date_years`
* `end_date_years`
* `date_format`
* `time_format`
* `note_columns`
* `note_rows`
* `option_group_id`
* `filter`
I think adding a new custom field type that stores its configuration in existing columns would be a good first step. Any thoughts on that?
After storing information about a custom field in civicrm_custom_field, a table is created for each group or set of custom fields to store the value of each field for each instance of the set of custom fields. The name of this table is stored in custom_field_group.table_name. This table correlates each record of custom field values with the entity they extend using meta-data about the custom field set to identify the table extended (I think there is a translation of value in custom_field_group.extends to the table name of the entity extended) and the id of the instance extended.
It would be good to support regular CiviCRM entities that are implemented as tables as well as the higher order entities of Order and Payment that have id fields and APIs but not table implementations.
Funding
---------------------
Required: 40
Pledged:
- Third Sector Design - 8
- Systopia - 18
- Megaphone tech - 4 (depending on timeframe)
- JMA - 10
- Humanists UK - 55.60.0https://lab.civicrm.org/dev/core/-/issues/2251Fatal error Incorrect datetime value: '0' for column 'transaction_date' when ...2023-07-28T05:03:22ZDaveDFatal error Incorrect datetime value: '0' for column 'transaction_date' when editing a participant record and recording payment with no received date1. Find a participant record that does not have payment recorded.
1. Edit it.
1. Minor problem: The payment section should be hidden until you click the record payment checkbox, but it suggests possibly something wrong with the javascrip...1. Find a participant record that does not have payment recorded.
1. Edit it.
1. Minor problem: The payment section should be hidden until you click the record payment checkbox, but it suggests possibly something wrong with the javascript. Similar thing with send confirmation receipt.
* Also if you're editing one from the stock sample data you get the word "Total" hanging alone in midair above it, but this might be a separate issue with the sample data which maybe didn't get updated for some kind of change in what it's looking for here. Doesn't happen with newly created ones.
1. Bigger problem: If you check the box and then fill out the amount (just the amount) and click save you get `Incorrect datetime value: '0' for column 'transaction_date' at row 1`.
* You can get this on a brand new participant registration too if you manually blank out the default received date, but you probably wouldn't do that in real life. Just it's obviously pointing to some incorrect handling of blanks.
I'm marking it a regression since doesn't happen in 5.28. And interestingly the javascript for the send confirmation checkbox works in 5.28, although the record payment checkbox is the same as master.
```
0 .../CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
1 .../vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
2 .../vendor/pear/db/DB.php(998): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...")
3 .../vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...")
4 .../vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...", "DB_Error", TRUE)
5 .../vendor/pear/db/DB/common.php(1928): PEAR->__call("raiseError", (Array:7))
6 .../vendor/pear/db/DB/mysqli.php(936): DB_common->raiseError(-1, NULL, NULL, "INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...", "1292 ** Incorrect datetime value: '0' for column 'transaction_date' at row 1")
7 .../vendor/pear/db/DB/mysqli.php(406): DB_mysqli->mysqliRaiseError()
8 .../vendor/pear/db/DB/common.php(1234): DB_mysqli->simpleQuery("INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...")
9 .../packages/DB/DataObject.php(2696): DB_common->query("INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...")
10 .../packages/DB/DataObject.php(1245): DB_DataObject->_query("INSERT INTO `civicrm_financial_item` (`transaction_date` , `contact_id` , `de...")
11 .../CRM/Core/DAO.php(638): DB_DataObject->insert()
12 .../CRM/Financial/BAO/FinancialItem.php(142): CRM_Core_DAO->save()
13 .../CRM/Contribute/BAO/Contribution.php(1137): CRM_Financial_BAO_FinancialItem::create((Array:9), NULL, (Array:1))
14 .../CRM/Contribute/BAO/Contribution.php(3765): CRM_Contribute_BAO_Contribution::createFinancialItemsForLine((Array:31), "changeFinancialType", (Array:1), (Array:1), (Array:30), FALSE, (Array:1), 8)
15 .../CRM/Contribute/BAO/Contribution.php(3595): CRM_Contribute_BAO_Contribution::updateFinancialAccounts((Array:31), "changeFinancialType")
16 .../CRM/Contribute/BAO/Contribution.php(215): CRM_Contribute_BAO_Contribution::recordFinancialAccounts((Array:31))
17 .../CRM/Contribute/BAO/Contribution.php(479): CRM_Contribute_BAO_Contribution::add((Array:31))
18 .../CRM/Event/Form/Participant.php(1330): CRM_Contribute_BAO_Contribution::create((Array:31))
19 .../CRM/Event/Form/Participant.php(944): CRM_Event_Form_Participant->submit((Array:29))
20 .../CRM/Core/Form.php(513): CRM_Event_Form_Participant->postProcess()
21 .../CRM/Core/QuickForm/Action/Upload.php(152): CRM_Core_Form->mainProcess()
22 .../CRM/Core/QuickForm/Action/Upload.php(119): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Event_Form_Participant), "upload")
23 .../packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Event_Form_Participant), "upload")
24 .../packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_Participant), "upload")
25 .../CRM/Core/Controller.php(347): HTML_QuickForm_Page->handle("upload")
26 .../CRM/Event/Page/Tab.php(100): CRM_Core_Controller->run()
27 .../CRM/Event/Page/Tab.php(166): CRM_Event_Page_Tab->edit()
28 .../CRM/Core/Invoke.php(312): CRM_Event_Page_Tab->run((Array:4), NULL)
29 .../CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:12))
30 .../CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
31 .../drupal/civicrm.module(459): CRM_Core_Invoke::invoke((Array:4))
32 .../includes/menu.inc(527): civicrm_invoke("contact", "view", "participant")
33 .../index.php(21): menu_execute_active_handler()
34 {main}
```https://lab.civicrm.org/dev/core/-/issues/2520ACL restricted users lose access to contacts when editing via search list2023-07-28T05:03:21ZDetlev SieberACL restricted users lose access to contacts when editing via search listOverview
----------------------------------------
When using ACL restriction for access to contacts, the following problem occurs:
After searching contacts and editing a contact via the edit link on the search list, CiviCRM tries to save...Overview
----------------------------------------
When using ACL restriction for access to contacts, the following problem occurs:
After searching contacts and editing a contact via the edit link on the search list, CiviCRM tries to save the group, which is used to handle the ACL access. However, since this user doesn't have the permission to edit the group, the group is automatically removed from the contact when it is saved.
This only happens when the contact is edited using the edit link on the search list, instead editing using the summary page works well.
Reproduction steps
----------------------------------------
1. Create ACL permission (edit group of contacts, resulting in member of group A is allowed to edit contacts in group B only).
1. Search all contacts, click on edit-Link of the first contact in search list.
1. Change Address, click on SAVE
1. Contact is save, but membership in group B is removed, the user cannot view the contact anymore.
Current behaviour
----------------------------------------
1. See above: the ACL-restricted user has no access to the contact anymore.
1. When editing via summary screen, everything works fine.
1. Strangely, when the user is assigned to another ACL rule, everything works fine.
Expected behaviour
----------------------------------------
1. After editing, the edited contact should stay in group B.
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. -->
* __CiviCRM:__ _5.35.1_
* __PHP:__ _7.3_
* __CMS:__ _5.7_
* __Database:__ _MySQL 5.7.7_
Comments
----------------------------------------
I believe, this issue was introduced with the change of ACL's (permission to edit group) recently.https://lab.civicrm.org/dev/core/-/issues/4298CiviMail - throw 400 (Bad Request) rather than 500 (Server Error) if public u...2023-07-27T17:17:06ZufundoCiviMail - throw 400 (Bad Request) rather than 500 (Server Error) if public url endpoints hit with bad parametersOverview
----------------------------------------
Urls for CiviMail public endpoints like `civicrm/mailing/open` have a few required parameters, identifying the user / url etc. How should we handle if params aren't valid?
Current behavi...Overview
----------------------------------------
Urls for CiviMail public endpoints like `civicrm/mailing/open` have a few required parameters, identifying the user / url etc. How should we handle if params aren't valid?
Current behaviour
----------------------------------------
Current standard behaviour Civi-wide for missing/invalid params is a `CRM_Core_Exception`, which in turn results in a 500 server error.
Proposed behaviour
----------------------------------------
I think a 400 Bad Request error is more appropriate, for the "public" CiviMail links in particular.
Comments
----------------------------------------
It also helps with detecting and blocking spammy click behaviour, which I've seen with random permutations of parameters and things like this.5.65.0https://lab.civicrm.org/dev/core/-/issues/2544Move Contact Layout Editor to a core extension2023-07-27T05:03:20ZcolemanwMove Contact Layout Editor to a core extensionAt some point, it would be good to get rid of the hard-coded contact summary screen, and just let the Contact Layout Editor manage the display.
As an intermediary step, it probably makes sense to move Contact Layout Editor into the core...At some point, it would be good to get rid of the hard-coded contact summary screen, and just let the Contact Layout Editor manage the display.
As an intermediary step, it probably makes sense to move Contact Layout Editor into the core tarball (via distmaker import), or the `ext/` directory of the core repo.
Today might not be the day for that, but logging some notes on it anyway:
- Today, the only benefit of moving the extension into core is it would be more visible to end-users.
However, in the future, benefits might include:
- Easier simultaneous development of extension & core with no version conflicts.
- Possible to enable the extension by default.
- Possible to rip out redundant functionality from core.
Challenges
- There isn't an easy upgrade path when an extension is moved into core; you end up with 2 copies of the extension
- Currently, the extension scanner does not give the core `ext/` directory top priority, which means older versions of the extension outside core would take precedence.
Considerations
- As handy as it is, Contact Layout Editor still uses smarty to render the page.
- Maybe the end-game is to make that page an Afform instead. However, that day is a long way off given Afform's current capabilities.https://lab.civicrm.org/dev/core/-/issues/2526Misleading error message about permissions when CiviReport disabled2023-07-27T05:03:20ZphilmckMisleading error message about permissions when CiviReport disabledOverview
----------------------------------------
If the CiviReport component is disabled (System Settings > Components) and you try to view the result of a completed mailing (Mailings > Scheduled and Sent Mailings > [Choose mailing] > R...Overview
----------------------------------------
If the CiviReport component is disabled (System Settings > Components) and you try to view the result of a completed mailing (Mailings > Scheduled and Sent Mailings > [Choose mailing] > Report > [Various "Report" links]) a misleading error message "You do not have permission to access this page" is displayed. The error log in /wp-content/uploads/civicrm/ConfigAndLog/ shows a fatal error with a CRM_Core_Error::handleUnhandledException but no clue as to the origin.
Reproduction steps
----------------------------------------
1. Disable the CiviReport component at System Settings > Components
2. Choose a completed mailing in Mailings > Scheduled and Sent Mailings and click "Report"
3. Select any of the "Report" links (e.g. for Click-throughs)
4. Error "You do not have permission to access this page" is displayed.
Current behaviour
----------------------------------------
Error "You do not have permission to access this page" is displayed. Log shows CRM_Core_Error::handleUnhandledException.
Expected behaviour
----------------------------------------
This exception is nothing to do with permissions - I wasted an hour or so checking all the permissions settings and googling for previous reports and I'm sure I'm not the only one. I was logged in as an Administrator and so permissions shouldn't have been an issue and I wouldn't expect an Administrator or Super User to ever see that message.
I would expect a more informative error message about the disabled ~~CviRules~~ CiviReport component. Even better, the "Report" links could be disabled and replaced with help information if the required component is not enabled. In addition, it should be impossible to disable the component if core functionality depends on it.
Environment information
----------------------------------------
* __Browser:__ Chrome 89
* __CiviCRM:__ 5.36.0
* __PHP:__ 7.4
* __CMS:__ WordPress 5.7
* __Database:__ MariaDB 10.4.18
* __Web Server:__ Apache 2.4.46https://lab.civicrm.org/dev/core/-/issues/2753Erroneous change detection for system workflow message templates2023-07-27T01:34:01ZfkohrtErroneous change detection for system workflow message templatesAfter updating CiviCRM from `5.37.2` to `5.40.1` and running `cv upgrade:db` afterwards, I receive the following pre-upgrade message:
> The default copies of the message templates listed below will be updated to
> handle new features or...After updating CiviCRM from `5.37.2` to `5.40.1` and running `cv upgrade:db` afterwards, I receive the following pre-upgrade message:
> The default copies of the message templates listed below will be updated to
> handle new features or correct a problem. Your installation has customized
> versions of these message templates, and you will need to apply the updates
> manually after running this upgrade. Click here [1] for detailed
> instructions.
>
> * _Petition - need verification_ - Fix Petition Confirmation email having
> a blank space at the end of url
> * _Personal Campaign Pages - Admin Notification_ - Fix Pledge and PCP urls
> to go to the front end site rather than backend site
> * _Pledges - Payment Reminder_ - Fix Pledge and PCP urls to go to the
> front end site rather than backend site
>
>
>
> Links:
> ------
> [1] https://docs.civicrm.org/user/en/latest/email/message-templates/#modifying-system-workflow-message-templates
But following the guide "[Updating system workflow message templates](https://docs.civicrm.org/sysadmin/en/latest/upgrade/#updating-system-workflow-message-templates)", I cannot identify any templates that were actually changed (and I cannot recall changing them either):
![Message_Templates](/uploads/6f69d43b8d0d80c6826845cec718e817/Message_Templates.png)
Furthermore, I cannot find any `*.msg_template` files for CiviCRM 5.x as suggested by the documentation:
```sh
$ find . -name '*\.msg_template*'
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.6.9.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.7.5.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.5.0.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.5.alpha1.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.6.3.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.6.alpha4.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.7.alpha1.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.7.19.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.7.14.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.7.23.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.7.4.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.7.11.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.7.beta8.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.6.alpha1.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.6.10.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.7.beta1.msg_template
./vendor/civicrm/civicrm-core/CRM/Upgrade/4.5.beta2.msg_template
```
It feels like there is something wrong with the "detection" of changes made to the default templates.5.65.0https://lab.civicrm.org/dev/wordpress/-/issues/107WordPress basepage_render shouldn't remove the 'the_content' filter2023-07-26T15:45:51ZchriscantWordPress basepage_render shouldn't remove the 'the_content' filterOn a WordPress CiviCRM site using the Avada theme, removing the 'the_content' filter in basepage_render() in here causes a problem:
https://github.com/civicrm/civicrm-wordpress/blob/master/includes/civicrm.basepage.php
basepage_render()...On a WordPress CiviCRM site using the Avada theme, removing the 'the_content' filter in basepage_render() in here causes a problem:
https://github.com/civicrm/civicrm-wordpress/blob/master/includes/civicrm.basepage.php
basepage_render() is called from wp_trim_excerpt() first and then is called again somewhere to get the content to display the page. If the filter removes itself then the page content isn't replaced with the CiviCRM output.
When displaying /civicrm pages the holding page content is erroneously shown: "Do not delete this page. Page content is generated by CiviCRM."
So this commit needs reversing, which looks like it has only recently been included in 5.39.0:
https://github.com/civicrm/civicrm-wordpress/commit/16137ebf4038e901fb4981d7de2c328d96411fe9https://lab.civicrm.org/dev/core/-/issues/2536Empty extension requires tag misevaluated2023-07-26T05:03:26ZeileenEmpty extension requires tag misevaluatedI'm seeing
![image](/uploads/9ca2d57e51026f71ccf522fc6a6d55cc/image.png)
In the UI it seems to be the carriage return in the tag causing the issue
![image](/uploads/19c9c8f5e5fb469af62f846a747b9180/image.png)
But contactlayoutedit xm...I'm seeing
![image](/uploads/9ca2d57e51026f71ccf522fc6a6d55cc/image.png)
In the UI it seems to be the carriage return in the tag causing the issue
![image](/uploads/19c9c8f5e5fb469af62f846a747b9180/image.png)
But contactlayoutedit xml is unchangedhttps://lab.civicrm.org/dev/core/-/issues/2538APiv4 fk vs pseudoconstant2023-07-26T05:03:25ZeileenAPiv4 fk vs pseudoconstant@colemanw we recently removed the pseudoconstant for campaign_id from a bunch of fields but there is a benefit to the pseudoconstants I didn't realise - with both declared I can use
```
CRM.api4({participants: ['Participant', 'get', {
...@colemanw we recently removed the pseudoconstant for campaign_id from a bunch of fields but there is a benefit to the pseudoconstants I didn't realise - with both declared I can use
```
CRM.api4({participants: ['Participant', 'get', {
where: [["status_id:name", "=", 'Attended']],
limit: 25
}]}).then(function(batch) {
// do something with batch.participants array
}, function(failure) {
// handle failure
});
```
<field>
<name>status_id</name>
<uniqueName>participant_status_id</uniqueName>
<title>Status ID</title>
<headerPattern>/(participant.)?(status)$/i</headerPattern>
<import>true</import>
<type>int unsigned</type>
<export>true</export>
<required>true</required>
<default>1</default>
<comment>Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status = Registered.</comment>
<add>1.7</add>
<pseudoconstant>
<table>civicrm_participant_status_type</table>
<keyColumn>id</keyColumn>
<labelColumn>label</labelColumn>
</pseudoconstant>
<html>
<type>Select</type>
<label>Status</label>
</html>
</field>
But the same doesn't work on campaign anymore
```
CRM.api4('Participant', 'get', {
where: [["campaign_id:name", "IS NULL"]],
limit: 25
}).then(function(participants) {
// do something with participants array
}, function(failure) {
// handle failure
});
```
I think this is a bigger issue on create where you might want to pass a machine name to a required FK field - in my case it looks like (
```
civicrm_api4('SearchDisplay', 'create', [
'values' => [
'name' => 'Equivalent_names',
'label' => 'Equivalent names',
'saved_search_id:name' => 'Equivalent_names',
'type' => 'table',
'settings' => '{"limit":20,"pager":true,"columns":[{"key":"name_a","label".....}'
]
]);
```https://lab.civicrm.org/dev/core/-/issues/2530WordPress fresh install, civicrm.settings.php set the variable CIVICRM_UF_BAS...2023-07-25T05:03:18Zjustinfreeman (Agileware)WordPress fresh install, civicrm.settings.php set the variable CIVICRM_UF_BASEURL without a trailing slash http://localhost/wordpress and not http://localhost/wordpress/ which caused resource URLs to be wrongWordPress fresh install, civicrm.settings.php set the variable CIVICRM_UF_BASEURL without a trailing slash http://localhost/wordpress and not http://localhost/wordpress/ which caused resource URLs to be wrong. CiviCRM 5.36.0WordPress fresh install, civicrm.settings.php set the variable CIVICRM_UF_BASEURL without a trailing slash http://localhost/wordpress and not http://localhost/wordpress/ which caused resource URLs to be wrong. CiviCRM 5.36.0https://lab.civicrm.org/dev/core/-/issues/2529WordPress fresh install, cannot select "Load sample data" checkbox - it canno...2023-07-25T05:03:18Zjustinfreeman (Agileware)WordPress fresh install, cannot select "Load sample data" checkbox - it cannot be checked, no sample data can be loadedWordPress fresh install, cannot select "Load sample data" checkbox - it cannot be checked, no sample data can be loaded. This was tested on CiviCRM 5.36.0WordPress fresh install, cannot select "Load sample data" checkbox - it cannot be checked, no sample data can be loaded. This was tested on CiviCRM 5.36.0https://lab.civicrm.org/dev/core/-/issues/2525Add Status Check comparing max input vars and permissions checks2023-07-24T05:03:23ZseamusleeAdd Status Check comparing max input vars and permissions checksMore details to followMore details to followseamusleeseamusleehttps://lab.civicrm.org/dev/core/-/issues/2519The field Limit or Add Recipients is missing for Activity scheduled reminders.2023-07-24T05:03:22ZyashodhaThe field Limit or Add Recipients is missing for Activity scheduled reminders.The field _Limit or Add Recipients_ is missing for Activity scheduled reminders.
Any other reminder
![any_other_reminder](/uploads/d6c3f15f518bf12f7d3848a9bbb2dcc4/any_other_reminder.png)
Activity reminder
![activity_reminder](/uploa...The field _Limit or Add Recipients_ is missing for Activity scheduled reminders.
Any other reminder
![any_other_reminder](/uploads/d6c3f15f518bf12f7d3848a9bbb2dcc4/any_other_reminder.png)
Activity reminder
![activity_reminder](/uploads/8b0359204ddb3c67626b4dd94e22b435/activity_reminder.png)
This results in _limit to_ field always getting set to 1. This results in buggy behaviour as the reminders go out to intersection of activity contacts and specified recipients only.