Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-04-23T20:13:36Zhttps://lab.civicrm.org/dev/core/-/issues/3014Proposal: Explore adding hooks to allow plugins to track database queries, e....2023-04-23T20:13:36ZBradley TaylorProposal: Explore adding hooks to allow plugins to track database queries, e.g. to enable integration with plugins like Query MonitorOne of my favourite plugins in the WordPress space is [Query Monitor](https://wordpress.org/plugins/query-monitor/). Among other things it allows you to monitor at a glance what database calls have been made for a specific request, makin...One of my favourite plugins in the WordPress space is [Query Monitor](https://wordpress.org/plugins/query-monitor/). Among other things it allows you to monitor at a glance what database calls have been made for a specific request, making it easy to spot inefiencient code and queries.
Currently CiviCRM does not have anything analogous to this. The [CiviCRM docs recommend using the MySQL query log](https://docs.civicrm.org/dev/en/latest/tools/debugging/#viewing-a-query-log-from-mysql), but this isn't easy to view at a glance, and it doesn't make it easy to correlate queries to sepecific web requests. CiviCRM's database queries don't show in Query Monitor because CiviCRM does not use WordPress' `WPDB` class. Therefore, I've been looking to see if it would be possible to extend Query Monitor to know about CiviCRM's database queries. Its reasonably easy to make this work if you patch the `CRM_Core_DAO::query` method to the following:
```
public function query($query, $i18nRewrite = TRUE) {
// rewrite queries that should use $dbLocale-based views for multi-language installs
global $wpdb, $dbLocale, $_DB_DATAOBJECT;
if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
$wpdb->timer_start();
}
if (empty($_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5])) {
// Will force connection to be populated per CRM-20541.
new CRM_Core_DAO();
}
$conn = &$_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5];
$orig_options = $conn->options;
$this->_setDBOptions($this->_options);
if ($i18nRewrite and $dbLocale) {
$query = CRM_Core_I18n_Schema::rewriteQuery($query);
}
$ret = parent::query($query);
if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
$wpdb->num_queries++;
$wpdb->queries[] = array(
$query,
$wpdb->timer_stop(),
$wpdb->get_caller(),
$wpdb->time_start,
array(),
'trace' => new QM_Backtrace( array(
'ignore_frames' => 1,
)),
'result' => is_countable($ret) ? count($ret) : 1
);
}
$this->_setDBOptions($orig_options);
return $ret;
}
```
Esentially the `$wpdb->queries` array is being populated with knowledge of the CiviCRM database queries, which query monitor can then read.
With this in place you can start to see some interesting insights. For example, we can see that the new mailing screen contains a number of database queries that are reapeated 40 times each, which is probably ripe for optimisation:
![Screenshot_2022-01-02_at_14.13.41](/uploads/117036cbf7cb970e93c7399eeb436f64/Screenshot_2022-01-02_at_14.13.41.png)
The WordPress admin bar shows the total count of queries (243) combined from both CiviCRM and WordPress.
Hacking the core files works for my purposes, but obviously doesn't allow for this to be packaged into a distributable plugin. Therefore, I think it'd be cool if there were a generic hook at the end of `CRM_Core_DAO::query` which could be used to save the query information in a format ameanable to Query Monitor. Alternatively CiviCRM could copy WordPress idea of the `$wpdb->queries` array, creating an array of queries which plugins like Query Monitor could make use of (in WordPress this is behind a flag so there is no performance hit when not in a development environment).
I've not given too much thought to exactly how this hook should look, but before I take this further (e.g. to the Pull Request state) it'd be good to get some views from the community:
- Is this something others in the community would find useful if this were distributed as a plugin?
- Does anyone know of plugins similar to Query Monitor in the Drupal or Joomla space which may benifit from this type of solution?
- Would people find this sort of hook useful for other use cases - for example, for writing debugging tools native to CiviCRM.
Keen to get others views on this one. I'll be interested to know what people think.https://lab.civicrm.org/dev/core/-/issues/3013Can't create > 25 thank-you letters from contributions2021-12-30T03:41:35ZJonGoldCan't create > 25 thank-you letters from contributionsThis is a regression in 5.44 from https://github.com/civicrm/civicrm-core/pull/21816. API3 25 record limit bug.
### Steps to replicate
* Do a contribution search that yields > 25 records.
* Create PDF thank-you letters from all records...This is a regression in 5.44 from https://github.com/civicrm/civicrm-core/pull/21816. API3 25 record limit bug.
### Steps to replicate
* Do a contribution search that yields > 25 records.
* Create PDF thank-you letters from all records.
Get this error:
```
TypeError: Argument 2 passed to CRM_Contribute_Form_Task_PDFLetter::resolveTokens() must be of the type int, null given, called in /home/jon/local/crcl/htdocs/sites/all/modules/civicrm/CRM/Contribute/Form/Task/PDFLetter.php on line 436 in CRM_Contribute_Form_Task_PDFLetter->resolveTokens() (line 553 of /home/jon/local/crcl/htdocs/sites/all/modules/civicrm/CRM/Contribute/Form/Task/PDFLetter.php).
```JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3012Expose email on hold as filter for reports2023-11-14T05:03:22ZyashodhaExpose email on hold as filter for reportsIt would be helpful to have email on hold exposed as filter for reportsIt would be helpful to have email on hold exposed as filter for reportsyashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/3011SMS search action results in queue overflow error2023-11-18T05:03:28ZandyburnsSMS search action results in queue overflow errorhttps://civicrm.stackexchange.com/questions/40973/sms-search-v-pre-built-group-queue-overflow/40974#40974
The `SMS - schedule/send` should behave just like CiviMail when doing a search action mailing and create a hidden group.https://civicrm.stackexchange.com/questions/40973/sms-search-v-pre-built-group-queue-overflow/40974#40974
The `SMS - schedule/send` should behave just like CiviMail when doing a search action mailing and create a hidden group.https://lab.civicrm.org/dev/backdrop/-/issues/72CiviCRM Contact Layout Editor won't save layouts.2022-10-21T07:33:50ZbgmCiviCRM Contact Layout Editor won't save layouts.*Created by: jenlampton*
Starting this issue incase others are having the same problem. Note from a civiCRM user:
> I installed the CiviCRM Contact Layout Editor extension. It seems to work fine while creating a new layout, and correc...*Created by: jenlampton*
Starting this issue incase others are having the same problem. Note from a civiCRM user:
> I installed the CiviCRM Contact Layout Editor extension. It seems to work fine while creating a new layout, and correctly saves "blocks" of fields out of which the customized layouts are built. But I can't seem to save the layouts themselves. The "Saving" message with a spinning symbol just turns apparently indefinitely, and the layout neither takes effect nor reappears when I return to the Layout Editor.
I am going to see if I can find any error messages and will report back here with more when I have it.https://lab.civicrm.org/dev/core/-/issues/3010authx: Users that are disabled/blocked in the cms can still log in, even if t...2023-11-07T10:19:00ZDaveDauthx: Users that are disabled/blocked in the cms can still log in, even if the `XXX_user` setting is set to "require"At https://docs.civicrm.org/dev/en/latest/framework/authx/#settings you have a choice for whether the cms user needs to exist in order to log in, but even if you set it to "require", it will let a disabled/blocked user log in. My expecta...At https://docs.civicrm.org/dev/en/latest/framework/authx/#settings you have a choice for whether the cms user needs to exist in order to log in, but even if you set it to "require", it will let a disabled/blocked user log in. My expectation is that it would work the same way as regular logins if I choose "require" as the policy.
Some cms's may also allow other ways to block users, such as throttling or temporary IP bans. I would argue it should respect those too - i.e. if the cms doesn't allow login then authx shouldn't (when using "require").https://lab.civicrm.org/dev/core/-/issues/3009authx: Proposal: Make "require" the default user policy instead of "optional"2023-11-04T05:03:19ZDaveDauthx: Proposal: Make "require" the default user policy instead of "optional"If you look at https://docs.civicrm.org/dev/en/latest/framework/authx/#settings the default setting for the `XXX_user` settings is "optional" which means a corresponding cms user doesn't need to exist in order to log in. This seems unint...If you look at https://docs.civicrm.org/dev/en/latest/framework/authx/#settings the default setting for the `XXX_user` settings is "optional" which means a corresponding cms user doesn't need to exist in order to log in. This seems unintuitive as a default. My expectation is that it would work the same way as regular logins by default, so should default to "require".https://lab.civicrm.org/dev/core/-/issues/3221SearchKit: In-place edit for custom dropdown field - can't blank it out2022-04-22T18:15:33ZDaveDSearchKit: In-place edit for custom dropdown field - can't blank it outIf you have a search display with a dropdown custom field with in-place edit enabled and the field is defined as not required, you should be able to blank it out. But there is no "X" icon or "-none-" choice.If you have a search display with a dropdown custom field with in-place edit enabled and the field is defined as not required, you should be able to blank it out. But there is no "X" icon or "-none-" choice.https://lab.civicrm.org/dev/core/-/issues/3282SearchKit: In-place edit for custom date field - can't select a date2022-04-22T15:53:43ZDaveDSearchKit: In-place edit for custom date field - can't select a dateIf you have a search display with a custom date field with in-place edit enabled and you try to use the datepicker the table just completely disappears and it says unknown path.If you have a search display with a custom date field with in-place edit enabled and you try to use the datepicker the table just completely disappears and it says unknown path.5.46.0https://lab.civicrm.org/dev/core/-/issues/3008Load create cms user for checksum contact without uf_id2023-11-19T20:45:34ZjitendraLoad create cms user for checksum contact without uf_idTo replicate -
- Create a profile with Account creation required = 1.
- Add this profile to contribution or event page.
- Create a contact A without a CMS user record.
- Load the contribution page with checksum of contact A.
- The profi...To replicate -
- Create a profile with Account creation required = 1.
- Add this profile to contribution or event page.
- Create a contact A without a CMS user record.
- Load the contribution page with checksum of contact A.
- The profile wont load the username field even when the checksum contact does not have a cms user attached to it.
![image](/uploads/c6af3e369abe278101f21e831471ea98/image.png)https://lab.civicrm.org/dev/core/-/issues/3007Use of translation functions in menu logic is... odd.2023-11-07T00:43:20ZBradley TaylorUse of translation functions in menu logic is... odd.See this screenshot of the CiviCRM nav menu with the site locale set to Spanish:
![Screenshot_2021-12-24_at_15.10.04](/uploads/869b3e37c228d258c61ee6fe40867771/Screenshot_2021-12-24_at_15.10.04.png)
The bulk of the labels are translate...See this screenshot of the CiviCRM nav menu with the site locale set to Spanish:
![Screenshot_2021-12-24_at_15.10.04](/uploads/869b3e37c228d258c61ee6fe40867771/Screenshot_2021-12-24_at_15.10.04.png)
The bulk of the labels are translated, except for the middle "Hide menu". My first thought was that this was just down to a lack of translation, but it turns out things are not that simple.
The home menu items themselves are defined as hardcoded strings in `app/public/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Navigation.php` (`CRM_Core_BAO_Navigation::buildHomeMenu`):
```
$item['child'] = [
[
'attributes' => [
'label' => 'CiviCRM Home',
'name' => 'CiviCRM Home',
'url' => 'civicrm/dashboard?reset=1',
'weight' => 1,
],
],
[
'attributes' => [
'label' => 'Hide Menu',
'name' => 'Hide Menu',
'url' => '#hidemenu',
'weight' => 2,
],
],
[
'attributes' => [
'label' => 'Log out',
'name' => 'Log out',
'url' => 'civicrm/logout?reset=1',
'weight' => 3,
],
],
];
```
Later in `CRM_Admin_Page_AJAX::formatMenuItems` the labels are passed through the `ts()` function:
```
if (!empty($props['label'])) {
$item['label'] = ts($props['label'], ['context' => 'menu']);
}
```
Some of the strings are used elsewhere (e.g. 'CiviCRM Home') and so are caught by the translation string extraction, and therefore get translated when passed into `ts()` as a variable `$props['label']`. This isn't the case for the string 'Hide Menu' however.
I suggest that `CRM_Core_BAO_Navigation::buildHomeMenu` is updated so that each label is passed through `ts()`. I'm not sure if this should include `['context' => 'menu']` to match `CRM_Admin_Page_AJAX::formatMenuItems`.
Best practice says that variables should not be passed as the first argument to `ts()`. However, `CRM_Admin_Page_AJAX::formatMenuItems` already works in this way, so it could be seen as a break to backwards compatiability to change this. If we don't change this, then there is the edge-case where a string would be double-translated, which could lead to unexpected results when combined with word replacement. So I'm not sure if this method should be updated or not.https://lab.civicrm.org/dev/core/-/issues/3006Search kit UI bug2021-12-29T23:07:13ZeileenSearch kit UI bug@colemanw I find that if delete the value in page size in order to change from 50 to 10 as soon as I delete the 50 the whole box disappears...
![image](/uploads/fdd43d8f9582295873f7f8e6b2a32a60/image.png)
Disappeared....
![image](/uploa...@colemanw I find that if delete the value in page size in order to change from 50 to 10 as soon as I delete the 50 the whole box disappears...
![image](/uploads/fdd43d8f9582295873f7f8e6b2a32a60/image.png)
Disappeared....
![image](/uploads/e2ddff811214ff2627b83fbf50017f3e/image.png)
(Note the second screen grab is from a different site hence the theme change between them)https://lab.civicrm.org/dev/core/-/issues/3005DB Error on smart group with form values stored as html entities2023-11-04T05:03:20ZjitendraDB Error on smart group with form values stored as html entitiesWe're encountering DB errors on some sites for those who have smart group form values stored as `<` or `>`.
It seems these smart groups were created using search builder with >, < as the operator. Eg payment with amount < 30, etc....We're encountering DB errors on some sites for those who have smart group form values stored as `<` or `>`.
It seems these smart groups were created using search builder with >, < as the operator. Eg payment with amount < 30, etc.
To replicate, probably just try hitting `Update Smart Group Counts` button on Manage group page. It errors if form_values has any saved_search entry with `<` or `>` in it.
````
SELECT * FROM `civicrm_saved_search` WHERE `form_values` LIKE '%<%' OR `form_values` LIKE '%>%';
````
If i try creating a new smart group using the operator, it correctly decodes the value before storing it in the database, so probably it just affects the existing groups.
Approach to fix:
- Replace these characters while retrieving the SQL for group contact cache - https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/BAO/GroupContactCache.php#L633 -
return str_replace(['<', '>'], ['<', '>'], "$select {$sqlParts['from']} {$sqlParts['where']} {$sqlParts['group_by']} {$sqlParts['having']}");
Might be Related - https://lab.civicrm.org/dev/core/-/issues/1328 & https://github.com/civicrm/civicrm-core/pull/21556https://lab.civicrm.org/dev/core/-/issues/3004Consider removing the font-size12pt, font-size11pt classes2022-03-19T14:06:02ZBradley TaylorConsider removing the font-size12pt, font-size11pt classes`civicrm.css` contains the following CSS:
```
.crm-container .font-size11pt {
font-size: 1.1em;
}
.crm-container .font-size12pt {
font-size: 1.2em;
}
```
These are used, but rarely and inconsistently, throughout the CiviCRM codeba...`civicrm.css` contains the following CSS:
```
.crm-container .font-size11pt {
font-size: 1.1em;
}
.crm-container .font-size12pt {
font-size: 1.2em;
}
```
These are used, but rarely and inconsistently, throughout the CiviCRM codebase. I see the following issues with these classes:
- These classes are used inconsistently, and I can't imendiately see what the rules are that decided their use.
- Then these classes are used, just the font-size is adjusted, which can lead to the area around that label appearing cramped.
- Using font-size alone to pull attention to a label is fairly lazy design, and can look like a UI mistake rather than a feature.
- These classes are treated inconsistently in different CiviCRM themes.
- These class names are not semantic, and also are not strictly accurate given we're using `em` not `pt`.
I've looked through the Git hsitory and I can only find one occurance of someone having used one of these classes since the migration from SVN 9 years ago. So I suspect I'm not the only one unsure when and why these classes should be used!
Therefore I'd like to propose that these two classes, along with any references to them, are removed.https://lab.civicrm.org/dev/backdrop/-/issues/4Class civicrm_plugin_argument_default_civicrm_id not loaded2021-12-22T21:39:08ZherbdoolClass civicrm_plugin_argument_default_civicrm_id not loadedNeed to put `civicrm_plugin_argument_default_civicrm_id` in `hook_autoload_info`.Need to put `civicrm_plugin_argument_default_civicrm_id` in `hook_autoload_info`.https://lab.civicrm.org/dev/core/-/issues/3241SearchKit: Chicken-and-egg problem upgrading from 5.35.2 to 5.44.02022-04-22T15:52:28ZDaveDSearchKit: Chicken-and-egg problem upgrading from 5.35.2 to 5.44.0## Steps:
1. Install 5.35.2 and enable search kit.
1. Create a search with a display and save it.
1. Upgrade to 5.44.0. The civi upgrade runs ok.
* The 5.44 part isn't too relevant I think - 5.40+ seems like it would also happen.
1. ...## Steps:
1. Install 5.35.2 and enable search kit.
1. Create a search with a display and save it.
1. Upgrade to 5.44.0. The civi upgrade runs ok.
* The 5.44 part isn't too relevant I think - 5.40+ seems like it would also happen.
1. Visit the system status page and run the extension upgrades.
1. Error as below because upgrade_1001 triggers something that doesn't exist until upgrade_1005.
If you look at http://stats.civicrm.org/?tab=sites you'll notice there's a lot of sites on `5.35` because it was a security release, so will be a problem when they upgrade.
Some workarounds are upgrade in smaller steps, or manually create the column first:
`alter table civicrm_search_display add column acl_bypass tinyint DEFAULT 0 COMMENT 'Skip permission checks and ACLs when running this display.';`
## Details
```
[info] Applying update 1001 - normalize search display columns.
[error] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`saved_search_id` AS `saved_search_id`, `a`.`type` AS `type`, `a`.`settings` AS `settings`, `a`.`acl_bypass` AS `acl_bypass`
FROM civicrm_search_display a
WHERE (`a`.`saved_search_id` = "1")
[nativecode=1054 ** Unknown column 'a.acl_bypass' in 'field list']
[type] => DB_Error
[user_info] => SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`saved_search_id` AS `saved_search_id`, `a`.`type` AS `type`, `a`.`settings` AS `settings`, `a`.`acl_bypass` AS `acl_bypass`
FROM civicrm_search_display a
WHERE (`a`.`saved_search_id` = "1")
[nativecode=1054 ** Unknown column 'a.acl_bypass' in 'field list']
[to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`saved_search_id` AS `saved_search_id`, `a`.`type` AS `type`, `a`.`settings` AS `settings`, `a`.`acl_bypass` AS `acl_bypass`
FROM civicrm_search_display a
WHERE (`a`.`saved_search_id` = "1")
[nativecode=1054 ** Unknown column 'a.acl_bypass' in 'field list']"]
)
Dec 22 13:41:25 [debug] $backTrace = #0 ...\sites\all\modules\civicrm\CRM\Core\Error.php(942): CRM_Core_Error::backtrace("backTrace", TRUE)
1 ...\sites\all\modules\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))
2 ...\sites\all\modules\civicrm\vendor\pear\db\DB.php(997): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
3 ...\sites\all\modules\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
4 ...\sites\all\modules\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php(223): PEAR::_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...", "DB_Error", TRUE)
5 ...\sites\all\modules\civicrm\vendor\pear\db\DB\common.php(1928): PEAR->__call("raiseError", (Array:7))
6 ...\sites\all\modules\civicrm\vendor\pear\db\DB\mysqli.php(936): DB_common->raiseError(-19, NULL, NULL, "SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...", "1054 ** Unknown column 'a.acl_bypass' in 'field list'")
7 ...\sites\all\modules\civicrm\vendor\pear\db\DB\mysqli.php(406): DB_mysqli->mysqliRaiseError()
8 ...\sites\all\modules\civicrm\vendor\pear\db\DB\common.php(1234): DB_mysqli->simpleQuery("SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
9 ...\sites\all\modules\civicrm\packages\DB\DataObject.php(2696): DB_common->query("SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
10 ...\sites\all\modules\civicrm\packages\DB\DataObject.php(1829): DB_DataObject->_query("SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
11 ...\sites\all\modules\civicrm\CRM\Core\DAO.php(468): DB_DataObject->query("SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
12 ...\sites\all\modules\civicrm\CRM\Core\DAO.php(1621): CRM_Core_DAO->query("SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...", TRUE)
13 ...\sites\all\modules\civicrm\Civi\Api4\Query\Api4SelectQuery.php(167): CRM_Core_DAO::executeQuery("SELECT `a`.`id` AS `id`, `a`.`name` AS `name`, `a`.`label` AS `label`, `a`.`s...")
14 ...\sites\all\modules\civicrm\Civi\Api4\Generic\DAOGetAction.php(111): Civi\Api4\Query\Api4SelectQuery->run()
15 ...\sites\all\modules\civicrm\Civi\Api4\Generic\DAOGetAction.php(99): Civi\Api4\Generic\DAOGetAction->getObjects(Object(Civi\Api4\Generic\Result))
16 ...\sites\all\modules\civicrm\Civi\Api4\Provider\ActionObjectProvider.php(68): Civi\Api4\Generic\DAOGetAction->_run(Object(Civi\Api4\Generic\Result))
17 ...\sites\all\modules\civicrm\Civi\API\Kernel.php(149): Civi\Api4\Provider\ActionObjectProvider->invoke(Object(Civi\Api4\Generic\DAOGetAction))
18 ...\sites\all\modules\civicrm\Civi\Api4\Generic\AbstractAction.php(234): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAOGetAction))
19 ...\sites\all\modules\civicrm\api\api.php(85): Civi\Api4\Generic\AbstractAction->execute()
20 ...\sites\all\modules\civicrm\Civi\Api4\Provider\ActionObjectProvider.php(103): civicrm_api4("SearchDisplay", "get", (Array:13), NULL)
21 ...\sites\all\modules\civicrm\Civi\Api4\Provider\ActionObjectProvider.php(84): Civi\Api4\Provider\ActionObjectProvider->runChain((Array:4), (Array:14))
22 ...\sites\all\modules\civicrm\Civi\Api4\Provider\ActionObjectProvider.php(69): Civi\Api4\Provider\ActionObjectProvider->handleChains(Object(Civi\Api4\Generic\DAOGetAction), Object(Civi\Api4\Generic\Result))
23 ...\sites\all\modules\civicrm\Civi\API\Kernel.php(149): Civi\Api4\Provider\ActionObjectProvider->invoke(Object(Civi\Api4\Generic\DAOGetAction))
24 ...\sites\all\modules\civicrm\Civi\Api4\Generic\AbstractAction.php(234): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAOGetAction))
25 ...\sites\all\modules\civicrm\ext\search_kit\CRM\Search\Upgrader.php(58): Civi\Api4\Generic\AbstractAction->execute()
26 ...\sites\all\modules\civicrm\CRM\Extension\Upgrader\QueueTrait.php(49): CRM_Search_Upgrader->upgrade_1001()
27 ...\sites\all\modules\civicrm\CRM\Queue\Task.php(74): CRM_Extension_Upgrader_Base::_queueAdapter(Object(CRM_Queue_TaskContext), "org.civicrm.search_kit", "upgrade_1001")
28 ...\sites\all\modules\civicrm\CRM\Queue\Runner.php(201): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
29 ...\sites\all\modules\civicrm\CRM\Queue\Page\AJAX.php(36): CRM_Queue_Runner->runNext(TRUE)
30 ...\sites\all\modules\civicrm\CRM\Queue\ErrorPolicy.php(89): CRM_Queue_Page_AJAX::{closure}()
31 ...\sites\all\modules\civicrm\CRM\Queue\Page\AJAX.php(38): CRM_Queue_ErrorPolicy->call(Object(Closure))
32 ...\sites\all\modules\civicrm\CRM\Core\Invoke.php(279): CRM_Queue_Page_AJAX::runNext()
33 ...\sites\all\modules\civicrm\CRM\Core\Invoke.php(69): CRM_Core_Invoke::runItem((Array:13))
34 ...\sites\all\modules\civicrm\CRM\Core\Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
35 ...\sites\all\modules\civicrm\drupal\civicrm.module(471): CRM_Core_Invoke::invoke((Array:4))
36 ...\includes\menu.inc(527): civicrm_invoke("queue", "ajax", "runNext")
37 ...\index.php(21): menu_execute_active_handler()
38 {main}
```5.46.0https://lab.civicrm.org/dev/core/-/issues/3003Preserve previous tab when navigating to and from contact page2022-05-05T14:57:50ZBradley TaylorPreserve previous tab when navigating to and from contact pageThe contact page is structured around a series of tabs: Summary, Contributions, Membership etc. There are often times when you click through from a contact to a related entity (say a related contact from the relationships tab). It would ...The contact page is structured around a series of tabs: Summary, Contributions, Membership etc. There are often times when you click through from a contact to a related entity (say a related contact from the relationships tab). It would be nice if using the browser's back button returned you to the tab you were previously looking at rather than returning to the summary tab each time.
This is a bigger issue for users with the "Enable Popup Forms" option unticked, but all users are affected by this.
This shouldn't be a massive technical change, but I do think this is one of those little annoyances, where fixing should improve the overall usability of the CRM for those who need to use it on a daily basis.
**Implementation details**
It is already possible to link to a specific tab with the `selectedChild` query parameter. I propose that whenever the active tab is changed, the [replaceState](https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState) API is used to amend the `selectedChild` parameter in the URL.5.49.0https://lab.civicrm.org/dev/core/-/issues/3288SearchKit: Custom integer field in-place edit doesn't let you blank out the f...2022-04-22T15:53:54ZDaveDSearchKit: Custom integer field in-place edit doesn't let you blank out the field, and (sort of) validates incorrectlyFollowing on from https://github.com/civicrm/civicrm-core/pull/22293, if you have a custom integer field in your search display and it has in-place edit, when you blank out the field and click the checkmark it just keeps the original val...Following on from https://github.com/civicrm/civicrm-core/pull/22293, if you have a custom integer field in your search display and it has in-place edit, when you blank out the field and click the checkmark it just keeps the original value instead of blanking it out.
I could put in 0, but I have a use-case where 0 is different from blank. I'm sure I could work around it, but it's inconsistent with how e.g. the contact edit form works with an integer custom field.
The validation part is that if I type in "aaaa" into the integer field, it correctly doesn't change the value, but has a "Saved" success message. Minor thing.5.46.0https://lab.civicrm.org/dev/core/-/issues/3002Add activity created date in Form Builder2022-01-07T12:09:27ZkristinecAdd activity created date in Form BuilderWhen adding a Search Form in Form Builder, the available Activity Fields has "Activity Date" which is separate from the created date. It would be great to include "Activity Created Date" (or "Created Date"). SearchKit already has this fi...When adding a Search Form in Form Builder, the available Activity Fields has "Activity Date" which is separate from the created date. It would be great to include "Activity Created Date" (or "Created Date"). SearchKit already has this field available in its search.
To reproduce:
1. Create an activity with the activity date in the past (activity date occurred on 12/15/2021). CiviCRM records the activity created date as today (12/24/2021).
2. Create a "New Search" in Search Kit, showing "Cases" with "Case Activities". Search Kit has the options for two types of activity dates here.
- `Case_CaseActivity_Activity_01.activity_date_time`: The date when the activity occurred.
- `Case_CaseActivity_Activity_01.created_date`: The date when the activity was created.
3. In Afform, only "Activity Date" shows up which references `activity_date_time`, but there's no option to add `created_date` (see image below). Therefore, afform only can filter by activity date and not the created activity date.
![SharedScreenshot](/uploads/28832f8d7f626b2c43f7c102cb954dbc/SharedScreenshot.jpg).5.47.0https://lab.civicrm.org/dev/drupal/-/issues/172Deprecated function drupal_get_installed_schema_version() in 9.3, but with a ...2022-01-02T15:47:07ZDaveDDeprecated function drupal_get_installed_schema_version() in 9.3, but with a twistdrupal_get_installed_schema_version() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Update\UpdateHookRegistry::getInstalledVersion() or \Drupal\Core\Update\UpdateHookRegistry::getAllInstalledVersions()...drupal_get_installed_schema_version() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Update\UpdateHookRegistry::getInstalledVersion() or \Drupal\Core\Update\UpdateHookRegistry::getAllInstalledVersions() instead. See https://www.drupal.org/node/2444417
This is in vendor\civicrm\civicrm-core\CRM/Utils/System/Drupal8.php:
```
public function getModules() {
$modules = [];
$module_data = \Drupal::service('extension.list.module')->reset()->getList();
foreach ($module_data as $module_name => $extension) {
if (!isset($extension->info['hidden']) && $extension->origin != 'core') {
$extension->schema_version = drupal_get_installed_schema_version($module_name);
$modules[] = new CRM_Core_Module('drupal.' . $module_name, ($extension->status == 1));
}
}
return $modules;
}
```
The reason I haven't just put up a simple replacement PR is because if you look at the above function you'll notice schema_version is never used. If you look at the docblock in Base.php it says "List modules installed in the CMS, _including enabled and disabled ones_." Looking at the drupal 7 version (in DrupalBase.php), it does this:
`'SELECT name, status FROM {system} WHERE type = \'module\' AND schema_version <> -1'`
which means only the modules that are installed (but possibly disabled - that's what status is). Now in drupal 8 there is no concept of disabled, it's either installed or uninstalled, but the drupal 8 code is including all of them. In drupal 8 $extension->status means installed or uninstalled.
So two options are:
1. Try to match the drupal 7 implementation/docblock, which means excluding it if $extension->status is 0, and always passing 1 as the second parameter to CRM_Core_Module(), because disabled doesn't mean anything in drupal 8.
2. Leave it the way it is and just remove the unused line about schema_version.
Trying to track down where this gets used, it seems it's mostly in ManagedEntities, which I usually stay away from, and I'm not even sure why ManagedEntities would be dealing with drupal modules other than civicrm itself.
So I'm tempted to stop thinking about it and do item 2.5.46.0