Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-02-09T16:50:04Zhttps://lab.civicrm.org/dev/wordpress/-/issues/92Feature Request, CiviCRM Mailing, Public Page (ie. the page you use to read t...2023-02-09T16:50:04Zjustinfreeman (Agileware)Feature Request, CiviCRM Mailing, Public Page (ie. the page you use to read the email on-line) entirely bypass WordPress pages and are therefore rendered without website title, meta tags which negatively impacts sharing on social networksCurrently the CiviCRM Mailing, Public Page (ie. the page you use to read the email on-line) entirely bypass WordPress pages and are therefore rendered without website title, meta tags which negatively impacts sharing on social networks. ...Currently the CiviCRM Mailing, Public Page (ie. the page you use to read the email on-line) entirely bypass WordPress pages and are therefore rendered without website title, meta tags which negatively impacts sharing on social networks. See for example, https://civicrm.org/civicrm/mailing/view?reset=1&id=1686
If you share this page on a social network, it is expected by end users that you would see:
1. Organisation logo or at least a feature image
2. Short summary
3. Title of the newsletter
What you in fact see is very different. See for example https://developers.facebook.com/tools/debug/ using https://civicrm.org/civicrm/mailing/view?reset=1&id=1686
![screencapture-developers-facebook-tools-debug-2021-02-25-08_59_54](/uploads/d47e952a224080e34ad7d2ff08d99b3f/screencapture-developers-facebook-tools-debug-2021-02-25-08_59_54.png)
This is increasingly becoming a problem as CiviCRM sites re-share newsletters that they have recently sent out to their social networks.
The feature request is to provide a **Setting** which defines the **WordPress Page to be used to display the CiviCRM Mailing, Public Page** (ie. the page you use to read the email on-line). This is the same concept of the CiviCRM base page. On the CiviCRM Mailing page, a new shortcode would be present which is then used to render the public mailing.
The advantage of using a shortcode is that it then gives the website builder the ability to control how the page is presented, what metatags are used on that page and the template to be used for that page.
This is similar to the recent work to improve CiviCRM shortcode handling. See https://github.com/civicrm/civicrm-wordpress/pull/239 and https://lab.civicrm.org/dev/wordpress/-/issues/90
Ping @haystack and @kcristiano
Agileware Ref: CIVICRM-1662https://lab.civicrm.org/dev/core/-/issues/3816Saving event intermittently throws 500 error2023-02-08T21:37:50ZBobSSaving event intermittently throws 500 errorOverview
----------------------------------------
Saving an event intermittently results in a hang with:
* Greyed out tab contents
* Spinning cursor
* Error in the browser console: "VM6153:1 POST https://dmaster.demo.civicrm.org/civicrm/...Overview
----------------------------------------
Saving an event intermittently results in a hang with:
* Greyed out tab contents
* Spinning cursor
* Error in the browser console: "VM6153:1 POST https://dmaster.demo.civicrm.org/civicrm/ajax/inline?class_name=CRM_UF_Form_Inline_PreviewById&id=14&snippet=json&crmAngularModules=crmApp,crmProfileUtils,crmResource,crmUi,crmUtil,ngRoute,ngSanitize,volunteer 500 (Internal Server Error)"
Upon a page reload following a hang, the following popup is displayed:
```We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.<br /><br />Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.<br /><br />Error type: Could not find a valid session key.```
Problem confirmed on https://dmaster.demo.civicrm.org.
Reproduction steps
----------------------------------------
1. Go to https://dmaster.demo.civicrm.org
1. Click **Events** | **Manage Events**.
1. **Rain-forest Cup Youth Soccer Tournament**: Click **Configure** | **Online Registration**.
1. Click **Save**
Current behaviour
----------------------------------------
About 50% of the time it will hang as described above.
Oddly, the failures do not seem to be randomly distributed. It seems that it will tend to fail consistently for several minutes, and then to save successfully for several minutes. Or maybe I'm doing something subtly different that I have not noticed which makes the problem appear.
Problem has been observed upon saving various tabs (Info and Settings, Event Location, Online Registration)
Problem has not been observed upon clicking __Save and Done__.
__Stress Testing__
After a page load and successful save, it appears that every subsequent save will be successful. To stress test, therefore, the following sequence must be repeated:
1. Refresh page
1. Save
__GET/POST Requests__
When saving the Online Registration tab, the following sequence is observed in the browser's Network tab for a successful save:
1. POST https://dmaster.demo.civicrm.org/civicrm/event/manage/registration?action=update&id=3&component=event&qfKey=CRMEventFormManageEventRegistrationlkkd3ym1nsgogsggw8scokgo8kw04w0cw00wsg8csgwkc4gcw_4298&snippet=json&crmAngularModules=crmApp,crmProfileUtils,crmResource,crmUi,crmUtil,ngRoute,ngSanitize,volunteer
1. GET https://dmaster.demo.civicrm.org/civicrm/event/manage/registration?reset=1&action=update&id=3&component=event&qfKey=CRMEventFormManageEventRegistrationlkkd3ym1nsgogsggw8scokgo8kw04w0cw00wsg8csgwkc4gcw_4298&snippet=json&crmAngularModules=crmApp,crmProfileUtils,crmResource,crmUi,crmUtil,ngRoute,ngSanitize,volunteer
1. GET https://dmaster.demo.civicrm.org/civicrm/ajax/inline?class_name=CRM_UF_Form_Inline_PreviewById&id=12&snippet=json&crmAngularModules=crmApp,crmProfileUtils,crmResource,crmUi,crmUtil,ngRoute,ngSanitize,volunteer
When the save fails, however, only the third request is observed, and it throws a 500 error.
__Civi Log__
```
Aug 20 14:07:08 [error]
$Fatal Error Details = array:3 [
"message" => "We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.<br /><br />Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.<br /><br />Error type: Could not find a valid session key."
"code" => null
"exception" => CRM_Core_Exception {#1777
-errorData: array:1 [
"error_code" => 0
]
#cause: null
-_trace: null
#message: "We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.<br /><br />Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.<br /><br />Error type: Could not find a valid session key."
#code: 0
#file: "/var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Controller.php"
#line: 861
trace: {
/var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Controller.php:861 {
› $msg = ts("We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site administrator for assistance.") . '<br /><br />' . ts('Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.') . '<br /><br />' . ts('Error type: Could not find a valid session key.');
› throw new CRM_Core_Exception($msg);
› }
}
/var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Controller.php:856 { …}
/var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Controller.php:316 { …}
/var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Controller.php:193 { …}
/var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Controller/Simple.php:49 { …}
/var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Utils/Wrapper.php:62 { …}
/var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Page/AJAX.php:63 { …}
/var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Invoke.php:285 { …}
/var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Invoke.php:69 { …}
/var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Invoke.php:36 { …}
/var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/drupal/civicrm.module:471 { …}
/var/www/clients/client1/web3/web/drupal/includes/menu.inc:527 { …}
/var/www/clients/client1/web3/web/drupal/index.php:197 { …}
}
}
]
Aug 20 14:07:08 [debug] $backTrace = #0 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Error.php(441): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
#2 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/drupal/civicrm.module(471): CRM_Core_Invoke::invoke((Array:3))
#3 /var/www/clients/client1/web3/web/drupal/includes/menu.inc(527): civicrm_invoke("ajax", "inline")
#4 /var/www/clients/client1/web3/web/drupal/index.php(197): menu_execute_active_handler()
#5 {main}
```
__Possibly Related__
Upon loading any of the event tabs, the following error is always displayed in the console:
```
angular.js:15697 TypeError: Cannot read properties of undefined (reading 'id')
at angular-modules.c3b61f5213a83292c272ff9114e7a62a.js?rgx685:2098:66
at m.$digest (angular.js:19270:23)
at angular.js:19562:15
at Yg.completeTask (angular.js:21403:7)
at angular.js:6879:7
```
Expected behaviour
----------------------------------------
The Save should complete without error.
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:__ _Chrome 104.0.5112.101_
* __CiviCRM:__ _5.52_, _5.54.alpha1_
* __PHP:__ _7.4_
* __CMS:__ _Drupal 7.91_
* __Database:__ _MariaDB 10.4_
* __Web Server:__ _Apache 2.4_
Comments
----------------------------------------
_Anything else you would like the reviewer to note._seamusleeseamusleehttps://lab.civicrm.org/dev/core/-/issues/4111Searchkit: Fatal error on Related Contacts search2023-02-08T19:45:59ZshaneonabikeSearchkit: Fatal error on Related Contacts searchHey there,
I built out a Related Contacts search, but noticed recently that there are some Fatal error messages in the Civi logs.
## How to reproduce
You can use my export here it's nothing complicated just a Display of Related Contac...Hey there,
I built out a Related Contacts search, but noticed recently that there are some Fatal error messages in the Civi logs.
## How to reproduce
You can use my export here it's nothing complicated just a Display of Related Contacts (way to go on this feature btw)
```
[
[
"SavedSearch",
"save",
{
"records": [
{
"name": "Related_Contacts",
"label": "Related Contacts",
"form_values": null,
"mapping_id": null,
"search_custom_id": null,
"api_entity": "RelationshipCache",
"api_params": {
"version": 4,
"select": [
"near_relation:label",
"far_contact_id.display_name"
],
"orderBy": [],
"where": [
[
"is_active",
"=",
true
]
],
"groupBy": [],
"join": [],
"having": []
},
"expires_date": null,
"description": null
}
],
"match": [
"name"
]
}
],
[
"SearchDisplay",
"save",
{
"records": [
{
"name": "Relationships",
"label": "Relationships Table",
"saved_search_id.name": "Related_Contacts",
"type": "table",
"settings": {
"actions": true,
"limit": 25,
"classes": [
"table",
"table-striped",
"table-bordered"
],
"pager": {
"show_count": true,
"expose_limit": true
},
"columns": [
{
"type": "field",
"key": "near_relation:label",
"dataType": "String",
"label": "Relationship",
"sortable": true,
"link": {
"path": "",
"entity": "Relationship",
"action": "view",
"join": "",
"target": "crm-popup"
},
"title": "View Related Contact",
"tally": {
"fn": null
}
},
{
"type": "field",
"key": "far_contact_id.display_name",
"dataType": "String",
"label": "Contact Name",
"sortable": true,
"link": {
"path": "",
"entity": "Contact",
"action": "view",
"join": "far_contact_id",
"target": "_blank"
},
"title": "View Contact",
"tally": {
"fn": null
}
}
],
"sort": [
[
"relationship_type_id",
"DESC"
],
[
"far_contact_id.display_name",
"ASC"
]
],
"placeholder": 5,
"tally": {
"label": "Total"
}
},
"acl_bypass": true
}
],
"match": [
"name",
"saved_search_id"
]
}
],
[
"Afform",
"save",
{
"records": [
{
"name": "afsearchRelationships",
"requires": [],
"title": "Relationships",
"description": "",
"is_dashlet": false,
"is_public": false,
"is_token": false,
"permission": "access CiviCRM",
"type": "search",
"entity_type": null,
"join_entity": null,
"contact_summary": "block",
"icon": "fa-list-alt",
"server_route": "",
"redirect": null,
"create_submission": false,
"navigation": null,
"layout": "<div af-fieldset=\"\">\n <af-field name=\"far_contact_id.display_name\" defn=\"{label: 'Contact Name', input_attrs: {}}\" />\n <crm-search-display-table search-name=\"Related_Contacts\" display-name=\"Relationships\" filters=\"{near_contact_id: options.contact_id}\"></crm-search-display-table>\n</div>\n"
}
]
}
]
]
```
## What is happening
The display renders perfectly, but in the logs it seems that the ```SELECT statement``` is incorrect. This fires just on the actual search as well.
## The Error
```
Feb. 03 09:30:22 [error] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] => SELECT FROM (SELECT `a`.`near_relation` AS `near_relation:label`, `far_contact_id_1`.`display_name` AS `far_contact_id.display_name`, `RelationshipCache_Contact_far_contact_id_01`.`display_name` AS `RelationshipCache_Contact_far_contact_id_01.display_name`
FROM civicrm_relationship_cache a
LEFT JOIN `civicrm_relationship_type_en_CA` `RelationshipCache_RelationshipType_relationship_type_id_01` ON `a`.`relationship_type_id` = `RelationshipCache_RelationshipType_relationship_type_id_01`.`id`
LEFT JOIN `civicrm_contact` `RelationshipCache_Contact_far_contact_id_01` ON `a`.`far_contact_id` = `RelationshipCache_Contact_far_contact_id_01`.`id`
LEFT JOIN `civicrm_contact` `far_contact_id_1` ON `a`.`far_contact_id` = `far_contact_id_1`.`id`
WHERE (`a`.`is_active` = "1")
) `api_query` [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM (SELECT `a`.`near_relation` AS `near_relation:label`, `far_contact_id_1`...' at line 1]
[type] => DB_Error
[user_info] => SELECT FROM (SELECT `a`.`near_relation` AS `near_relation:label`, `far_contact_id_1`.`display_name` AS `far_contact_id.display_name`, `RelationshipCache_Contact_far_contact_id_01`.`display_name` AS `RelationshipCache_Contact_far_contact_id_01.display_name`
FROM civicrm_relationship_cache a
LEFT JOIN `civicrm_relationship_type_en_CA` `RelationshipCache_RelationshipType_relationship_type_id_01` ON `a`.`relationship_type_id` = `RelationshipCache_RelationshipType_relationship_type_id_01`.`id`
LEFT JOIN `civicrm_contact` `RelationshipCache_Contact_far_contact_id_01` ON `a`.`far_contact_id` = `RelationshipCache_Contact_far_contact_id_01`.`id`
LEFT JOIN `civicrm_contact` `far_contact_id_1` ON `a`.`far_contact_id` = `far_contact_id_1`.`id`
WHERE (`a`.`is_active` = "1")
) `api_query` [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM (SELECT `a`.`near_relation` AS `near_relation:label`, `far_contact_id_1`...' at line 1]
[to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT FROM (SELECT `a`.`near_relation` AS `near_relation:label`, `far_contact_id_1`.`display_name` AS `far_contact_id.display_name`, `RelationshipCache_Contact_far_contact_id_01`.`display_name` AS `RelationshipCache_Contact_far_contact_id_01.display_name`
FROM civicrm_relationship_cache a
LEFT JOIN `civicrm_relationship_type_en_CA` `RelationshipCache_RelationshipType_relationship_type_id_01` ON `a`.`relationship_type_id` = `RelationshipCache_RelationshipType_relationship_type_id_01`.`id`
LEFT JOIN `civicrm_contact` `RelationshipCache_Contact_far_contact_id_01` ON `a`.`far_contact_id` = `RelationshipCache_Contact_far_contact_id_01`.`id`
LEFT JOIN `civicrm_contact` `far_contact_id_1` ON `a`.`far_contact_id` = `far_contact_id_1`.`id`
WHERE (`a`.`is_active` = "1")
) `api_query` [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM (SELECT `a`.`near_relation` AS `near_relation:label`, `far_contact_id_1`...' at line 1]"]
)
```
The thing I want to point out is the ```SELECT FROM (SELECT `a`.`near_relation` ``` at the start. The Select is invalid because it's not selecting any fields. Perhaps it should be ```*```, but really I did choose ```Relationship to contact``` and ```Contact (far side)``` to be displayed in the actual table below
![Selection_003](/uploads/1e2116880e9c710671ec74425b19d41e/Selection_003.png)https://lab.civicrm.org/dev/core/-/issues/3490Upgrader - Apply extension updates after core updates2023-02-08T19:08:30ZtottenUpgrader - Apply extension updates after core updatesOverview
----------------------------------------
Functionality in `civicrm-core` is increasingly organized with internal extensions (`civicrm-core:ext/*`). The main upgrade workflow should incorporate the upgrade-steps for extensions.
...Overview
----------------------------------------
Functionality in `civicrm-core` is increasingly organized with internal extensions (`civicrm-core:ext/*`). The main upgrade workflow should incorporate the upgrade-steps for extensions.
Example use-case
----------------------------------------
1. Extract tarball with a new version of `civicrm-core`, including updated `ext/*`
1. Run the main upgrader (`civicrm/upgrade?reset=1`, `cv core:upgrade`, `drush civicrm-upgrade-db`, or `wp civicrm upgrade-db`)
Current behaviour
----------------------------------------
It updates the schema for things like `civicrm_contact` (eg `CRM/Upgrade/*`) but not things like `civicrm_search_segment` (eg `ext/search_kit/CRM/Search/Upgrader.php`).
As a sysadmin, you must run the upgrades separately.
Most are not habituated to running these together. This leads to confusing user-stories like https://civicrm.stackexchange.com/questions/42094/civimail-issue-db-error-no-such-table-when-sending-mailing (where the first upgrade seemed to work - but you get random errors because the second upgrade hasn't run).
Proposed behaviour
----------------------------------------
Run both.
The core-upgrade should delegate/incorporate the ext-upgrade, and it should preserve essential elements of the ext-upgrade contract. Specifically: ext-upgrades can use features/services/APIs from core. This implies that (1) ext-upgrades run after core-upgrades and (2) when it gets to ext-upgrades, it should follow a normal/open dispatch-policy.
Comments
----------------------------------------
Filing issue after some Mattermost discussion with rudanpal, @colemanw, @bgm, @totten: https://chat.civicrm.org/civicrm/pl/b76y4gy517yxdet331ueqrxgrw
I posted a draft at https://github.com/civicrm/civicrm-core/compare/5.50...totten:run-ext-upgrades?expand=1
As mentioned in PHP comments+Mattermost, there's an issue with the current draft -- when it gets to ext-upgrade tasks, it would (unexpectedly) continue to apply the limited dispatch-policy used for core-upgrades (`upgrade.main` vs `upgrade.finish`). Some ways to address that:
* __Runner state__: While the upgrader goes through phases (*ex: 1-core upgrade, 2-ext upgrade, 3-new exts*), keep a stored value naming the phase. this stored value determines the active dispatch-policy
* ex: `Civi::settings()->set('upgrade_phase', '...')`
* __Task wrapping/task tagging__: When taking ext-upgrade tasks and putting them into the core-upgrade queue, put some wrapper or tag on each one to indicate the phase/policy that it relies on
* wrapper example: `CRM_Upgrade_Form::wrappedTask(string $dispatchPolicy, array $realCallback)
* tag example: `$queue->createItem($task, ['dispatchPolicy' => string])`https://lab.civicrm.org/dev/release/-/issues/20Configure dependabot to always target the RC2023-02-08T03:11:21ZDaveDConfigure dependabot to always target the RCThis maybe belongs in infra. Not sure.
Dependabot is almost always making security-related PRs. But it does it against master, so we end up manually recreating and then deleting the original, which angers dependabot (not really since it...This maybe belongs in infra. Not sure.
Dependabot is almost always making security-related PRs. But it does it against master, so we end up manually recreating and then deleting the original, which angers dependabot (not really since it's a robot, but it posts a response). There is https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#target-branch, but the civi naming for branches doesn't make it easy to target the RC.
It may be more trouble than it's worth just for this, but branch-naming the RC so that it can be targeted more easily would be useful elsewhere too.https://lab.civicrm.org/dev/core/-/issues/4117Filter Searches by 'is_current' / expires_date2023-02-07T23:27:08ZeileenFilter Searches by 'is_current' / expires_dateThe `civicrm_search` table has an `expires_date` field. I believe it should be used as a filter on the search admin screen.
I copied the field into `civicrm_user_job` when I created that and the searches based on user jobs have expires_...The `civicrm_search` table has an `expires_date` field. I believe it should be used as a filter on the search admin screen.
I copied the field into `civicrm_user_job` when I created that and the searches based on user jobs have expires_date set from the user job.
I realised it is a bit of a pain to add to the js as it would be `expires_date` is in the past OR is NULL - which got me thinking that it is most like `is_current` & perhaps should be a trait like that - with is_current = TRUE as a default
@colemanw - what has me most confused is where to put it - I could add it to `IsCurrentSpecProvider` & it just has different rules - maybe I'll tryhttps://lab.civicrm.org/dev/core/-/issues/1571New Contribution form gives fatal error when using ONLY_FULL_GROUP_BY2023-02-07T19:36:18ZDaveDNew Contribution form gives fatal error when using ONLY_FULL_GROUP_BYI'm not sure if this is something that's changed recently but my local setup has had mysql 5.7 with only_full_group_by for a while now so it seems like it would have come up, and I can't be the only one. The related code doesn't seem to ...I'm not sure if this is something that's changed recently but my local setup has had mysql 5.7 with only_full_group_by for a while now so it seems like it would have come up, and I can't be the only one. The related code doesn't seem to have changed though. Maybe it only comes up in a certain configuration.
I can see the PR test sites don't have only_full_group_by so I assume dmaster.demo also doesn't, so I can't easily double-check on those.
```
SELECT
DISTINCT ( price_set_id ) as id, s.title
FROM
civicrm_price_set s
INNER JOIN civicrm_price_field f ON f.price_set_id = s.id
INNER JOIN civicrm_price_field_value v ON v.price_field_id = f.id
WHERE
is_quick_config = 0 AND s.is_active = 1 AND s.extends LIKE '%2%' AND s.financial_type_id IN (3,1,4,2) AND v.financial_type_id IN (3,1,4,2) GROUP BY s.id [nativecode=1055 ** 'f.price_set_id' isn't in GROUP BY]
0 ...\sites\all\modules\civicrm\CRM\Core\Error.php(192): CRM_Core_Error::backtrace("backTrace", TRUE)
1 ...\sites\all\modules\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
2 ...\sites\all\modules\civicrm\packages\DB.php(997): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "\n SELECT\n DISTINCT ( price_set_id ) as id, s.title\n FROM\n ...")
3 ...\sites\all\modules\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "\n SELECT\n DISTINCT ( price_set_id ) as id, s.title\n FROM\n ...")
4 ...\sites\all\modules\civicrm\vendor\pear\pear-core-minimal\src\PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "\n SELECT\n DISTINCT ( price_set_id ) as id, s.title\n FROM\n ...", "DB_Error", TRUE)
5 ...\sites\all\modules\civicrm\packages\DB\common.php(1925): PEAR->__call("raiseError", (Array:7))
6 ...\sites\all\modules\civicrm\packages\DB\mysqli.php(935): DB_common->raiseError(-1, NULL, NULL, "\n SELECT\n DISTINCT ( price_set_id ) as id, s.title\n FROM\n ...", "1055 ** 'f.price_set_id' isn't in GROUP BY")
7 ...\sites\all\modules\civicrm\packages\DB\mysqli.php(405): DB_mysqli->mysqliRaiseError()
8 ...\sites\all\modules\civicrm\packages\DB\common.php(1231): DB_mysqli->simpleQuery("\n SELECT\n DISTINCT ( price_set_id ) as id, s.title\n FROM\n ...")
9 ...\sites\all\modules\civicrm\packages\DB\DataObject.php(2691): DB_common->query("\n SELECT\n DISTINCT ( price_set_id ) as id, s.title\n FROM\n ...")
10 ...\sites\all\modules\civicrm\packages\DB\DataObject.php(1829): DB_DataObject->_query("\n SELECT\n DISTINCT ( price_set_id ) as id, s.title\n FROM\n ...")
11 ...\sites\all\modules\civicrm\CRM\Core\DAO.php(421): DB_DataObject->query("\n SELECT\n DISTINCT ( price_set_id ) as id, s.title\n FROM\n ...")
12 ...\sites\all\modules\civicrm\CRM\Core\DAO.php(1420): CRM_Core_DAO->query("\n SELECT\n DISTINCT ( price_set_id ) as id, s.title\n FROM\n ...", TRUE)
13 ...\sites\all\modules\civicrm\CRM\Price\BAO\PriceSet.php(403): CRM_Core_DAO::executeQuery("\n SELECT\n DISTINCT ( price_set_id ) as id, s.title\n FROM\n ...")
14 ...\sites\all\modules\civicrm\CRM\Contribute\Form\Contribution.php(716): CRM_Price_BAO_PriceSet::getAssoc(FALSE, "CiviContribute")
15 ...\sites\all\modules\civicrm\CRM\Core\Form.php(595): CRM_Contribute_Form_Contribution->buildQuickForm()
16 ...\sites\all\modules\civicrm\CRM\Core\QuickForm\Action\Display.php(76): CRM_Core_Form->buildForm()
17 ...\sites\all\modules\civicrm\packages\HTML\QuickForm\Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contribute_Form_Contribution), "display")
18 ...\sites\all\modules\civicrm\packages\HTML\QuickForm\Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution), "display")
19 ...\sites\all\modules\civicrm\CRM\Core\Controller.php(335): HTML_QuickForm_Page->handle("display")
20 ...\sites\all\modules\civicrm\CRM\Contribute\Page\Tab.php(316): CRM_Core_Controller->run()
21 ...\sites\all\modules\civicrm\CRM\Contribute\Page\Tab.php(372): CRM_Contribute_Page_Tab->edit()
22 ...\sites\all\modules\civicrm\CRM\Core\Invoke.php(268): CRM_Contribute_Page_Tab->run((Array:3), NULL)
23 ...\sites\all\modules\civicrm\CRM\Core\Invoke.php(68): CRM_Core_Invoke::runItem((Array:16))
24 ...\sites\all\modules\civicrm\CRM\Core\Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
25 ...\sites\all\modules\civicrm\drupal\civicrm.module(456): CRM_Core_Invoke::invoke((Array:3))
26 ...\includes\menu.inc(527): civicrm_invoke("contribute", "add")
27 ...\index.php(21): menu_execute_active_handler()
28 {main}
```https://lab.civicrm.org/dev/core/-/issues/4091Smart group contacts from custom search show wrong results2023-02-06T04:26:31ZyashodhaSmart group contacts from custom search show wrong resultsSteps to replicate :
--------------------
- Create a smart group from any of the custom searches
- Remove a few contacts from the smart group
- Go to _Manage Groups_, the count is correct but when you click Contacts link it shows remove...Steps to replicate :
--------------------
- Create a smart group from any of the custom searches
- Remove a few contacts from the smart group
- Go to _Manage Groups_, the count is correct but when you click Contacts link it shows removed Contacts as well.
Count (correct)
![count](/uploads/0875a1556b0aa8bcd8a619d47e22d7fa/count.png)
Contacts link (wrong)
![wrong_results](/uploads/f4d8b04b546712f5166b3424c4263fe7/wrong_results.png)
- Go to _Find Contacts_, search for the smart group - it works as expected
![smart_](/uploads/a5491f1eea0ec5474d003c8aaa70a58a/smart_.png)yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/2630Improve performance of queries in CRM_Contact_Form_Search_Custom_Base2023-02-06T04:12:42ZErikHommelImprove performance of queries in CRM_Contact_Form_Search_Custom_BaseSee this SE post: https://civicrm.stackexchange.com/questions/39636/slow-query-fixes-msp-custom-searches
It might be worth implementing the suggested improvements?See this SE post: https://civicrm.stackexchange.com/questions/39636/slow-query-fixes-msp-custom-searches
It might be worth implementing the suggested improvements?https://lab.civicrm.org/dev/core/-/issues/4108Missing field for state province is easily missed2023-02-02T07:52:59ZyashodhaMissing field for state province is easily missedSteps to replicate :
--------------------
- Go to main of any configured contribution pages
- Fill all the mandatory fields except postcode
- On submit, the page will have postcode field in view (no need to scroll) all the way down.
...Steps to replicate :
--------------------
- Go to main of any configured contribution pages
- Fill all the mandatory fields except postcode
- On submit, the page will have postcode field in view (no need to scroll) all the way down.
![dmaster_postcode](/uploads/66a33999f7035fd958cde632cf975f74/dmaster_postcode.png)
- Fill all the mandatory fields except state province
- On submit, the page will NOT have state province field in view (need to scroll)
![dmaster_state](/uploads/f8019eddec3cfd91bf6c5b77f0dfdd28/dmaster_state.png)
This is inconsistent and esp cumbersome when you have a lot of fields configured in profile.https://lab.civicrm.org/dev/core/-/issues/4102Custom field content in a repeating event is not copied to all/subsequent ins...2023-02-02T07:45:34ZUpperholmeCustom field content in a repeating event is not copied to all/subsequent instances of the repeated eventOverview
----------------------------------------
I have set up a series of repeating events. I also have a set of custom fields for events. If I populate to a custom field in one instance of the repeating event, and save the change I a...Overview
----------------------------------------
I have set up a series of repeating events. I also have a set of custom fields for events. If I populate to a custom field in one instance of the repeating event, and save the change I am asked if I want to cascade that change to later events in the series, to all of the events, or to none. If I choose to save the change to either all of the events in the series or to later events in the series, I expect the custom field to be populated with an identical value in all of the selected events in the series. This doesn't happen. The change is on ly saved to the specific event that I have edited.
Reproduction steps
----------------------------------------
1. Create a custom field set for events with at least one field.
2. Create an event and specify that it be repeated more than once. Save.
3. Edit one instance of the event series (not the last one in the series). Edit a selected custom field for the event. Save and choose to apply the change to either all of the events in the series, or to later events.
4. Edit a later instance of the event, and note that the change has not been applied.
Current behaviour
----------------------------------------
The change to the selected custom field in only saved to the specific instance of the event.
Expected behaviour
----------------------------------------
I expect the custom field to be populated with an identical value in all of the selected events in the series.
Environment information
----------------------------------------
CiviCRM 5.57.1
Drupal 7.94https://lab.civicrm.org/dev/core/-/issues/30315.44+ Unsubscribe from Smart Group form generates excessive process load2023-01-31T13:58:20Ztommybobo5.44+ Unsubscribe from Smart Group form generates excessive process loadOverview
----------------------------------------
The recent change to email unsubscribe from Smart Group is overloading mysql. [This change ](https://github.com/civicrm/civicrm-core/pull/21176) by @mattwire is providing a check to see w...Overview
----------------------------------------
The recent change to email unsubscribe from Smart Group is overloading mysql. [This change ](https://github.com/civicrm/civicrm-core/pull/21176) by @mattwire is providing a check to see which smart group an unsubscribing user is in before unsubscribing them. On a large mailing, site with a lot of smart groups, or even one complex smart this code is a time bomb. Especially as we see a rise in automated link checking bots on large email providers.
Current behavior
----------------------------------------
When a email recipient clicks unsubscribe all smart groups are regenerated. When CRM_Contact_BAO_GroupContactCache is called all smart groups are regenerated regardless of the setting of cache time. Also this is running even if the email doesn't contain any smart groups. Then the cache table is Left Joined onto the query for a search. Which also can be refreshed by another user clicking the link in the 5-10 second process time of a large site with large smart groups.
This is an incredibly high process load before any action is actually taken in order to display a group title on page that 9 times out of 10 is a bot not an end user.
Proposed behavior
----------------------------------------
Members do not need to see the Group labels from which they are unsubscribing, and if they are unsubscribing from this Email list then it is reasonable to mark them as unsubscribed from a smart group used in the mailing even if they are not in it. If they in the future become a member of the smart group, they probably don't want email about it.
It is reasonable to run this process AFTER the unsubscribe button is clicked by the user. Running it on page load is just wasting a ton resources on bot traffic.
Comments
----------------------------------------
@mattwire 's solution is reasonable for many, but it just isn't scaling well on larger civicrm installs. We have either reverted the code or switched to Opt Out of all emails for those larger clients, but those are temporary solutions.https://lab.civicrm.org/dev/core/-/issues/2410Image custom field type2023-01-30T20:19:36ZMichael McAndrewImage custom field typeOverview
----------------------------------------
We want to add a custom field type of image that can be used to store images as part of a CiviCRM entity.
In terms of how this might be different to the file field type, I think the main...Overview
----------------------------------------
We want to add a custom field type of image that can be used to store images as part of a CiviCRM entity.
In terms of how this might be different to the file field type, I think the main consideration is how these fields would be displayed (resizing, thumbnails, etc.)
Example use-case
----------------------------------------
1. Store (one or more) images related to a contact as part of the contact record.
2. *** feel free to add more***
Current behaviour
----------------------------------------
At the moment, there is a single core field for a contact image (e.g. a headshot of an indiviual or a company logo). No other images can be added. Images can be added as files but are not displayed as one would expect an image to be displayed.
Proposed behaviour
----------------------------------------
People should be able to define image fields and upload images to them. The original should be retained and resized images should also be created (e.g. for thumbnails).
(Wireframes, mockups and more thinking required.)
Comments
----------------------------------------
Some relevant content (previous workarounds, etc.):
- https://drupal.stackexchange.com/questions/220599/how-to-add-image-field-in-civicrm
- https://civicrm.stackexchange.com/questions/15900/how-to-add-image-field-in-civicrmhttps://lab.civicrm.org/dev/drupal/-/issues/185CiviCRM public theme always the same as the CiviCRM Administrator theme2023-01-30T10:28:23ZspalmstromCiviCRM public theme always the same as the CiviCRM Administrator themeWhen running CiviCRM 5.57.1 under Drupal 9.5.2 under IIS it seems that the public theme setting is ignored; CiviCRM just uses the theme set for CiviCRM administration. To replicate got to Manage -> Appearance and select the various theme...When running CiviCRM 5.57.1 under Drupal 9.5.2 under IIS it seems that the public theme setting is ignored; CiviCRM just uses the theme set for CiviCRM administration. To replicate got to Manage -> Appearance and select the various themes. It doesn't appear to be browser related, I see the same with Edge, Chrome, Opera and Firefox. I don't know if it is IIS specific, but, of course, being theme related can't be replicated in the Demo environment.https://lab.civicrm.org/dev/core/-/issues/4101CiviCRM session management contributing to (causing?) 30s login delays with J...2023-01-30T08:32:33ZTOCM_MMatthewsCiviCRM session management contributing to (causing?) 30s login delays with JetPack and non-default themesOverview
----------------------------------------
There is more info in the CiviCRM StackExchange thread at https://civicrm.stackexchange.com/questions/42896/civicrm-plugin-causes-a-30-second-login-delay/42901#42901. And this is also pro...Overview
----------------------------------------
There is more info in the CiviCRM StackExchange thread at https://civicrm.stackexchange.com/questions/42896/civicrm-plugin-causes-a-30-second-login-delay/42901#42901. And this is also probably related to an old issue that was closed as not being a real problem, https://lab.civicrm.org/dev/wordpress/-/issues/32.
WordPress 6.x (several versions), CiviCRM several versions (including 5.57.0), JetPack (several versions, including latest), and every theme that I tried that wasn't one included with WordPress (currently using Vantage). Note that I have another WP/CiviCRM/JetPack/Vantage site that does NOT have this problem, so it could be extension or plugin related but I haven't been able to figure out what that might be given all the permutations.
But after going several rounds with JetPack engineering & support taking xdebug traces, their conclusion was the session management from CiviCRM was interfering with sessions in general, causing one of their threads to hang. Logins indirectly depended on JetPack threads, so logins hung. The workaround now is to disable the 'Dedicated Sync' thread (which JetPack has to do on their end). Causes some other minor issues or delays in the background, but at least our logins are fast now.
Reproduction steps
----------------------------------------
Wish I could tell you.
Current behaviour
----------------------------------------
Any login takes 30s before finishing. Looking at web server log (modified ssl_request to include # of seconds), the POST /wp-admin/admin-ajax.php?callback=[stuff] call was the one taking 30s. Trace files give more info, which is what JetPack engineering used.
Expected behaviour
----------------------------------------
Quick logins, which are happening now that JetPack isn't trying to keep a dedicate sync thread running. But I'd like to not have to disable features that I'm paying for in JetPack to have a usable site.
Environment information
----------------------------------------
Browser: All. Personally I've used Safari (latest versions since Oct 2022) and Chrome (latest versions since Oct 2022) on MacOS, but this affected every user.
CiviCRM, all versions since 5.54.0.
PHP: Started with 7.4.x, now on 8.0.27.
WordPress: Latest version since Oct 2022.
Database: MySQL 8.0.30
Web Server: Apache 2.4.53
OS: CentOS Stream 9
Comments
----------------------------------------
Understand that this has no easy fix, but I do want to record the fact that it does in fact have a real world impact, and if there's anything else that can be done to solve/mitigate/whatever it, I am more than happy to help get more information.https://lab.civicrm.org/dev/core/-/issues/4099Form Builder crashes trying to edit Mosaico Templates form.2023-01-30T08:31:04ZRichForm Builder crashes trying to edit Mosaico Templates form.Overview
----------------------------------------
Editing the "Mosaico Templates" form provided by the Mosaico extension causes an AngluarJS crash in Form Builder.
Reproduction steps
----------------------------------------
1. Use Civi...Overview
----------------------------------------
Editing the "Mosaico Templates" form provided by the Mosaico extension causes an AngluarJS crash in Form Builder.
Reproduction steps
----------------------------------------
1. Use Civi 5.57, mosaico ext 2.10.1665574809
1. Go to **Administer » Custom » Form Builder » Search Forms » Edit** on the `afsearchMosaicoTemplateList` one
2. Crash.
Current behaviour
----------------------------------------
Console log first error (there's lots, but I expect it's the first one that causes the others)
> Syntax Error: Token '{' invalid key at column 2 of the expression [{{ts('Configure template categories')}}] starting at [{ts('Configure template categories')}}].
Expected behaviour
----------------------------------------
Should be able to edit the form.
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 110.0b5
* __CiviCRM:__ 5.57
* __PHP:__ 7.4
* __CMS:__ D7
Comments
----------------------------------------
If I edit the .html file in question and remove the {{ }} parts then it's happy. But those {{ }} parts do work when the form is presented; just not in the editor.
I believe this is a core bug and not to do with mosaico.
https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/blob/9ecdf84b65640c79c73162c4659e94e56442ccea/ang/afsearchMosaicoTemplateList.aff.html#L12https://lab.civicrm.org/dev/core/-/issues/4098Feature Request: Ability to hide FormBuilder Search Forms when there are no r...2023-01-30T08:30:41ZbrienneFeature Request: Ability to hide FormBuilder Search Forms when there are no results foundOverview
----------------------------------------
By the combined powers of SearchKit and FormBuilder, you can create Search Forms and display them on the Contact Summary Page. While you can limit the type of contact on which to display ...Overview
----------------------------------------
By the combined powers of SearchKit and FormBuilder, you can create Search Forms and display them on the Contact Summary Page. While you can limit the type of contact on which to display it, i.e. Organization or Individual, it is currently not possible to hide the display when there are no results returned from the SearchKit search.
Example use-case
----------------------------------------
Creating a display block on Organizations to display the "Primary Contact". If the Organization has a primary contact, then the user would want to see that displayed in the block. If they do not have a primary contact, then a user may want to hide that display altogether.
1. Make a SearchKit search with the following criteria:
* Search for *Contacts*
* With (required) *Contact Related Contacts* if Relationship to contact = *Primary Contact of*
* Contact Type = *Organization*
1. Make a Table display for that SearchKit and configure as desired.
2. Make a Form from that display, check the *Add to Contact Summary Page* option, and select **Organization** next to the *For* label.
Current behaviour
----------------------------------------
Currently, it is not possible to hide the display block when there are no results found. Instead, you get a bright blue box on the Contact Summary Page that states "None found".
![Selection_202](/uploads/d03094d0e269f5e8529084f9e3e91ca6/Selection_202.png)
Proposed behaviour
----------------------------------------
There should a variety of options for users to configure how these blocks are displayed/not displayed when there are no options (such as the "no results options with Drupal Views).
For example, there could be a checkbox on the FormBuilder section that adds the display to the Contact Summary Page that gives the option to hide the display when there are no results. This type of checkbox could also be on the SearchKit display options.
![Selection_204](/uploads/cf167a5469addcff5093897b850b790e/Selection_204.png)
![Selection_205](/uploads/004f81cdb74c390c5568a25cfec1ec5c/Selection_205.png)
Comments
----------------------------------------
This is an unfunded feature request of suggestions for UX improvements.https://lab.civicrm.org/dev/core/-/issues/4093Searchkit: Change in place edit fields to textarea2023-01-30T08:26:02Zlevi.kSearchkit: Change in place edit fields to textareaOverview
----------------------------------------
Replace some fields in search kit to textarea
Example use-case
----------------------------------------
1. in place editing on a search display can be frustrating when dealing with more ...Overview
----------------------------------------
Replace some fields in search kit to textarea
Example use-case
----------------------------------------
1. in place editing on a search display can be frustrating when dealing with more than a few words of text
2. The main page for Search Kit also suffers from this issue in the new description field (and same goes for label field altough the label field is usually only a few words)
![image](/uploads/ab66207368f4dd446dba6a8571dc5e72/image.png)
inspired by https://lab.civicrm.org/dev/core/-/issues/3893https://lab.civicrm.org/dev/joomla/-/issues/44Class Civi\Api4\Event\Subscriber\ActivityPreCreationSubscriber was expected t...2023-01-24T16:19:34ZpotClass Civi\Api4\Event\Subscriber\ActivityPreCreationSubscriber was expected to have a service definition, but it did notUsing php 7.4 and civicrm 5.57.1 on Joomla I see:
```
$ php74 domains/domain.org/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php -s domain.org -u cronjob -p cronjob-pass -e Job -a execute
-->
WARNING: Class Civi\Api4...Using php 7.4 and civicrm 5.57.1 on Joomla I see:
```
$ php74 domains/domain.org/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php -s domain.org -u cronjob -p cronjob-pass -e Job -a execute
-->
WARNING: Class Civi\Api4\Event\Subscriber\ActivityPreCreationSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
WARNING: Class Civi\Api4\Event\Subscriber\ContributionPreSaveSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
WARNING: Class Civi\Api4\Event\Subscriber\CustomGroupPreCreationSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
WARNING: Class Class Civi\Api4\Event\Subscriber\OptionValuePreCreationSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
WARNING: Class PHP Deprecated: Non-static method JApplication::getMenu() should not be called statically in/home/usiako1s/domains/domain.org/public_html/plugins/authentication/civicrm//civicrm.php on line 305
```https://lab.civicrm.org/dev/core/-/issues/4003Adding contacts via profile should reflect in source2023-01-24T16:14:59ZyashodhaAdding contacts via profile should reflect in source It would be helpful to have source field reflect the date of creation of contact and profile used.
**Proposal**
When a contact is created via a standalone profile, this information is added to the source field of the contact.
It shou... It would be helpful to have source field reflect the date of creation of contact and profile used.
**Proposal**
When a contact is created via a standalone profile, this information is added to the source field of the contact.
It should show : Profile *'profile name'* on *added date*.
This would be helpful in searches and very relevant to source field.yashodhayashodha