CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2023-03-18T02:26:52Zhttps://lab.civicrm.org/dev/core/-/issues/2632Apiv4 Entity.get - no caching2023-03-18T02:26:52ZeileenApiv4 Entity.get - no cachingIf you call
```
Entity::get(FALSE)->addWhere('name', '=', 'xyx')->execute());
```
Mote that once it will do expensive file scans more than once from the looks @colemanw
```
protected function getRecords() {
$entities = [];
$...If you call
```
Entity::get(FALSE)->addWhere('name', '=', 'xyx')->execute());
```
Mote that once it will do expensive file scans more than once from the looks @colemanw
```
protected function getRecords() {
$entities = [];
$toGet = $this->_itemsToGet('name');
$locations = array_merge([\Civi::paths()->getPath('[civicrm.root]/Civi.php')],
array_column(\CRM_Extension_System::singleton()->getMapper()->getActiveModuleFiles(), 'filePath')
);
$enabledComponents = array_keys(\CRM_Core_Component::getEnabledComponents());
foreach ($locations as $location) {
$dir = \CRM_Utils_File::addTrailingSlash(dirname($location)) . 'Civi/Api4';
if (is_dir($dir)) {
foreach (glob("$dir/*.php") as $file) {
$matches = [];
preg_match('/(\w*)\.php$/', $file, $matches);
$className = '\Civi\Api4\\' . $matches[1];
if (is_a($className, '\Civi\Api4\Generic\AbstractEntity', TRUE)) {
$info = $className::getInfo();
$entityName = $info['name'];
$daoName = $info['dao'] ?? NULL;
// Only include DAO entities from enabled components
if ((!$toGet || in_array($entityName, $toGet)) &&
(!$daoName || !defined("{$daoName}::COMPONENT") || in_array($daoName::COMPONENT, $enabledComponents))
) {
$entities[$info['name']] = $info;
}
}
}
}
}
// Fetch custom entities unless we've already fetched everything requested
if ($this->includeCustom && (!$toGet || array_diff($toGet, array_keys($entities)))) {
$this->addCustomEntities($entities);
}
ksort($entities);
return $entities;
}
```https://lab.civicrm.org/dev/core/-/issues/4002API4 throws an exception when using `IN` and pseudoconstants aren't resolved2023-03-15T15:13:48ZJonGoldAPI4 throws an exception when using `IN` and pseudoconstants aren't resolvedConsider this API call in `mjwshared` (pinging @mattwire since he'll be interested):
```php
$paymentProcessorIDs = \Civi\Api4\PaymentProcessor::get(FALSE)
->addWhere('payment_processor_type_id:name', 'IN', ['Stripe', 'Globalpayments']...Consider this API call in `mjwshared` (pinging @mattwire since he'll be interested):
```php
$paymentProcessorIDs = \Civi\Api4\PaymentProcessor::get(FALSE)
->addWhere('payment_processor_type_id:name', 'IN', ['Stripe', 'Globalpayments'])
->execute()
```
This throws a fatal error when run if you don't have Stripe or Globalpayments installed. However, this seems inconsistent:
* If your operator is `=` not `IN`, you just get an empty set (e.g. `cv api4 PaymentProcessor.get +w 'payment_processor_type_id:name = "fake processor"'`).
* If your operator is `IN` but you're not using pseudoconstant lookup, you get an empty set, e.g. `cv api4 PaymentProcessor.get +w 'payment_processor_type_id IN [123456,234567]'`.
From a DX perspective, I think the correct result on the code in `mjwshared` is to return an empty set.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3101CiviCRM 5.47.0 Upgrade Failure with Extended Reports 5.112023-11-03T02:02:24ZkcristianoCiviCRM 5.47.0 Upgrade Failure with Extended Reports 5.11Logging here as extended reports is widely used.
CiviCRM 5.46 to 5.47.0
ExtendedReport v 5.11.0
WP 5.8.3
php 7.4
Upgrade via the UI or CLI fails:
```
Exception: "API error: DB Error: constraint violation on ReportTemplate.create"
#0...Logging here as extended reports is widely used.
CiviCRM 5.46 to 5.47.0
ExtendedReport v 5.11.0
WP 5.8.3
php 7.4
Upgrade via the UI or CLI fails:
```
Exception: "API error: DB Error: constraint violation on ReportTemplate.create"
#0 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(375): CRM_Core_ManagedEntities->onApiError("ReportTemplate", "create", (Array:8), (Array:4))
#1 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(187): CRM_Core_ManagedEntities->updateExistingEntity(Object(CRM_Core_DAO_Managed), (Array:10))
#2 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(167): CRM_Core_ManagedEntities->reconcileEnabledModule("nz.co.fuzion.extendedreport")
#3 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/ManagedEntities.php(128): CRM_Core_ManagedEntities->reconcileEnabledModules()
#4 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(413): CRM_Core_ManagedEntities->reconcile()
#5 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Form.php(818): CRM_Core_Invoke::rebuildMenuAndCaches(FALSE, TRUE)
#6 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Task.php(73): CRM_Upgrade_Form::doCoreFinish(Object(CRM_Queue_TaskContext), "5.47.alpha1", "5.47.0", "5.47.0", "/tmp/civicrm-post-upgrade7axXs1")
#7 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php(215): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
#8 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php(169): CRM_Queue_Runner->runNext()
#9 /home/cvdemo/public_html/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Headless.php(49): CRM_Queue_Runner->runAll()
#10 /home/cvdemo/public_html/wp-content/plugins/civicrm/wp-cli/civicrm.php(1083): CRM_Upgrade_Headless->run()
#11 /home/cvdemo/public_html/wp-content/plugins/civicrm/wp-cli/civicrm.php(171): CiviCRM_Command->upgradeDB()
#12 [internal function](): CiviCRM_Command->__invoke((Array:0), (Array:0))
#13 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func((Array:2), (Array:1), (Array:0))
#14 [internal function](): WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}((Array:1), (Array:0))
#15 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(491): call_user_func(Object(Closure), (Array:1), (Array:0))
#16 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(399): WP_CLI\Dispatcher\Subcommand->invoke((Array:1), (Array:0), (Array:0))
#17 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(422): WP_CLI\Runner->run_command((Array:2), (Array:0))
#18 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1194): WP_CLI\Runner->run_command_and_exit()
#19 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
#20 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
#21 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
#22 phar:///usr/local/bin/wp/php/boot-phar.php(11): include("phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php")
#23 /usr/local/bin/wp(4): include("phar:///usr/local/bin/wp/php/boot-phar.php")
#24 {main}
Error: API error: DB Error: constraint violation on ReportTemplate.create
Array
(
[is_error] => 1
[error_message] => API error: DB Error: constraint violation on ReportTemplate.create
)
```
You can either disable extended reports or upgrade extended reports to get the upgrade to succeed.
This seems to be a new issue as my testing to 5.47-RC did not have this issue. I had not tested upgrading in about a week. The two sites I tested this on are 'demo' sites that had not been on the RC.
We should be recommending extension updates before Core upgrade, but I was surprised I had this error.
cc @eileen Let me know if this issue belongs over at the extended report repo.https://lab.civicrm.org/dev/core/-/issues/1921Remove unneccessary isoToDate function2023-03-20T01:39:56ZeileenRemove unneccessary isoToDate function**[CQ] Let's celebrate the recent 6 year anniversary of making isoToData unnecessary by getting it out of the code**
Prior to July 2014 the following would fail
```
$contribution->fetch();
$contribution->save();
```
because the fetch ...**[CQ] Let's celebrate the recent 6 year anniversary of making isoToData unnecessary by getting it out of the code**
Prior to July 2014 the following would fail
```
$contribution->fetch();
$contribution->save();
```
because the fetch format for dates was invalid for save.
However, that all changed once this was merged https://github.com/civicrm/civicrm-packages/commit/283da6111677fc2b0176902b4c9a5cbcf668a258
Except for the bits that provide handling for it still litter our codehttps://lab.civicrm.org/dev/core/-/issues/1842Brief Description of Work Done during First Month of GSoC Project- Probots an...2022-06-24T03:30:58Zkartik1000Brief Description of Work Done during First Month of GSoC Project- Probots and GitLab to GitHub IntegrationHey All, I am Kartik and I had been selected for the GSoC Project Probots and Gitlab to GitHub Integration and so far I have completed 1 month of this project out of 3 months and I would like to share with the CiviCRM Community of the wo...Hey All, I am Kartik and I had been selected for the GSoC Project Probots and Gitlab to GitHub Integration and so far I have completed 1 month of this project out of 3 months and I would like to share with the CiviCRM Community of the work-done during this project. For more info. regarding project details, you can refer here https://civicrm.org/blog/kartik1000/gsoc-project-probots-and-gitlab-github-integration.
So, to begin with, one of the issues I faced, in the beginning, was how to test the working of the civi-bot that already exists in civi-core by adding more code to it related to issues I aimed to solve. So, with much discussion with @eileen and Saurabh, we decided to create a dev-bot from the forked repo of [probot-civicrm](https://github.com/civicrm/probot-civicrm) and use it for our purposes of testing. The code-repo for the same bot is present [here](https://github.com/kartik1000/civicrmdev-bot) with different issues I solved existing as different merged branches. Another issue I faced in setting up the dev-bot was hosting the bot. For the bot to be active always, we need to host it as a node-js application, the most suitable option for which are Heroku and glitch. For the simplicity of the glitch, I decided to use it for my purpose. The other issue that I faced was to keep the bot always active for that either one can use the ping method every 5 minutes or use the service of [uptime robot](https://uptimerobot.com/).
- The first issue I decided to complete was to make sure that we issue newcomer's message and information only to the new contributor and not keep posting the same message to every contributor. For this, I added simple logic of checking how many PRs have been made by the contributor, if the count is 1 then issue newcomer's message. It just required to fetch this information using the existing GitHub APIs. For the same reasons, I had to modify our existing template as well. The reviewing standards will be posted on every PR irrespective of it being a new contributor or not.
![Screenshot_2020-06-26_at_5.22.20_PM](/uploads/4f509c7f5511a91509d58084ba5fbb16/Screenshot_2020-06-26_at_5.22.20_PM.png)
This is an example of how a PR created by a new contributor looks like after making the required changes.
- The second issue I worked on is to merge the existing [stale-bot](https://probot.github.io/apps/stale/) with the existing civi-bot. Stale-bot closes PRs and issues which have been inactive for some time. It first labels PR as stale/wontfix and then after some-time, if the PR is still in-active then it closes the PR. This task was not too difficult as well since the entire open-source repo for the stale-bot already exists but since it is old many of its functions were depreciated and needed to be updated from the GitHub APIs and few other modifications were required. So, this task was also accomplished and tested as well.
![Screenshot_2020-06-26_at_5.36.20_PM](/uploads/05ecaa068e50f2e0ed89e43ddb68e81b/Screenshot_2020-06-26_at_5.36.20_PM.png)![Screenshot_2020-06-26_at_5.36.38_PM](/uploads/33aa7124ae2fd7757fa49cc723564f20/Screenshot_2020-06-26_at_5.36.38_PM.png)
Till now I have learnt a lot of new things from this project especially how powerful the GitHub APIs are which allow the user to receive almost any information regarding their repository. In the upcoming months, I hope to learn even more new things.
The entire code for the civicrmdev-bot is present in this [repository](https://github.com/kartik1000/civicrmdev-bot).
We plan to merge these features in the existing civi-bot in some time so that they can be used in CiviCRM-core.
I request to all the community members if you have any ideas or thoughts on what other things I can do to automate our workflow during the remaining project, please comment them on this issue and thanks to all!https://lab.civicrm.org/dev/core/-/issues/1962Possible regression - require 'make online contribution' to edit contribution...2021-04-14T19:31:59ZeileenPossible regression - require 'make online contribution' to edit contributions after upgrading to 5.29 rc w securityLast night it was reported that staff who had 'edit contributions' but not 'make online contributions' could not 'edit contributions' after upgrading from 5.26 to 5.29 (rc-security). I haven't established yet what 'can't edit means as I ...Last night it was reported that staff who had 'edit contributions' but not 'make online contributions' could not 'edit contributions' after upgrading from 5.26 to 5.29 (rc-security). I haven't established yet what 'can't edit means as I could only replicate locally 'can't cancel recurring' and I couldn't see how that might have changed.
I will ask more questions of the 'couldn't edit'-ors but it to the extent it relates to the recurring contribution forms I note - the forms started out as front-end-forms so
<item>
<path>civicrm/contribute/unsubscribe</path>
<title>Cancel Subscription</title>
<page_callback>CRM_Contribute_Form_CancelSubscription</page_callback>
<access_arguments>make online contributions</access_arguments>
<is_public>true</is_public>
</item>
Would be appropriate there.
Because the forms double up as back office forms we have never added is_public which intermittently comes up as a theming issue.
One option would be to have separate front end & back end urls so we would
1) add is_public => TRUE to the existing entry
2) add a second entry like
<item>
<path>civicrm/contribute/cancel</path>
<title>Cancel Subscription</title>
<page_callback>CRM_Contribute_Form_CancelSubscription</page_callback>
<access_arguments>edit contributions</access_arguments>
<is_public>FALSE</is_public>
</item>
And update the backoffice urls to point to that.https://lab.civicrm.org/dev/core/-/issues/752Add cid parameter in custom group form url & set it for Activity form2019-10-28T13:47:29ZeileenAdd cid parameter in custom group form url & set it for Activity formOverview
----------------------------------------
Custom group forms are usually loaded by AJAX, in the parent entities forms they extend from.
The class `CRM_Custom_Form_CustomDataByType` is the one that manages custom group form, but ...Overview
----------------------------------------
Custom group forms are usually loaded by AJAX, in the parent entities forms they extend from.
The class `CRM_Custom_Form_CustomDataByType` is the one that manages custom group form, but doesn't contain the **contact_id** attribute which is essential for performing tasks such as set a default value based on Contact's data, validate values against Contact's data, etc.
Now a days, theses tasks are hard to code, and most of them must rely on JQuery scripts or too complex workarounds to be achieved
From https://github.com/civicrm/civicrm-core/pull/13191
Before
----------------------------------------
class `CRM_Custom_Form_CustomDataByType` doesn't store **contact_id** value
After
----------------------------------------
class `CRM_Custom_Form_CustomDataByType` stores **contact_id** value, which is sent by the parent Entity through url parameter **cid** (when is available)
Technical Details
----------------------------------------
The url is called from this function:
https://github.com/civicrm/civicrm-core/blob/master/templates/CRM/common/customData.tpl#L29
```js
CRM.buildCustomData = function (type, subType, subName, cgCount, groupID, isMultiple, onlySubtype) {
var dataUrl = CRM.url('civicrm/custom', {type: type}),
prevCount = 1,
fname = '#customData',
storage = {};
. . . .
```
then there are **42 php/tpls** files that use this function and must be adapted to send the **cid** when is available
List of 42 files [here](https://gist.github.com/sluc23/a83cb45c05c784747b4d8b0c16a19af7)
Comments
----------------------------------------
This is the first iteration of an incremental change that must be performed to adapt every Entity in CiviCRM.
MM discussion [here](https://chat.civicrm.org/civicrm/pl/gcfhwf9g77fstcbupq3ynwhgce)https://lab.civicrm.org/dev/core/-/issues/1379Status should be Pending Refund but stays at Completed2023-01-09T05:03:23Zmagnolia61Status should be Pending Refund but stays at CompletedTesting some more with price sets and recording refunds and payments I ran into the following issue, which is pretty specific but can be a symptom of something that should be changed.
STEPS:
1. Event registration with price set. Fee 50....Testing some more with price sets and recording refunds and payments I ran into the following issue, which is pretty specific but can be a symptom of something that should be changed.
STEPS:
1. Event registration with price set. Fee 50. Contribution status = pending
2. Record Payment of 50 euro. Contribution status = Completed
3. Change Event price set to Fee 25. Contribution status = Pending Refund
4. Record Refund of 25. Contribution status = Completed
All is well at this point. But check what happens next
5. Change Event price set to Fee 50. Contribution status should become: Partially Paid.
Instead it remains at completed. Event Balance = 25 (25 should still be paid).
Also the contribution amount should have become 50 again. But it remains to be 25.
Two observations:
a. When at step 5 a fee higher than the original 50 is selected (fi. 75 euro) then the contribution changes correctly to Partially Paid
b. Because the 'record payment' & 'record refund' buttons react to the contribution status rather than the Balance, they are not shown when the contribution has a false status of Completed.
As a sidenote I think the 'Record Payment' and 'Record Refund' buttons/links should always be available and other amounts than the full balance should be able to be refunded.
Tested this on the sandbox as shown below:
![Peek_2019-11-09_10-59](/uploads/7d6a80a12e83bf62c8fe30f534567399/Peek_2019-11-09_10-59.gif)https://lab.civicrm.org/dev/core/-/issues/2020Revert 20202022-10-11T14:54:01ZeileenRevert 2020Entirely. PleaseEntirely. Please2020-01-01https://lab.civicrm.org/dev/core/-/issues/926Searching for removed contacts in a smart group doesn't work2019-06-27T05:05:12ZeileenSearching for removed contacts in a smart group doesn't workFrom the code this seems like a 'never worked' or not for a long time
Prelminary clean up & test to prevent breakage
https://github.com/civicrm/civicrm-core/pull/14181 - actual fix to come
![Screenshot_2019-05-02_17.12.39](/uploads/7...From the code this seems like a 'never worked' or not for a long time
Prelminary clean up & test to prevent breakage
https://github.com/civicrm/civicrm-core/pull/14181 - actual fix to come
![Screenshot_2019-05-02_17.12.39](/uploads/7214af45b746a26abac2592a52ff8251/Screenshot_2019-05-02_17.12.39.png)5.15.0https://lab.civicrm.org/dev/core/-/issues/1Allow to search for "in progress" contributions2024-03-01T16:29:50ZxavierAllow to search for "in progress" contributionsThe search is hiding the status "in progress". However, some payment processor do use this status (eg the sepa one), so it is in effect hiding contributions, and therefore makes the users very sad and confused
Fix:
allow to search on s...The search is hiding the status "in progress". However, some payment processor do use this status (eg the sepa one), so it is in effect hiding contributions, and therefore makes the users very sad and confused
Fix:
allow to search on status "in progress". Worse case scenario, no contributions have this status, and it will return an empty list4.7.31https://lab.civicrm.org/dev/core/-/issues/3253Contribution Detail: selecting the "soft credits" colum results in fatal error2022-04-22T15:52:45ZbgmContribution Detail: selecting the "soft credits" colum results in fatal errorTo reproduce:
* Go to the Reports > Contribution Reports > Contribution Details
* In the "columns", select the "soft credit" column
* Click "preview"
Results in a fatal error.
![Capture_d_écran_de_2018-03-07_16-58-43](/uploads/b3f0480...To reproduce:
* Go to the Reports > Contribution Reports > Contribution Details
* In the "columns", select the "soft credit" column
* Click "preview"
Results in a fatal error.
![Capture_d_écran_de_2018-03-07_16-58-43](/uploads/b3f048038f56aef323c6b101838b5b89/Capture_d_écran_de_2018-03-07_16-58-43.png)https://lab.civicrm.org/dev/core/-/issues/3305Allow overriding membership status temporarily until specific date2022-04-22T16:16:26Zomar_compucorpAllow overriding membership status temporarily until specific date## Overview
Improving membership status override to provide extra options to allow temporary status override.
## Details
Instead of having a checkbox called (Override Status?) in membership add/edit/renew form, it will be replaced wi...## Overview
Improving membership status override to provide extra options to allow temporary status override.
## Details
Instead of having a checkbox called (Override Status?) in membership add/edit/renew form, it will be replaced with a select box that allow the user to choose one of three options :
1- No
2- Override Permanently
3- Override until selected date
- If the first option is selected, then the membership will behave as if the old (Override Status?) is **unchecked**, which means that the membership is subject to membership status rules.
- If the 2nd option is selected, then the membership will behave as if the old (Override Status?) is **checked**, which mean that the membership status is overridden and is not subject to the membership statues rules.
- If the 3rd option is selected, then a new field will appear allowing the user to choose a date, in this status, the membership will behave similar to option 2, but when today date is equal or less than the selected date, then the "Update Membership Statuses" scheduled job will automatically convert its status back to **No**, which means that the membership status is overridden temporarily only for the selected date and after that it will revert back and be subject to membership status rules
## Mocks
![Screen_Shot_2018-01-12_at_18.09.22__1_](/uploads/17bbabdc32947f63399d37e9af7652e6/Screen_Shot_2018-01-12_at_18.09.22__1_.png)
## Most notable Technical Details :
civicrm_memebership.is_override field is removed, and two alternative fields are added, once is called status_override_type (DEFAULT 0) , and the other is status_override_end_date (DEFAULT NULL).
status_override_type may contain 0 (means no override), 1 (means override Permanently) or 3 (means Override until selected date), where status_override_end_date will contain the override end date in case the status override type is 3 (override until selected date).https://lab.civicrm.org/dev/core/-/issues/3534Simplify the settings for filesystem paths2022-06-11T16:35:32ZxurizaemonSimplify the settings for filesystem paths* [Hosting environments like WPEngine don't permit (extra) .php files located in the webroot (apparently)](https://civicrm.stackexchange.com/questions/15942/is-it-possible-in-civicrm-to-change-extension-of-cached-php-files-from-php-to-s)...* [Hosting environments like WPEngine don't permit (extra) .php files located in the webroot (apparently)](https://civicrm.stackexchange.com/questions/15942/is-it-possible-in-civicrm-to-change-extension-of-cached-php-files-from-php-to-s)
* Caching generated content there means potential for info leakage or execution via input variables
* Filesystem caching can be inefficient compared to other caches
* Herb has done work to get Smarty caching via Redis?
* https://www.drupal.org/node/2570335
* https://forum.civicrm.org/index.php?topic=35125.0;nowap
* https://issues.civicrm.org/jira/browse/CRM-17401
* https://github.com/freeform/civicrm-drupal-pantheon/blob/4.6.x/patches/smarty-redis-civi-cache.patch
* would Smarty 2 choke if we just set the path to redis:// ?
* .php extension is [tacked on here](https://github.com/civicrm/civicrm-packages/blob/master/Smarty/Smarty.class.php#L1512), may be other places to change thishttps://lab.civicrm.org/dev/core/-/issues/523Lybunt report - remove broken chart functionality2019-12-03T08:17:20ZeileenLybunt report - remove broken chart functionalityI'd like to propose removing the broken chart functionality from the lybunt report
There is a general level of brokenness with Charts in Civi (Luciano has a promising replacement option here https://lab.civicrm.org/partners/ixiam/report...I'd like to propose removing the broken chart functionality from the lybunt report
There is a general level of brokenness with Charts in Civi (Luciano has a promising replacement option here https://lab.civicrm.org/partners/ixiam/reportplus/blob/2.x/CRM/Reportplus/Utils/ChartJS.php#L8)
But for Lybunt it appears to be specifically & extra broken & this appears to be non-recent.
I propose that we remove the support for charts from this report. I've had a look & I can see nothing about the existing code that would make it easier to get the charts working again at some later point if we went that way (although I suspect we should be looking at something more robust that this report if we want to put that effort in)
![Screenshot_2018-11-15_13.24.44](/uploads/f655a0f7d8dde1c69375e6860863dafc/Screenshot_2018-11-15_13.24.44.png)![Screenshot_2018-11-15_13.24.48](/uploads/97a947046e4b52ed4848ac69dd9d7c91/Screenshot_2018-11-15_13.24.48.png)5.21.0seamusleeseamusleehttps://lab.civicrm.org/dev/core/-/issues/723File custom fields cause a fatal error when trying to merge2019-05-30T21:47:13ZtommyboboFile custom fields cause a fatal error when trying to mergeIf you are trying to merge a contact with a custom field that is a file, if the contact that will be deleted is passing a file to the remain contact, the merge will fail, generate a fatal error, and lose all the custom data in the set in...If you are trying to merge a contact with a custom field that is a file, if the contact that will be deleted is passing a file to the remain contact, the merge will fail, generate a fatal error, and lose all the custom data in the set including the file.
To recreate:
1. Create a contact custom field that accepts a file.
2. Add files to one or two contact records.
3. Merge a contact with a file into another contact
4. Fatal Error occurs. All files are no longer attached to the custom fields. The contact to be deleted loses all the custom fields. While the remaining contact looses only the file.
If the contact that is to remain has no image the error message is
> **No record found for given file ID - 0 and entity ID - 203**
The Entity ID is the Contact ID of the remaining contact
> Feb 13 16:13:23 [info] $backTrace = #0 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(381): CRM_Core_Error::backtrace("backTrace", TRUE)
> #1 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/File.php(234): CRM_Core_Error::fatal("No record found for given file ID - 0 and entity ID - 203")
> #2 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Dedupe/Merger.php(1723): CRM_Core_BAO_File::deleteFileReferences(NULL, "203", 9)
> #3 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Merge.php(289): CRM_Dedupe_Merger::moveAllBelongings("203", "204", (Array:11))
> #4 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(489): CRM_Contact_Form_Merge->postProcess()
> #5 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
> #6 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Contact_Form_Merge), "next", "Next")
> #7 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Contact_Form_Merge), "next")
> #8 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Merge), "next")
> #9 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("next")
> #10 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
> #11 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(282): CRM_Utils_Wrapper->run("CRM_Contact_Form_Merge", "Merge Contact", (Array:0))
> #12 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
> #13 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
> #14 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm.php(1240): CRM_Core_Invoke::invoke((Array:3))
> #15 /srv/www/demo19/public_html/wp-includes/class-wp-hook.php(298): CiviCRM_For_WordPress->invoke("")
> #16 /srv/www/demo19/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters("", (Array:1))
> #17 /srv/www/demo19/public_html/wp-includes/plugin.php(453): WP_Hook->do_action((Array:1))
> #18 /srv/www/demo19/public_html/wp-admin/admin.php(222): do_action("toplevel_page_CiviCRM")
> #19 {main}
If the remaining contact has a file that will be overwritten.
>** DB Error: syntax error**
> [code] => -2
> [message] => DB Error: syntax error
> [mode] => 16
> [debug_info] => UPDATE civicrm_value_test_info_4 SET image_9 = WHERE entity_id = 203 [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 'WHERE entity_id = 203' at line 1]
> [type] => DB_Error
> [user_info] => UPDATE civicrm_value_test_info_4 SET image_9 = WHERE entity_id = 203 [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 'WHERE entity_id = 203' at line 1]
> [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="UPDATE civicrm_value_test_info_4 SET image_9 = WHERE entity_id = 203 [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 'WHERE entity_id = 203' at line 1]"]
> )
> #1 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
> #2 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: syntax error", -2, 16, (Array:2), "UPDATE civicrm_value_test_info_4 SET image_9 = WHERE entity_id = 203 [native...")
> #3 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-2, 16, (Array:2), "UPDATE civicrm_value_test_info_4 SET image_9 = WHERE entity_id = 203 [native...")
> #4 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -2, 16, (Array:2), "UPDATE civicrm_value_test_info_4 SET image_9 = WHERE entity_id = 203 [native...", "DB_Error", TRUE)
> #5 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1907): PEAR->__call("raiseError", (Array:7))
> #6 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-2, NULL, NULL, "UPDATE civicrm_value_test_info_4 SET image_9 = WHERE entity_id = 203 [native...", "1064 ** You have an error in your SQL syntax; check the manual that correspon...")
> #7 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
> #8 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("UPDATE civicrm_value_test_info_4 SET image_9 = WHERE entity_id = 203")
> #9 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common->query("UPDATE civicrm_value_test_info_4 SET image_9 = WHERE entity_id = 203")
> #10 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("UPDATE civicrm_value_test_info_4 SET image_9 = WHERE entity_id = 203")
> #11 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(438): DB_DataObject->query("UPDATE civicrm_value_test_info_4 SET image_9 = WHERE entity_id = 203")
> #12 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1413): CRM_Core_DAO->query("UPDATE civicrm_value_test_info_4 SET image_9 = WHERE entity_id = 203", TRUE)
> #13 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Dedupe/Merger.php(1736): CRM_Core_DAO::executeQuery("UPDATE civicrm_value_test_info_4 SET image_9 = WHERE entity_id = 203")
> #14 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Merge.php(289): CRM_Dedupe_Merger::moveAllBelongings("203", "204", (Array:10))
> #15 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(489): CRM_Contact_Form_Merge->postProcess()
> #16 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
> #17 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Contact_Form_Merge), "next", "Next")
> #18 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Contact_Form_Merge), "next")
> #19 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Merge), "next")
> #20 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("next")
> #21 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
> #22 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(282): CRM_Utils_Wrapper->run("CRM_Contact_Form_Merge", "Merge Contact", (Array:0))
> #23 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
> #24 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
> #25 /srv/www/demo19/public_html/wp-content/plugins/civicrm/civicrm.php(1240): CRM_Core_Invoke::invoke((Array:3))
> #26 /srv/www/demo19/public_html/wp-includes/class-wp-hook.php(298): CiviCRM_For_WordPress->invoke("")
> #27 /srv/www/demo19/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters("", (Array:1))
> #28 /srv/www/demo19/public_html/wp-includes/plugin.php(453): WP_Hook->do_action((Array:1))
> #29 /srv/www/demo19/public_html/wp-admin/admin.php(222): do_action("toplevel_page_CiviCRM")5.15.0https://lab.civicrm.org/dev/core/-/issues/2Display Inbound Email: linefeed suppressed2024-03-26T10:22:28ZDetlev SieberDisplay Inbound Email: linefeed suppressedWhen viewing an activity of type inbound email, the text is displayed in "details". However, althought the database contains it in plain text and html, it is displayed as plain text without LFs, what makes it hardly readable.When viewing an activity of type inbound email, the text is displayed in "details". However, althought the database contains it in plain text and html, it is displayed as plain text without LFs, what makes it hardly readable.4.7.31https://lab.civicrm.org/dev/core/-/issues/3261Membership Detail Report fails when ACLs are enabled2022-04-22T15:53:02ZJonGoldMembership Detail Report fails when ACLs are enabledDuring a tidy-up on the Membership Detail Report, the `from()` method was modified to use `CRM_Report_Form::setFromBase()`, which concatenates `$this->aclFrom`. However, concatenating `$this->aclFrom` was never removed from the child cl...During a tidy-up on the Membership Detail Report, the `from()` method was modified to use `CRM_Report_Form::setFromBase()`, which concatenates `$this->aclFrom`. However, concatenating `$this->aclFrom` was never removed from the child class, so it's added to the SQL statement twice.5.3.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3294Make accordion panels accessible2024-03-15T20:39:55ZJoeMurrayMake accordion panels accessibleFrom https://civicrm.stackexchange.com/questions/17735/access-for-blind-users-to-civicrm/17752#17752
Accordion panels in the contact record cannot be expanded with the keyboard. In general, panels containing certain contact data (demogr...From https://civicrm.stackexchange.com/questions/17735/access-for-blind-users-to-civicrm/17752#17752
Accordion panels in the contact record cannot be expanded with the keyboard. In general, panels containing certain contact data (demographic information, address, etc.) are collapsed by default. It is necessary to use the mouse (JAWS) cursor in order to expand these panels.
A user should be able to expand an collapse an accordion panel by using the keyboard only and not be required to use the mouse. To accomplish this, elements of crm-acordion-header should be made keyboard focusable and be configured to provide feedback to the screen reader on whether they are collapsed or expanded. At the simplest level, these elements could be made buttons instead of divs and be given the aria-expanded attribute which would be dynamically toggled depending on the panel’s state. This will allow a keyboard user to focus the panel header with the tab key and expand or collapse it with ENTER or SPACE. More in-depth examples of accordion accessibility can be found at OAA Accessibility http://www.oaa-accessibility.org/examplep/accordian1/, and Basic Accessible Accordion Panel for jQuery http://www.jqueryscript.net/accordion/Basic-Accessible-Accordion-Plugin-jQuery.html.
Technical spec to come.
Was https://issues.civicrm.org/jira/browse/CRM-208255.73.0https://lab.civicrm.org/dev/core/-/issues/3338Add 'membership start date' as an option when creating Scheduled Reminder bas...2022-04-22T16:17:42ZjitendraAdd 'membership start date' as an option when creating Scheduled Reminder based on MembershipThis is what we get as options
![image](/uploads/022c3bd1a4f8dbb12a4b6f034de33c55/image.png)
This ticket aims to add membership start date to the option list.
@eileen @totten I don't see any logical reason for not including it before....This is what we get as options
![image](/uploads/022c3bd1a4f8dbb12a4b6f034de33c55/image.png)
This ticket aims to add membership start date to the option list.
@eileen @totten I don't see any logical reason for not including it before. Have I missed something? Do you see any downsides on adding start date as an option?jitendrajitendrahttps://lab.civicrm.org/dev/core/-/issues/3535Does CiviCRM allow us to declare which directories are writable, allowing the...2022-06-11T14:45:00ZherbdoolDoes CiviCRM allow us to declare which directories are writable, allowing the rest to be locked-down?CiviCRM core seems to be consistent in only writing to a files directory. Until recently, however, it attempted to write to the extensions directory to store extension updates. It's unclear if CiviCRM enforces this for extensions. I've h...CiviCRM core seems to be consistent in only writing to a files directory. Until recently, however, it attempted to write to the extensions directory to store extension updates. It's unclear if CiviCRM enforces this for extensions. I've heard that some extensions will write to directories outside of the files (but I haven't been able to confirm this). If that's the case then it will conflict with PAAS that only allow certain directories to be writable.https://lab.civicrm.org/dev/core/-/issues/3624Additional Bounce Patterns according to SMTP status codes2022-06-11T14:57:20ZpbatroffAdditional Bounce Patterns according to SMTP status codesCurrently SMTP status codes are mostly ignored when processing and classifying mails for bounces. I wrote a [stackexchange](https://civicrm.stackexchange.com/questions/23091/bounce-pattern-smtp-error-codes) question to see if someone had...Currently SMTP status codes are mostly ignored when processing and classifying mails for bounces. I wrote a [stackexchange](https://civicrm.stackexchange.com/questions/23091/bounce-pattern-smtp-error-codes) question to see if someone had already implemented this.
Since I got no feedback, I did it myself and had promising test results with the additional pattern:
From a sample bounce pool of approx. 4500 Mails, ~1500 were classified as syntax bounce (read: unknown) with the default bounce pattern. With the new pattern that shrank down to 400. (With some custom German away messages not yet parsed, so results should be even better, around ~200 syntax bounces)
My question would be if a pull request on civicrm-core is preferred, or if I should build an extension managing additional bounce pattern? I realize that with only 10 classifications available in CiviCRM-Bounce Type Vs. 30-50 SMTP Error codes the mapping could be open for some discussion, but I think this is a good start.
See [here](https://www.usps.org/info/smtp_codes.html) for simple smtp codes and [here](https://www.usps.org/info/smtp_status.html) for enhanced status codes as reference according to the [RFC-5248](https://tools.ietf.org/html/rfc5248#page-5)https://lab.civicrm.org/dev/core/-/issues/3Upgrade Symfony dependency to 3.x2024-02-09T08:47:50ZbgmUpgrade Symfony dependency to 3.xThe Ubuntu/Debian community have raised the issue that the 2.x version of Symfony used by CiviCRM is quickly going to be outdated. `nacc` on IRC recommended moving to 3.x.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=883640
cc @ja...The Ubuntu/Debian community have raised the issue that the 2.x version of Symfony used by CiviCRM is quickly going to be outdated. `nacc` on IRC recommended moving to 3.x.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=883640
cc @jackrabbithanna @totten
IRC log:
```
2018-02-12 13:11 < nacc> Apologies for what might be considered offtopic; I work on Ubuntu
Server, and am responsible for our current migration to PHP7.2 (from PHP7.1). One of
the fallouts was a move to Symfony 3.4.3, which in turns breaks CiviCRM which is incompatible
with 3.0 per composer.json. Is this a hard (and not likely to change) dependency, and should
we therefor remove civicrm from Ubuntu?
2018-02-12 13:16 < nacc> [...] our feature freeze is March 1. I will note as well that civicrm
is uninstallable in Debian for the same reason (the Debian pacakge, that is):
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=883640
```
@jackrabbithanna mentioned on Mattermost:
> Actually CiviCRM Core is behind Drupal 8, so upgrading it would be super
> D8 either is or will be using Symfony 3.2.8 (was/is 3.2.6)
> https://www.drupal.org/node/2743809
> https://www.drupal.org/node/2891254
> anyway, 8.4 definitely is Symfony 3.2https://lab.civicrm.org/dev/core/-/issues/3254Membership detail report uses deprecated method causing fatal error2022-04-22T15:52:53ZMichael McAndrewMembership detail report uses deprecated method causing fatal error## Before
Generated SQL for Membership Detail report contained errors. More specifically, it was joining twice on the `civicrm_acl_contact_cache` table *AS WELL AS* doing some ACL filtering in a where clause. See the example below
```s...## Before
Generated SQL for Membership Detail report contained errors. More specifically, it was joining twice on the `civicrm_acl_contact_cache` table *AS WELL AS* doing some ACL filtering in a where clause. See the example below
```sql
SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name AS civicrm_contact_sort_name,
contact_civireport.id AS civicrm_contact_id,
membership_civireport.membership_type_id AS civicrm_membership_membership_type_id,
membership_civireport.start_date AS civicrm_membership_membership_start_date,
membership_civireport.end_date AS civicrm_membership_membership_end_date,
membership_civireport.join_date AS civicrm_membership_join_date,
mem_status_civireport.name AS civicrm_membership_status_name,
contribution_civireport.id AS civicrm_contribution_contribution_id,
contribution_civireport.currency AS civicrm_contribution_currency
FROM civicrm_contact contact_civireport
INNER JOIN civicrm_acl_contact_cache aclContactCache ON contact_civireport.id = aclContactCache.contact_id
INNER JOIN civicrm_acl_contact_cache aclContactCache ON contact_civireport.id = aclContactCache.contact_id
INNER JOIN civicrm_membership membership_civireport ON contact_civireport.id = membership_civireport.contact_id
AND membership_civireport.is_test = 0
LEFT JOIN civicrm_membership_status mem_status_civireport ON mem_status_civireport.id = membership_civireport.status_id
LEFT JOIN civicrm_membership_payment cmp ON membership_civireport.id = cmp.membership_id
LEFT JOIN civicrm_contribution contribution_civireport ON cmp.contribution_id=contribution_civireport.id
WHERE (1)
AND (`contact_civireport`.`id` IS NULL
OR (`contact_civireport`.`id` IN
(SELECT contact_id
FROM civicrm_acl_contact_cache
WHERE user_id = 636)))
AND (`contact_civireport`.`is_deleted` IS NULL
OR (`contact_civireport`.`is_deleted` != 1))
GROUP BY membership_civireport.id
ORDER BY contact_civireport.sort_name ASC,
membership_civireport.membership_type_id ASC,
contribution_civireport.receive_date DESC
LIMIT 0,
50
```
This appears to be because it is calling the deprecated method `CRM_Report_Form::buildACLClause()` and then later calling `CRM_Report_Form::buildQuery` which then calls `CRM_Report_Form::buildPermissionClause();` (the function that buildACLClause was deprecated in favour of.
## After
When one removes the call to `::buildACLClause` from `CRM_Report_Form_Member_Detail::postProcess`, the generated SQL is as follows:
```sql
SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name AS civicrm_contact_sort_name,
contact_civireport.id AS civicrm_contact_id,
membership_civireport.membership_type_id AS civicrm_membership_membership_type_id,
membership_civireport.start_date AS civicrm_membership_membership_start_date,
membership_civireport.end_date AS civicrm_membership_membership_end_date,
membership_civireport.join_date AS civicrm_membership_join_date,
mem_status_civireport.name AS civicrm_membership_status_name,
contribution_civireport.id AS civicrm_contribution_contribution_id,
contribution_civireport.currency AS civicrm_contribution_currency
FROM civicrm_contact contact_civireport
INNER JOIN civicrm_membership membership_civireport ON contact_civireport.id = membership_civireport.contact_id
AND membership_civireport.is_test = 0
LEFT JOIN civicrm_membership_status mem_status_civireport ON mem_status_civireport.id = membership_civireport.status_id
LEFT JOIN civicrm_membership_payment cmp ON membership_civireport.id = cmp.membership_id
LEFT JOIN civicrm_contribution contribution_civireport ON cmp.contribution_id=contribution_civireport.id
WHERE (1)
AND (`contact_civireport`.`id` IS NULL
OR (`contact_civireport`.`id` IN
(SELECT contact_id
FROM civicrm_acl_contact_cache
WHERE user_id = 636)))
AND (`contact_civireport`.`is_deleted` IS NULL
OR (`contact_civireport`.`is_deleted` != 1))
GROUP BY membership_civireport.id
ORDER BY contact_civireport.sort_name ASC,
membership_civireport.membership_type_id ASC,
contribution_civireport.receive_date DESC
LIMIT 0,
50
```
This SQL works nicely and the report respects the ACL.
In turns out that once you have removed the call to the deprecated function, the postProcess method is identical to its parent, so it can be removed completely.https://lab.civicrm.org/dev/core/-/issues/3296Add aria-label (and label?) to form elements missing them2022-04-22T16:04:46ZJoeMurrayAdd aria-label (and label?) to form elements missing themUse accessible labels for all pages/forms following spec at https://www.w3.org/WAI/tutorials/forms/labels.
Tasks will include the following general points. Some details will change to ensure that ts() is handled properly, addField() is...Use accessible labels for all pages/forms following spec at https://www.w3.org/WAI/tutorials/forms/labels.
Tasks will include the following general points. Some details will change to ensure that ts() is handled properly, addField() is used appropriately, etc from comments below:
1. Label without control elements/text: In some pages/forms we are simply declaring labels under `<label>` tag against an element/text.
1. Remove tag when it is declared against a text as in
```
- <div class="label"><label>{ts}Contact{/ts}</label></div>
+ <div class="label">{ts}Contact{/ts}</div>
```
1. Add `aria-labelledby` attribute to tag
```
- <label>{ts}Contact{/ts}</label><input type="text" name="contact_id" id="contact_id">
+ <label aria-labelledby="contact_id">{ts}Contact{/ts}</label><input type="text" name="contact_id" id="contact_id">
```
1. Add aria-label attribute to QuickForm element when label is not declared in tpl: Say for example we are assigning a label to a QuickForm element
`$form->addElement('text', 'pledge_installments', ts('Installments'), array('size' => 3));` but not using it in tpl.
**Fix**: Add aria-label attribute to QuickForm element:
```
- $form->addElement('text', 'pledge_installments', ts('Installments'), array('size' => 3));
+ $form->addElement('text', 'pledge_installments', ts('Installments'), array('size' => 3, 'aria-label' => ts('Pledge Installments')));
```
1. Add aria-label attribute to form element via JS: A special case when after declaring this attribute didn't got added to the QuickForm element as in case of 'Credit card Expiration date' when this element got rendered in the quickform as `$form->add('date', 'credit_card_exp_date', ts('Expiration Date'), ['format' => M Y'])` and thus rendered into two select field without this attribute
**Fix**: Add `aria-label` attribute via JS instead. This might involve modifying $.fn.crmDatepicker in Common.js to add aria-labels to the autogenerated date elements it inserts.
1. Fix date fields.
Focus initially on public facing pages/forms:
1. [x] contribution page
1. [x] event registration page
1. [x] price field block
1. [x] newsletter signup
1. [x] user registration in CMS
1. [x] profile create/edit/search
1. [x] contact dashboard
1. [x] contact summary page
1. [ ] CiviReports
1. [ ] Search Forms
1. [ ] Backend registration forms
https://lab.civicrm.org/dev/core/-/issues/3340Additional Memberships added via Contribution Pages overwrite existing member...2022-04-22T16:17:47ZalanpuccinelliAdditional Memberships added via Contribution Pages overwrite existing membershipsVerified on current demo install of ver 5.0
To Reproduce:
1. Create an inherited membership for an individual by assigning the membership to a related organization.
2. Create a Pending membership via a contribution page and select "Pay ...Verified on current demo install of ver 5.0
To Reproduce:
1. Create an inherited membership for an individual by assigning the membership to a related organization.
2. Create a Pending membership via a contribution page and select "Pay Later/by check"
3. Notice that Pending membership is not created for contribution page membership
4. Receive payment for the pending membership contribution. (Membership should switch to active at this point)
5. Because there is no pending membership it appears that the system will overwrite the existing inherited membership and extend the end date by whatever the new membership period is.https://lab.civicrm.org/dev/core/-/issues/3524Does CiviCRM make it possible to specify which directories are private and wh...2022-06-11T14:42:36ZherbdoolDoes CiviCRM make it possible to specify which directories are private and which are public-accessible?This is currently not possible in CiviCRM. A PAAS like Pantheon provides a specific folder for private file uploads and we can't change it to any other folder. However, CiviCRM assumes that the site is either running on Apache (and it ca...This is currently not possible in CiviCRM. A PAAS like Pantheon provides a specific folder for private file uploads and we can't change it to any other folder. However, CiviCRM assumes that the site is either running on Apache (and it can use .htaccess files) or that custom NGINX rules can be set. This is an unreasonable expectation.
CiviCRM requires some filepaths to be private and will complain if they're not configured properly: https://civicrm.org/advisory/civi-sa-2014-001-risk-information-disclosure
CiviCRM has hardcoded the filepaths of some things based on the path of CIVICRM_TEMPLATE_COMPILEDIR. The problem is that CIVICRM_TEMPLATE_COMPILEDIR needs to be private but many of the files that CiviCRM is trying to write based on that path need to be publicly available (e.g. dynamically written JS).
An audit of both baseFilePath() and CIVICRM_TEMPLATE_COMPILEDIR:
[audit-template_compiledir.txt](/uploads/9302db5820d0af0181edf9990fd47b90/audit-template_compiledir.txt).
Tim provided some technical guidance in another thread https://lab.civicrm.org/dev/cloud-native/issues/1#note_3124:
> - The references to `baseFilePath()` in `CRM_Utils_System_*` should become irrelevant if `civicrm.settings.php` has the `$civicrm_paths['civicrm.files']`
>
> - The references to `baseFilePath()` in `CRM_Utils_File::absoluteDirectory` and `::relativeDirectory` already appear to be irrelevant within `civicrm-core`. (The only usage I could find was one which explicitly set its own base.)
>
> - The reference to `baseFilePath()` in `CRM_Core_Config_Runtime` is more effort. I don't know if it'd work, but my first try would be (a) lookup a path-variable like `Civi::paths()->getVariable('civicrm.log', 'path')`, (b) declare the variable in `Civi\Core\Paths`, (c) change the relative boot order of `Civi\Core\Paths` and `CRM_Core_Config_Runtime`.
>
> - I think `CRM/Utils/Cache/SerializeCache.php` is unused.
>
> - The `CRM/Core/IDS.php` line feels silly. We should pick one folder! Pointing that at `templates_c` makes as much sense as `uploadDir`. (TBH, I'm not sure does anything now that `Config.IDS.ini` has been killed.)
>
> - `Civi/Core/Container.php` and `CRM/Extension/ClassLoader.php` are very similar to the Smarty use-case (i.e. writing out ephemeral PHP files to take advantage of opcode caching).https://lab.civicrm.org/dev/core/-/issues/3568Improve process for creating plain text version of mailing2024-02-13T05:03:24ZMichael McAndrewImprove process for creating plain text version of mailing## Overview
Convert any html contained in tokens to plain text for plain text emails
## Before
HTML in tokens that contained HTML was being outputted to plain text versions of emails.
## After
HTML in tokens is converted to plain te...## Overview
Convert any html contained in tokens to plain text for plain text emails
## Before
HTML in tokens that contained HTML was being outputted to plain text versions of emails.
## After
HTML in tokens is converted to plain text.
## Technical Details
This issue is NOT about generating plain text and HTML versions of tokens. It is about converting an entire email from HTML to plain text when no plain text version is given. This conversion currently proceeds as follows:
1. Check to see if a plain text version has been submitted. If not
2. Convert the HTML to plain text
3. Do token substitution
The problem is that if the token contains html, that HTML persists in the email. The proposed solution is to do the conversion from HTML to plain text after token substitution, i.e.
1. Check to see if a plain text version has been submitted. If not
2. Convert the HTML to plain text
3. Do token substitution
This patch is split between [PR 12061 on core](https://github.com/civicrm/civicrm-core/pull/12061) and [PR 20 on flexmailer](https://github.com/civicrm/org.civicrm.flexmailer/pull/20).
The flexmailer patch will continue to report a single failure until the core patch is merged, at which point we can hopefully run the tests against flexmailer again and merge this patch.
@totten suggested defining tokens with TokenProcessor, whose tokens auto-convert from HTML to plain text and visa versa. However, I am not sure this is going to work for the following reason. When you convert from HTML to plain text (at least with the HTML to plain text converter that we are using) the structure of the text is altered and links appear at the bottom of the converted text. Therefore, if you run multiple conversions, you will get multiple lists of links scattered throughout the email. Best to do html to plain text conversion at the end of the process.
All this is not to say that one shouldn't define plain text and HTML versions of tokens. I think it is fine to do that if you want to. I just think that automatic conversion of HTML to plain text should happen one time only, after the entire email has been assembled.
Note that [PR 12061 on core](https://github.com/civicrm/civicrm-core/pull/12061) removes the check for nofollow in the email html output of the test CRM_Mailing_BaseMailingSystemTest::testHtmlWithOpenAndUrlTracking. The intent of https://issues.civicrm.org/jira/browse/CRM-21768 is not affected. nofollow still appears in the public view (e.g. http://example.org/civicrm/mailing/view) but it is not tested.
I would have added it to a test of civicrm/mailing/view but I could not find any tests there.
This issue was originally discussed here: https://issues.civicrm.org/jira/browse/CRM-21197 and a PR submitted here: https://github.com/civicrm/civicrm-core/pull/10998. But the PR was rejected because it caused issues with Flexmailer.
Also, on the seperate issue of click tracking plain text emails. @totten - you said [here](https://github.com/civicrm/civicrm-core/pull/10998#discussion_r158175327) that you thought it was a significant policy change. It isn't as significant as you think. *Links that are tracked in HTML continue to be tracked in plain text*. Links that are not tracked in HTML (because they were not in an `<a>` tag) are not tracked in plain text either. i.e. there is no significant loss of functionality.https://lab.civicrm.org/dev/core/-/issues/3528[META] Does CiviCRM make it easy to provide the absolute system path at runti...2024-02-08T05:03:20Zherbdool[META] Does CiviCRM make it easy to provide the absolute system path at runtime from the environment rather than hardcoded in a file?In CiviCRM 4.7 this seems to be mostly solved but issues keep cropping up now and then. The environment variables can be specified in the settings file. In CiviCRM 4.7.25 it finally got rid of the hardcoded absolute path in Config.IDS.in...In CiviCRM 4.7 this seems to be mostly solved but issues keep cropping up now and then. The environment variables can be specified in the settings file. In CiviCRM 4.7.25 it finally got rid of the hardcoded absolute path in Config.IDS.ini. Most recently I've noticed some hardcoded paths in civicrm_cache where group_name = js_strings. It's unclear if the cache is regenerated if the paths cannot be found. Even better would be to avoid saving the full path.
----
Issues towards this goal:
* https://lab.civicrm.org/dev/cloud-native/issues/12
* https://lab.civicrm.org/dev/cloud-native/issues/14
* https://lab.civicrm.org/dev/cloud-native/issues/15
* https://lab.civicrm.org/dev/cloud-native/issues/16https://lab.civicrm.org/dev/core/-/issues/3579Add pause/resume functionality to civicrm bulk mailing.2022-06-11T14:54:43ZjitendraAdd pause/resume functionality to civicrm bulk mailing.Scenario
Site admin is sending out a big blast but want to send out a press release without waiting for first job to end.Scenario
Site admin is sending out a big blast but want to send out a press release without waiting for first job to end.5.4.0https://lab.civicrm.org/dev/core/-/issues/3258CiviReports issue with boolean fields2022-04-22T15:52:59ZMWestergaardCiviReports issue with boolean fieldsI recently noticed that boolean fields (Deceased, Do Not Email, Do Not SMS, etc) are all displayed as "Yes" on contact and membership reports, regardless of their actual values. The data itself is correct and is fine elsewhere, such as i...I recently noticed that boolean fields (Deceased, Do Not Email, Do Not SMS, etc) are all displayed as "Yes" on contact and membership reports, regardless of their actual values. The data itself is correct and is fine elsewhere, such as in search results and contact displays. The issue seems to be only on report display. The report filters work correctly on those fields, only the display is wrong. I checked my production system (CiviHosting), my dev system (personal Linux box), and the public WordPress demo system at wpmaster.demo.civicrm.org and I see the same thing. I tried the Drupal demo system at CiviHosting and did not see this issue. Perhaps it's an issue under WordPress. I was advised on StackExchange to submit as an issue.
My system is CiviCRM 5.2.2, WordPress 4.9.6, PHP 7.1.16, MySQL 5.7.21.5.3.0https://lab.civicrm.org/dev/core/-/issues/3299Make alerts accessible2022-04-22T16:04:58ZJoeMurrayMake alerts accessibleFrom Clare comes a problem statement and some brainstorming ideas:
> A problem for our low vision users is alerts, their AT software doesn't recognise them, so they miss warnings and end up adding duplicates. It would be great to have s...From Clare comes a problem statement and some brainstorming ideas:
> A problem for our low vision users is alerts, their AT software doesn't recognise them, so they miss warnings and end up adding duplicates. It would be great to have some sort of per user control for setting how alerts display, perhaps even adding audio cues.
Use alert role approach suggested at https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/alert/index.html as this will allow audio cues to be given to users of screen readers.
Note more details at https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/#alert and also https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/#alertdialog
https://www.w3.org/TR/UNDERSTANDING-WCAG20/time-limits-no-exceptions.html indicates that there should be no time limits like quickly disappearing alerts.
As a first pass, let's implement a site wide setting to disable alerts from disappearing. We don't have a good design pattern currently for per user preferences. When we do move to per user preferences, the default should be to have alerts not disappear.justinfreeman (Agileware)justinfreeman (Agileware)https://lab.civicrm.org/dev/core/-/issues/3320Admin Membership type is displayed on Public contribution page.2022-04-22T16:17:02ZjitendraAdmin Membership type is displayed on Public contribution page.When visibility of membership type is updated to `Admin`, it is still displayed on front-end contribution pages. Steps to replicate -
- Create a membership type.
- Add it to a contribution page.
- Set visibility of the type to `Admin`.
...When visibility of membership type is updated to `Admin`, it is still displayed on front-end contribution pages. Steps to replicate -
- Create a membership type.
- Add it to a contribution page.
- Set visibility of the type to `Admin`.
- Navigate to contribution page - the membership type is still displayed on the page.jitendrajitendrahttps://lab.civicrm.org/dev/core/-/issues/3536[META] Does CiviCRM make it easy for all connection-related configuration to ...2024-02-10T05:03:26Zherbdool[META] Does CiviCRM make it easy for all connection-related configuration to be provided via environment variables: database credentials, key-value database credentials, filesystem, and so on?It is possible by editing civicrm.settings.php to inject the environment variables.
I'm wondering if a more generic framework might be useful where CiviCRM provides some boilerplate for what strings are required from the environment va...It is possible by editing civicrm.settings.php to inject the environment variables.
I'm wondering if a more generic framework might be useful where CiviCRM provides some boilerplate for what strings are required from the environment variables.
This could help since there is so much repetition of variables that need to be assigned.
----
Issues towards this goal:
* https://lab.civicrm.org/dev/cloud-native/issues/12
* https://lab.civicrm.org/dev/cloud-native/issues/7
* https://lab.civicrm.org/dev/cloud-native/issues/8https://lab.civicrm.org/dev/core/-/issues/3625Recipient groups in a scheduled mail return no recipients.2022-06-11T14:57:22ZspalmstromRecipient groups in a scheduled mail return no recipients.Creating or reusing a scheduled mail in CiviMail v4.7.31 under Joomla returns no recipients when groups are added to the recipient list. The demo sites are several versions behind and run under Drupal, so can't be used to verify. At thi...Creating or reusing a scheduled mail in CiviMail v4.7.31 under Joomla returns no recipients when groups are added to the recipient list. The demo sites are several versions behind and run under Drupal, so can't be used to verify. At this point I'm unsure of where the search takes place, so have a problem debugging it.https://lab.civicrm.org/dev/core/-/issues/1827Activity Search : Tags are not working2020-12-22T01:26:13ZsamuelsovActivity Search : Tags are not workingIn activity search screen, when filtering by tags, the wrong tag is filtered.
![Peek_18-06-2020_17-13](/uploads/1a03146c6f0f67ea707bd243abde980d/Peek_18-06-2020_17-13.gif)In activity search screen, when filtering by tags, the wrong tag is filtered.
![Peek_18-06-2020_17-13](/uploads/1a03146c6f0f67ea707bd243abde980d/Peek_18-06-2020_17-13.gif)https://lab.civicrm.org/dev/core/-/issues/4835Standalone - Iterate on Roles2024-02-05T11:05:00ZkcristianoStandalone - Iterate on RolesFollow up to https://lab.civicrm.org/dev/core/-/issues/4466
At the Ashbourne Sprint, discussion was had on roles and Standalone now has 3 roles:
- Everyone, including anonymous users
- Staff
- Administrator
One possible concern is th...Follow up to https://lab.civicrm.org/dev/core/-/issues/4466
At the Ashbourne Sprint, discussion was had on roles and Standalone now has 3 roles:
- Everyone, including anonymous users
- Staff
- Administrator
One possible concern is that the `Administrator` role can be changed. Recent PRs have made it that the role cannot be removed, but the capabilities are editable. If the capabilities were changed by an existing admin, the system will become unusable/
Steps to reproduce
- Login as an admin
- remove all permissions for the administrator role except AuthX.
- Log out
- Log in
- Error - with too many redirects as the admin account cannopt access CiviCRM
We should protect against this by
- not having any permissions show for the administrator account
- make the internal name unchangeable
- The label can be changed by the site admin
- programmatically granting all permissions to the `administrator` role
In addition, there is a potential UX issue with assigning permissions.
The Search kit multi-select is useful if we only want a few permissions, but difficult if a role needs many permissions.
Rather than revert to the existing laundry list of permission that are used by Drupal and WP, we should consider using a cjheckbox approach by 'category'
@andyburns sugested an interface that is similar to the following:
![image](/uploads/d047d54bae7dcd3cf7caa0a02f2369db/image.png)
This interface is from the User Role Editor plugin from WordPress.
It categorizes permissions by type, allows filtering and has a checkbox interface. I think this would be a nice improvement to be considered.jaapjansmajaapjansmahttps://lab.civicrm.org/dev/core/-/issues/3231Correct Mailing Report unique Count2022-04-22T15:51:27ZsunilCorrect Mailing Report unique CountMailing -> Scheduled and Sent Mailings -> Report
Unique Opens -> Report
Total Opens -> Report
Both Report show same count.Mailing -> Scheduled and Sent Mailings -> Report
Unique Opens -> Report
Total Opens -> Report
Both Report show same count.5.10https://lab.civicrm.org/dev/core/-/issues/3298Make select2 widgets accessible2022-04-22T16:04:58ZMonish DebMake select2 widgets accessibleFrom https://civicrm.stackexchange.com/questions/17735/access-for-blind-users-to-civicrm/17752#17752
Civi makes use of the Select2 library in a number of places to generate certain pop-up lists. Basically, the library creates an edit-co...From https://civicrm.stackexchange.com/questions/17735/access-for-blind-users-to-civicrm/17752#17752
Civi makes use of the Select2 library in a number of places to generate certain pop-up lists. Basically, the library creates an edit-combo box (one where you have both a pre-defined list of options, but can also type in to narrow this list). While these elements are keyboard accessible, there are occasionally focus issues. As an example, choosing a date range filter on searches offers selections like, “previous year,” but also allows the user to choose a date range. When selecting the choose a date range option edit fields appear next to the dropdown allowing the user to enter a start and end date range. However, for a screen reader user, pressing TAB after selecting this option will focus on the next group of fields, bypassing the date range fields. Although they don’t use Select2, this behavior is also observed with combo boxes that dynamically populate other combo boxes (like on the import data screens).
Tech spec to come.https://lab.civicrm.org/dev/core/-/issues/3327Duplicate Membership Shows for "Completed" Memberships2022-04-22T16:17:16Zlee.goodingDuplicate Membership Shows for "Completed" MembershipsThis notification shows for memberships that have been marked as completed, which does not make sense for our setup. We do not want people to use the links in that notification as we want to keep a history of when memberships start/end, ...This notification shows for memberships that have been marked as completed, which does not make sense for our setup. We do not want people to use the links in that notification as we want to keep a history of when memberships start/end, gaps between them, etc.
Would it not make more sense to have "completed" or closed memberships not show as a duplicate?https://lab.civicrm.org/dev/core/-/issues/3530[META] Does CiviCRM make it easy to install without using the UI?2024-02-08T05:03:21Zherbdool[META] Does CiviCRM make it easy to install without using the UI?Currently CiviCRM can be installed via the commandline with drush ~~or cv~~, but it doesn't allow for environmental variables in the command (from what I can tell). I'm not sure if that's the best way to automate a build anyway. To allow...Currently CiviCRM can be installed via the commandline with drush ~~or cv~~, but it doesn't allow for environmental variables in the command (from what I can tell). I'm not sure if that's the best way to automate a build anyway. To allow for builds we may need to be able to point CiviCRM to a file with the env vars and then install fresh. And may need to override the default behaviour of CiviCRM showing errors when it finds a civicrm.settings.php already.
---
Issues towards this goal:
* https://lab.civicrm.org/dev/cloud-native/issues/7
* https://lab.civicrm.org/dev/cloud-native/issues/8https://lab.civicrm.org/dev/core/-/issues/3626"New Mailing" prematurely schedules blasts and old mailings can be resent2022-06-11T14:57:24Ztotten"New Mailing" prematurely schedules blasts and old mailings can be resent## Steps to reproduce
* Open a MySQL console where you can monitor the content of `civicrm_mailing_job`.
* Make a `Mailing => New Mailing`
* Fill in name/subject/recipients/body on the first page.
* Go to the second page
* __Observe__:...## Steps to reproduce
* Open a MySQL console where you can monitor the content of `civicrm_mailing_job`.
* Make a `Mailing => New Mailing`
* Fill in name/subject/recipients/body on the first page.
* Go to the second page
* __Observe__: In the MySQL console, observe that there are no jobs scheduled for this mailing.
* Set a delivery time. *But don't hit `Submit`*. (You're just thinking about delivery... but not actually sending yet.)
* Open an HTML or plain-text preview.
* __Observe__: In the MySQL console, observe that there is now a scheduled job for this mailing.
To resend an old mailing:
* Any mailing will be queued for redelivery if a user with permission to use CiviMail visits URL `civicrm/a/#/mailing/<MAILING_ID>` (we've seen several users end up on this URL, apparently via browser history)
## Mitigating factors
The only way I've found to trigger the premature mailing (so far) has been to explicitly set the delivery date. It's quite bad to be sending prematurely, but I think it's taken a while to recognize because the delivery date is *the last thing* in the entire process -- *most of the time*, one doesn't set the delivery date until everything else has been settled. This probably means the real-world impact hasn't been as bad one might fear.
## Context
This appears to be a regression in 4.7.31. Related PRs:
* https://issues.civicrm.org/jira/browse/CRM-21260
* https://issues.civicrm.org/jira/browse/CRM-21316
* https://issues.civicrm.org/jira/browse/CRM-21749
* https://github.com/civicrm/civicrm-core/pull/11142/
* https://github.com/civicrm/civicrm-core/pull/11653/
## Solution
* Because the fix is in javascript, resolving this bug requires flushing CiviCRM caches (`cv flush` command) after upgrading to CiviCRM 5.0.05.0.0https://lab.civicrm.org/dev/core/-/issues/6Add help text for "is public" setting on form to edit custom field sets2023-06-23T17:54:21ZSean ColsenAdd help text for "is public" setting on form to edit custom field setsThere's a new setting for making custom field sets public/private. I think it needs some help text.
![mockup](https://user-images.githubusercontent.com/42411/36987279-f763aae0-2069-11e8-99c8-b3dd9953a895.png)
How exactly does CiviCRM c...There's a new setting for making custom field sets public/private. I think it needs some help text.
![mockup](https://user-images.githubusercontent.com/42411/36987279-f763aae0-2069-11e8-99c8-b3dd9953a895.png)
How exactly does CiviCRM change its behavior based on this setting?
As far as I can tell, this setting has only two effects:
* Custom fields attached directly to *events* are hidden from the event info page if they are part of a private custom field set
* from https://github.com/civicrm/civicrm-core/pull/10028
* Custom fields attached to some other entities (e.g. participation, contribution, etc... *not sure of comprehensive list*) are displayed in the registration email sent to participants, but only when this email comes from a back-office registration. These fields will be hidden if they're part of a private set.
* from https://github.com/civicrm/civicrm-core/pull/106615.8https://lab.civicrm.org/dev/core/-/issues/3227getAddressColumns defined `street_name` twice.2022-04-22T15:51:17ZJonGoldgetAddressColumns defined `street_name` twice.As reported [on Stack Exchange](https://civicrm.stackexchange.com/questions/26457/columns-available-for-sorting-in-civireport-seem-arbitrary-random), you can't sort by `address_name`, even though it's defined to allow it. That's because...As reported [on Stack Exchange](https://civicrm.stackexchange.com/questions/26457/columns-available-for-sorting-in-civireport-seem-arbitrary-random), you can't sort by `address_name`, even though it's defined to allow it. That's because it's defined twice in the `$spec` array.5.7JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3328Membership updates not recorded in contact log2022-04-22T16:17:17ZedvanleeuwenMembership updates not recorded in contact logI have noticed that not all changes in the membership records are registered in the contact log. See attachments.![activity](/uploads/95e4d88c1b16c40fa685032cb4b97b75/activity.png)![log](/uploads/878cd7f93d4967ae70047de240f502d7/log.png)I have noticed that not all changes in the membership records are registered in the contact log. See attachments.![activity](/uploads/95e4d88c1b16c40fa685032cb4b97b75/activity.png)![log](/uploads/878cd7f93d4967ae70047de240f502d7/log.png)https://lab.civicrm.org/dev/core/-/issues/3549On multilingual mode, choosing mailing group doesn't affect recipient count a...2022-06-11T14:50:42ZMonish DebOn multilingual mode, choosing mailing group doesn't affect recipient count and list## Steps to reproduce
1. Enable multilingual mode
2. Go to `Mailing => New Mailing`
3. Choose one or more mailing group.
__Observe__: The recipient count doesn't affect
## Context
This appears to be a regression in 4.7.31. Related...## Steps to reproduce
1. Enable multilingual mode
2. Go to `Mailing => New Mailing`
3. Choose one or more mailing group.
__Observe__: The recipient count doesn't affect
## Context
This appears to be a regression in 4.7.31. Related PRs:
* https://issues.civicrm.org/jira/browse/CRM-21260
* https://issues.civicrm.org/jira/browse/CRM-21316
* https://issues.civicrm.org/jira/browse/CRM-21749
* https://github.com/civicrm/civicrm-core/pull/11142/
* https://github.com/civicrm/civicrm-core/pull/11653/5.0.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/3293Make menu more accessible2022-04-22T16:04:20ZJoeMurrayMake menu more accessiblePreliminary tasks, many from https://lab.civicrm.org/dev/accessibility/issues/1#note_4855 below:
1. [x] Hide D7 menubar
1. [x] Fix for D8
1. [x] After getting focus into top menu, tabbing and back-tabbing revealed there was something hid...Preliminary tasks, many from https://lab.civicrm.org/dev/accessibility/issues/1#note_4855 below:
1. [x] Hide D7 menubar
1. [x] Fix for D8
1. [x] After getting focus into top menu, tabbing and back-tabbing revealed there was something hidden between Quick Search textbox and the CiviCRM icon. Opening submenus and back-tabbing revealed it was the search options for the Quick Search textbox. Please remove this from tab order.
1. [x] After getting focus into top menu, Space did not open (and when repeated, close) child menu on current item. It should act similarly to Return.
1. [x] When focus is on an item that could be selected to navigate somewhere, Return worked fine but Space did not replicate this.
1. [x] When on an open sub-submenu (eg Contributions > Accounting Batches with Open Batches with focus), using left arrow correctly moved focus to Accounting Batches, but it did not close the sub-submenu.
1. [x] When on a submenu, using left arrow should close the submenu and move focus to parent item. Instead it moved focus to menu item to left of parent item. The submenu was left open when it should have been closed.
~~1. [ ] When on a sub-submenu, escape should only close that level of menu but closes both the sub-submenu and the submenu.~~
1. [ ] "First item in menu bar should be in the tab order (tabindex=0)." (https://staff.washington.edu/tft/tests/menus/index.html). This may be a bit of work to implement in all CMSes but I think tabindex=0 for CiviCRM menu makes sense as the default on CiviCRM pages on default CMS installs. The CiviCRM Menu left item should be considered the QuickSearch. There appears to be an item for a div around the textarea and a separate way to focus on the textarea itself. The div around the textarea should be tabindex=0.
1. [ ] The cited spec is relatively silent, but other accessible menus have different implementations on the following: 1) When focus is on top menu item and its submenu is open, left and right cycle focus to left and right top menu items and shift which submenu is open to the one under the top menu focussed item. 2a) When focus is on a submenu item left closes the submenu, cycles focus to left on top menu and opens that top menu's submenu. 2b) When focus is on a submenu item without a subsubmenu, right similarly closes submenu, cycles focus right on top menu and opens that top menu item's submenu. 2c) When focus is on a submenu item with a subsubmenu, right opens the subsubmenu. Let's change behaviour 1), 2a) and 2b) to not opening new submenu. Leave 2c) as is.
~~1. [ ] When focus is not on the menu, cursor hovering over a menu item brings focus to it and opens submenu. Submenu should not open until click, return or space.~~
A user should be able to navigate the menu bar by use of the keyboard:
1. [ ] The menu bar should occupy one tab stop
1. [ ] When focused on a menu at the top level:
1. [ ] The right arrow key should move the user to the next top-level menu
1. [ ] The left arrow key should move the user to the previous top level menu
1. [ ] User focus should wrap to the beginning if the user advances past the final menu item. Likewise, if the user tries to navigate to the previous item from the first menu, focus should wrap to the last menu.
1. [ ] The down-arrow and ENTER keys should expand a child menu and focus the user on the first item
~~1. [ ] When a character is typed, the next menu item starting with that letter receives the focus, circling around to first when there are no more. If no menu item starts with the typed character, focus does not move. (deprecated by HTML 5.2 accesskey standard)~~
1. [ ] When focused on a child menu
1. [ ] The down arrow key should move the user to the next menu item
1. [ ] The up arrow key should move the user to the previous menu item
1. [ ] The right arrow key should expand a menu item with a submenu and place user focus on the first item in that submenu. If there is no submenu, then no action is taken.
1. [ ] The left arrow key should collapse a submenu and place user focus on the parent of that submenu
1. [ ] The ESC key should close the active child menu, and any submenus, and return user focus to the parent menu at the top level.
~~1. [ ] When a character is typed, the next child menu item starting with that letter receives the focus, circling around to first when there are no more. If no child menu item starts with the typed character, focus does not move. (deprecated by HTML 5.2 accesskey standard)~~
Test the menu works on default installs (ie default theme!) on
1. [x] Drupal 7
1. [x] WordPress
1. [x] Joomla
1. [x] Backdrop
1. [x] Drupal 8
(NB: deliberately ignoring support for Drupal 6.)
Test the menu works on:
1. [x] Drupal 7 site with shoreditch theme installed
1. [x] Drupal 7 site with mosaico installed, on a CiviMail mosaico page.
A more detailed functional spec is provided at http://lists.w3.org/Archives/Public/wai-xtech/2007Dec/att-0025/index.html#menu
A good implementation that might be useful for its implementation details (seeing View Source) is https://staff.washington.edu/tft/tests/menus/simplyaccessible/index.html. As there are no sub-submenus, I imagine the code implementation needs to be extended to opening sub-submenus properly.
Was https://issues.civicrm.org/jira/browse/CRM-20824
Original description from https://civicrm.stackexchange.com/questions/17735/access-for-blind-users-to-civicrm/17752#17752
The menu bar is keyboard accessible, but awkwardly. Generally I find it best to focus on the first item then TAB (as opposed to arrowing) to the top level menu the user wants to interact with before pressing ENTER to activate the pop-up menu. You will then have to locate the HTML list element containing the menu choices. Often this element appears after the menu bar, or at the bottom of the virtual document (sometimes depending on the CMS theme, sometimes depending on, seemingly, the browser’s mood). In either case, it will not appear immediately “under” the activated menu.https://lab.civicrm.org/dev/core/-/issues/7recurring authorize IPN results in contribution with incorrect payment_instru...2023-06-23T17:54:21Zjamierecurring authorize IPN results in contribution with incorrect payment_instrument_idIf you create a recurring contribution in authorize.net, the second time it goes through, it will result in a contribution with payment instrument type set to check, instead of credit card (or perhaps a different value if you have a diff...If you create a recurring contribution in authorize.net, the second time it goes through, it will result in a contribution with payment instrument type set to check, instead of credit card (or perhaps a different value if you have a different default payment instrument id).
This seems related to this issue: https://issues.civicrm.org/jira/browse/CRM-19186 which fixed it for paypal but not for authorize.net.https://lab.civicrm.org/dev/core/-/issues/3264Transaction Date filter in Bookkeeping Transactions report2022-04-22T15:53:09ZMWestergaardTransaction Date filter in Bookkeeping Transactions reportIn the Bookkeeping Transactions report, the filter for Transaction Date does not include time values and leads to missing data. For example, if today is February 10 and I filter Transaction Date on "Yesterday", the WHERE clause looks li...In the Bookkeeping Transactions report, the filter for Transaction Date does not include time values and leads to missing data. For example, if today is February 10 and I filter Transaction Date on "Yesterday", the WHERE clause looks like:
> ( financial_trxn.trxn_date >= '20190209') AND ( financial_trxn.trxn_date <= '20190209' )
Only transactions that occurred exactly at midnight are included. Contrast that with the filter for Date Received:
> ( contribution.receive_date >= '20190209000000') AND ( contribution.receive_date <= '20190209235959' )
I verified on dmaster and wpmaster.5.12.0https://lab.civicrm.org/dev/core/-/issues/3297replace select2 with latest stable2022-04-22T16:04:56ZJoeMurrayreplace select2 with latest stableCurrently, Civi is using select2 3.5 which we need to upgrade to latest stable 4.0.5, maybe 4.0.6 (https://github.com/select2/select2/releases) and then resolve compatibility issues with CiviCRM.
The upgrade from 3.5 to 4.x contains num...Currently, Civi is using select2 3.5 which we need to upgrade to latest stable 4.0.5, maybe 4.0.6 (https://github.com/select2/select2/releases) and then resolve compatibility issues with CiviCRM.
The upgrade from 3.5 to 4.x contains numerous breaking changes that affect the calling code in CiviCRM.
Major issues:
1. Auto appending values doesn't work anymore
Error: Uncaught TypeError: Cannot read property 'prop' of undefined
LOC - https://github.com/civicrm/civicrm-core/blob/master/js/crm.searchForm.js#L9
Reference - https://select2.org/upgrading/migrating-from-35#select2-val
2. Placeholder broken
Error: Uncaught TypeError: Cannot read property 'id' of undefined
As per 3.5 - placeholderOption is used to set the placeholder value for select2 widget
As per 4.0.4 - placeholder option can now accept placeholder value both in string and object
Reference - https://select2.org/upgrading/migrating-from-35#more-flexible-placeholders
3. EntityRef select2 fields are broken
Error: Uncaught Error: No select2/compat/initSelection
As per 4.0.4 - Removed the requirement of 'initSelection'
Reference - https://select2.org/upgrading/migrating-from-35#removed-the-requirement-of-initselection
4. Navigation menu style is not applied
Error: Uncaught TypeError: Cannot read property 'prop' of undefined
As per 4.0.4 - $("select").val("1").trigger("change"); // instead of $("select").select2("val", "1");
Reference - https://select2.org/upgrading/migrating-from-35#select2-val
Minor issues
1. Multi select2 widget doesn't show downarrow placeholder icon
2. select2 css style isn't applied after upgrade
migration of old JIRA issue with some additional discussion at https://issues.civicrm.org/jira/browse/CRM-21263https://lab.civicrm.org/dev/core/-/issues/3533Rewrite the standalone bootstrap protocol. Deprecate civicrm.settings.php.2024-02-09T05:03:20ZtottenRewrite the standalone bootstrap protocol. Deprecate civicrm.settings.php.## tldr
Rewrite `Bootstrap.php` to support CMS-first -- and make `civicrm.settings.php` unnecessary.
## Background: Problem
CiviCRM has many entry-points -- specific examples would be `bin/cli.php`, `extern/open.php`, `extern/url.php`...## tldr
Rewrite `Bootstrap.php` to support CMS-first -- and make `civicrm.settings.php` unnecessary.
## Background: Problem
CiviCRM has many entry-points -- specific examples would be `bin/cli.php`, `extern/open.php`, `extern/url.php`, `extern/rest.php`, or `extern/cxn.php`. More broadly, *all test suites and CLI processes* use a standalone bootstrap script. (These entry-points are distinct from the front-end entry-points typically associated with the UI.)
There are a number of technical details and happenstance we can go into, but there are two fundamental nubs in writing and executing a standalone script:
* *It doesn't know which CMS is active.* There's usually some *hard-coding* to the find the CMS.
* *Bootstrapping the CMS adds overhead.* Many admins have written-off this consideration as cost of doing business - but for someone, somewhere, at some point it mattered.
## Background: `civicrm.config.php` protocol
The original protocol for standalone bootstrap originated many years ago (circa 1.x or 2.x?). It's still used in several cases. It's key design elements:
* `civicrm.config.php` is *generated* at build-time to match the CMS. The tarball/zipball for each CMS includes a different build of this file. It's main purpose is to locate `civicrm.settings.php`.
* `civicrm.settings.php` includes a `define` for the `CIVICRM_UF` (among many others).
* `CRM_Utils_System::*` includes functions like `loadBootStrap()`.
* __Original protocol__: A standalone script would include `civicrm.config.php`, which would locate the `civicrm.settings.php` using a CMS-specific search. It then boots Civi by loading `civicrm.settings.php` and calling `CRM_Core_Config::singleton()`. Optionally, it also boots the CMS by calling `CRM_Utils_System_*::loadBootStrap()`.
The original boot protocol has some major consequences -- for example:
1. It requires creating an extra settings file (`civicrm.settings.php`) on every build.
2. Depending on how the page-load starts, the Civi settings file and CMS settings may load in different orders. It's not valid to infer Civi settings based on CMS settings (and vice-versa).
3. You need to figure the *absolute or relative* path of `civicrm.config.php`. This is *possible* in `civicrm-core` -- but it's basically impossible with any other publishable deliverable.
4. Reading/understanding the boot protocol requires having multiple builds of Civi (one for each CMS) -- *that's the only way to see each version of `civicrm.config.php`.
## Background: `cv` bootstrap protocol
A few years ago, I combined the various `civicrm.config.php` files with the aim of producing a universal boot script that solved `#3` and `#4`. This produced https://github.com/civicrm/cv/blob/master/src/Bootstrap.php which eventually became the heart of the `cv` command. This endeavor preserved a bunch of assumptions from the original protocol... but it made a key change: *dynamically discovering* the boot info.
The dynamic discovery works a bit like this:
* Do a file-system search (from PWD) to figure out the CMS.
* Do a file-system search (from CMS dir) to figure out where `civicrm.settings.php` is.
* Unless... you really want a faster bootstrap. Then you can set an environment variable with your boot info (and bypass the searches).
IMHO, dynamic CMS discovery (with optional env-var for optimization) is a pretty good way to make the code more robust to deploying in a variety of environments and file-structures.
There's just one problem: the *implementation* grew out of `civicrm.config.php` and kept some of the assumptions, so the implementation still shares issues `#1` and `#2`.
## Proposal: Provide a universal, CMS-first bootstrap script -- and knock over some dominoes
The basic idea is to write a CLI helper which bootstraps the CMS first -- and then bootstraps Civi. The logic is roughly:
```php
function boot($startDir) {
$parentDirectories = array($startDir, parent($startDir), grandparent($startDir), ...);
foreach ($parentDirectories as $dir)
if ($dir has Drupal) { bootDrupal(); bootCivi(); return; }
elseif ($dir has Joomla) { bootJoomla(); bootCivi(); return; }
elseif ($dir has WordPress) { bootWordPress(); bootCivi(); return; }
elseif ($dir has Backdrop) { bootBackdrop(); bootCivi(); return; }
}
}
```
This helper still provides standalone bootstrap, so we can still have all our standalone scripts/unit-tests/commands/etc. But it makes a fundamental change:
* **You can always rely on having the CMS bootstrapped first**.
* Therefore, you can detect things like `CIVICRM_BASEURL` using CMS API's -- because they're always available.
* Therefore, you don't need `civicrm.settings.php` to store those settings.
* Therefore, you don't need `install/index.php` to create `civicrm.settings.php`.
* Therefore, you don't need write-access to create `civicrm.settings.php` (in the typical case).
* Therefore, you don't need to migrate or preserve `civicrm.settings.php` (in the typical case).
*Note: Of course, the entire CiviCRM install-base currently uses `civicrm.settings.php`, and some of them use it to accomplish special ends (like custom multidomain/multisite/multitenant arrangements). Therefore, I wouldn't argue for complete removal of the file -- but, instead, it should be an optional/advanced thing.*
## General Tasks
* Write the new bootstrap script.
* Phase-in the new bootstrap script for use by `cv` and `civicrm-core`.
* Update `civicrm-core` to compute values for all those constants (`define('CIVICRM_FOO',...)`) at runtime using CMS functions.
* Update the installer to omit `civicrm.settings.php`
* Update docs to describe the advanced/optional use of `civicrm.settings.php`.https://lab.civicrm.org/dev/core/-/issues/3554On 'New Mailing' review page, it doesn't show recipients count2022-06-11T14:50:56ZMonish DebOn 'New Mailing' review page, it doesn't show recipients countSimply visit the second page of `New Mailing` and you will notice that 'Recipients' section has an inappropriate message instead of recipient count.
## Context
This appears to be a regression in 4.7.31. Related PR - https://github.com/...Simply visit the second page of `New Mailing` and you will notice that 'Recipients' section has an inappropriate message instead of recipient count.
## Context
This appears to be a regression in 4.7.31. Related PR - https://github.com/civicrm/civicrm-core/pull/110915.0.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/14Creating a relationship fails for an organization contact which has NULL valu...2023-06-23T17:54:21ZEvanCreating a relationship fails for an organization contact which has NULL values in start/end/join fields of a membershipWhen creating a relationship between an Individual and an Organizational contact, the relationship fails to be created and throws the following error if the Organizational contact record has a membership with NULL values in the start/end...When creating a relationship between an Individual and an Organizational contact, the relationship fails to be created and throws the following error if the Organizational contact record has a membership with NULL values in the start/end/join fields, such as might happen if a payment failed and the membership was created in a "Pending" state:
`unknown relationship create error The membership cannot be saved because the status cannot be calculated for start_date: null end_date null join_date null as at 2018-03-09 16:43:22`
What's odd is that I wouldn't expect the relationships to be dependent on a membership object, but for some reason it is? I did some testing on a client's sandbox site and found that any membership with NULL start/end/join dates will cause a Relationship creation to fail. I found that deleting the membership with NULL dates fixes the issue i.e. allows the relationship to be created, as does simply adding dates to the membership in question.
**Backtrace:**
`Mar 09 16:43:23 [info] $backTrace = #0 /var/www/example.org/htdocs/sites/all/modules/civicrm/CRM/Core/Error.php(456): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/example.org/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(55): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
#2 /var/www/example.org/htdocs/sites/all/modules/civicrm/drupal/civicrm.module(345): CRM_Core_Invoke::invoke((Array:4))
#3 [internal function](): civicrm_invoke("contact", "view", "rel")
#4 /var/www/example.org/htdocs/includes/menu.inc(350): call_user_func_array("civicrm_invoke", (Array:3))
#5 /var/www/example.org/htdocs/index.php(17): menu_execute_active_handler()
#6 {main}`
**NB:** I am unable to manually re-create this scenario on the demo site (I tried) as a start date is required when creating a membership.https://lab.civicrm.org/dev/core/-/issues/3312A Contact with a Pending membership cannot be merged with another Contact due...2022-04-22T16:16:45Zjustinfreeman (Agileware)A Contact with a Pending membership cannot be merged with another Contact due to missing membership End DateA Contact with a Pending membership cannot be merged with another Contact due to missing membership End Date.
The membership End Date is not set on a pending membership.
The sequence of events is:
1. Contact signs up for new membership
...A Contact with a Pending membership cannot be merged with another Contact due to missing membership End Date.
The membership End Date is not set on a pending membership.
The sequence of events is:
1. Contact signs up for new membership
1. Contact already exists in CiviCRM (as a non-member) - or is similar contact
1. CiviCRM Admin tries to merge the two Contacts
1. The generic: DB Error: unknown error is then raised
Copy of error from CiviCRM logs.
```
Dec 06 12:32:20 [info] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => UPDATE civicrm_membership SET end_date = '' WHERE id=281 [nativecode=1292 ** Incorrect date value: '' for column 'end_date' at row 1]
[type] => DB_Error
[user_info] => UPDATE civicrm_membership SET end_date = '' WHERE id=281 [nativecode=1292 ** Incorrect date value: '' for column 'end_date' at row 1]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="UPDATE civicrm_membership SET end_date = '' WHERE id=281 [nativecode=12
92 ** Incorrect date value: '' for column 'end_date' at row 1]"]
)
```
Agileware Ref: CIVICRM-1122https://lab.civicrm.org/dev/core/-/issues/689Problem with postponed payment of a contribution in civicrm 5.8.22022-11-13T05:03:53ZjohansProblem with postponed payment of a contribution in civicrm 5.8.2These are the steps to see the problem:
1) I add a contribution with status "Pending" (contribution_status_id 2) and save it and close.
2) Then I open it and set it as "Completed" and save it.
3) At this point if I open it again and edi...These are the steps to see the problem:
1) I add a contribution with status "Pending" (contribution_status_id 2) and save it and close.
2) Then I open it and set it as "Completed" and save it.
3) At this point if I open it again and edit the payment details I am unable to save it: it just circles on forever.
Looking into the civicrm_financial_trxn table I find that the field "payment_instrument_id" is NULL. If I set it as one of the possible ids and repeat step 3 above it saves the record correctly.
Can anyone else verify? Is it a bug?
I just have a plain install of civicrm 5.8.2 with drupal 7.61.https://lab.civicrm.org/dev/core/-/issues/8Fatal error on Print/Merge Document for Cases2023-06-23T17:54:21Zaydunsaidan.saunders@squiffle.ukFatal error on Print/Merge Document for Cases* Go to Search Cases
* Select cases
* Select Print/merge Document from Actions menu
* Result is fatal error
Possibly related to https://issues.civicrm.org/jira/browse/CRM-21382
Reproduced on dmaster.demo
```
Array
(
[callback] =>...* Go to Search Cases
* Select cases
* Select Print/merge Document from Actions menu
* Result is fatal error
Possibly related to https://issues.civicrm.org/jira/browse/CRM-21382
Reproduced on dmaster.demo
```
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] =>
SELECT contact_id
FROM civicrm_case
WHERE id IN ( 1,4 )
[nativecode=1054 ** Unknown column 'contact_id' in 'field list']
[type] => DB_Error
[user_info] =>
SELECT contact_id
FROM civicrm_case
WHERE id IN ( 1,4 )
[nativecode=1054 ** Unknown column 'contact_id' in 'field list']
[to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="
SELECT contact_id
FROM civicrm_case
WHERE id IN ( 1,4 )
[nativecode=1054 ** Unknown column 'contact_id' in 'field list']"]
)
```5.0.0https://lab.civicrm.org/dev/core/-/issues/3239Contribution reports don't include thank-you date2022-04-22T15:51:49ZJonGoldContribution reports don't include thank-you dateThis is an issue that a couple of people have noted [on Stack Exchange](https://civicrm.stackexchange.com/questions/15374/thank-you-letter-report/15377). However, this is the first time anyone has paid me to fix it :) PR incoming.This is an issue that a couple of people have noted [on Stack Exchange](https://civicrm.stackexchange.com/questions/15374/thank-you-letter-report/15377). However, this is the first time anyone has paid me to fix it :) PR incoming.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3329Inherited memberships not created correctly when contact count changes.2022-04-22T16:17:19Zsamknelson@gmail.comInherited memberships not created correctly when contact count changes.(Migrating this issue from https://issues.civicrm.org/jira/browse/CRM-21463, since it's been idle there for over a year.)
Suppose you have an organization membership. Suppose the organization has 4 related contacts, each of whom inheri...(Migrating this issue from https://issues.civicrm.org/jira/browse/CRM-21463, since it's been idle there for over a year.)
Suppose you have an organization membership. Suppose the organization has 4 related contacts, each of whom inherits the membership.
Suppose you then add a related contact.
Suppose you then renew the membership.
The newly related contact does not receive the inherited membership. In fact, each time you save / update the membership, an apparently random set of 4 related contacts receives the inherited membership.
============
This turns out to be a bug in Member/BAO/Membership.php. At line 1445, we see
if ($relMembership->find(TRUE)) {
$params['id'] = $relMemIds['membership'] = $relMembership->id;
}
However, params['id'] is never initialized, so if some related memberships are not found, they are assigned the ID from the last iteration through the loop – meaning the previous contact loses their membership.
The solution is to add $params['id'] = NULL right before. (It would probably be better to set $params = NULL at the beginning of the loop, but I haven't tested that.)
I haven't submitted a patch, but it should be straightforward.5.31.0https://lab.civicrm.org/dev/core/-/issues/3525Move example data to an optional/add-on step2024-02-07T05:03:27ZtottenMove example data to an optional/add-on stepDuring installation, the installer shows a checkbox which asks whether you want to load sample data. Then:
* If you don't want sample data, it loads `sql/civicrm_data.mysql`.
* If you do want sample data, it loads `sql/civicrm_generat...During installation, the installer shows a checkbox which asks whether you want to load sample data. Then:
* If you don't want sample data, it loads `sql/civicrm_data.mysql`.
* If you do want sample data, it loads `sql/civicrm_generated.mysql`.
This has some consequences:
* You must choose whether to load sample data during *installation*. This is presented in the installer UI.
* The `civicrm_generated.mysql` takes extra work to maintain (eg `bin/regen.sh`; the output of which is not merge-friendly).
The goal here would be to have one *installation* process -- which could be headless. *Afterwards*, you should have the *option* to enable create the sample data. This *option* may be specified as at same time as other install parameters (eg via arg) or perhaps via a separate command afterwards.https://lab.civicrm.org/dev/core/-/issues/3582Using ACL to restrict mailing recipients leads to fatal error2022-06-11T14:54:50ZMonish DebUsing ACL to restrict mailing recipients leads to fatal errorSteps to replicate:
1. Assign an ACL permission for one or more contacts
2. Compose a mailing and select a recipient group. Ensure that those contacts are included in that group
3. Submit and Send Mailing immediately
Result into fatal ...Steps to replicate:
1. Assign an ACL permission for one or more contacts
2. Compose a mailing and select a recipient group. Ensure that those contacts are included in that group
3. Submit and Send Mailing immediately
Result into fatal error - https://pastebin.com/aMa2KYy0
## Context
This appears to be a regression in 4.7.31. Related PRs:
* https://issues.civicrm.org/jira/browse/CRM-21260
* https://github.com/civicrm/civicrm-core/pull/11142/
5.1.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/9Custom include/exclude search is broken2023-06-23T17:54:21ZJchesterCustom include/exclude search is brokenToday (8 March 2018) on http://dmaster.demo.civicrm.org the custom include/exclude search gives a WSOD.
This was using **Include** Newsletter Subscribers and **exclude** Advisory Board.
This works correclty in 4.7.29 on Civihostings...Today (8 March 2018) on http://dmaster.demo.civicrm.org the custom include/exclude search gives a WSOD.
This was using **Include** Newsletter Subscribers and **exclude** Advisory Board.
This works correclty in 4.7.29 on Civihostings demo site. I don't have access to a 4.7.30 site to test on thathttps://lab.civicrm.org/dev/core/-/issues/3268Deprecate `getBasicContactFields` in favor of `getColumns('Contact')`2022-04-22T15:53:15ZJonGoldDeprecate `getBasicContactFields` in favor of `getColumns('Contact')`@eileen has ported some of the cleaner code for defining report specs from Extended Reports to core in the form of `getColumns()` and `getContactColumns()`. Since this appears to be the direction we're headed in, I think it makes sense ...@eileen has ported some of the cleaner code for defining report specs from Extended Reports to core in the form of `getColumns()` and `getContactColumns()`. Since this appears to be the direction we're headed in, I think it makes sense to deprecate `getBasicContactColumns()`, which does a similar job. However, `getBasicContactColumns()` adds a bunch of fields to core reports that `getContactColumns` doesn't.
My PR adds all the missing fields to `getContactColumns` (except for "Organization Name"; this seems unnecessary since it will virtually always match the display name). I also mark `getBasicContactFields()` as deprecated so future cleanup can target reports using it.5.12.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3300Regression - js error due to alertDismissal setting2022-04-22T16:05:04ZeileenRegression - js error due to alertDismissal settingjs error
```
// http://civicrm.org/licensing
// <script> Generated 05 Jun 2018 05:59:13
(function($) {
// Config settings
CRM.config.userFramework = "Drupal";
CRM.config.resourceBase = "http:\/\/wmf46.local\/sites\/all\/modules\/ci...js error
```
// http://civicrm.org/licensing
// <script> Generated 05 Jun 2018 05:59:13
(function($) {
// Config settings
CRM.config.userFramework = "Drupal";
CRM.config.resourceBase = "http:\/\/wmf46.local\/sites\/all\/modules\/civicrm\/";
CRM.config.lcMessages = "en_US";
$.datepicker._defaults.dateFormat = CRM.config.dateInputFormat = "mm\/dd\/yy";
CRM.config.timeIs24Hr = false;
CRM.config.ajaxPopupsEnabled = true;
CRM.config.allowAlertAutodismissal = ;
```
@justinfreeman @monish.deb @JoeMurray - not in released versionMonish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/3331Back-office membership renewals don't display an on-screen notification2022-04-22T16:17:27ZJonGoldBack-office membership renewals don't display an on-screen notificationAs part of CRM-16454, the membership renewal email code was moved from `CRM_Member_Form_MembershipRenewal::submit()` to `CRM_Member_Form_MembershipRenewal::postProcess()`. However, this code no longer generates a status message because ...As part of CRM-16454, the membership renewal email code was moved from `CRM_Member_Form_MembershipRenewal::submit()` to `CRM_Member_Form_MembershipRenewal::postProcess()`. However, this code no longer generates a status message because of early returns.
Since the return values are ignored, it seems safe to ignore the early returns, which results in a status message comparable to a new membership.5.14.0https://lab.civicrm.org/dev/core/-/issues/3529Does CiviCRM work well with database replication and clustering?2022-06-11T14:44:13ZdavejDoes CiviCRM work well with database replication and clustering?There have been a few discussions on Mattermost in recent months in which people have described problems running Civi in replicated / cluster environments. In particular, Civi's use of temporary tables has caused issues. E.g.
10 Oct 20...There have been a few discussions on Mattermost in recent months in which people have described problems running Civi in replicated / cluster environments. In particular, Civi's use of temporary tables has caused issues. E.g.
10 Oct 2017 eileen:
> We have been having some replication lag issues & one metric we are investigating is the slaves (only) seem to show a large number of open temp tables on one metric. The odd thing about the replication lag is it seems to get worse the longer since a server restart (presumably just the mysql part needs to be restarted).
10 Oct 2017 jackrabbithanna:
> Ok we're dealing with Percona DB
>
> Database Error Code: Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed outside transactional context. These statements are also not allowed in a function or trigger because functions and triggers are also considered to be multi-statement transactions., 1787
>
> followed by a php error: Fatal error: Uncaught CRM_Core_Exception: [0: Transaction integrity error: Expected to find active frame thrown
>
> Per https://dev.mysql.com/doc/refman/5.7/en/replication-gtids-restrictions.html the multi-statements transactions are not allowed as they could potentially run using the same global transaction ID (GTID)
>
> this error happens when trying to create a Drupal user, with CiviCRM profile on the form
Further comments from Eileen:
> OK - I'll have a read of that - the CiviCRM usage of temp tables is pretty common & in particular ties in with the way mailing recipients are calculated & rolled back. However, I'm also reading concerns that replicated DBs don't like temp tables (although it's not blocked in the version we have)
>
> (we use mixed mode replication)
>
> I think it's kind of a big picture question isn't it? I had thought to move all temp table creations to a single function (so if we want to do something different we can do it in there) - the thing is a lot of them are used to calculate group_contact_cache & those will cause rollback to fail
> "A recommended practice when using statement-based or mixed-format replication is to designate a prefix for exclusive use in naming temporary tables that you do not want replicated, then employ a --replicate-wild-ignore-table option to match that prefix. For example, you might give all such tables names beginning with norep (such as norepmytable, norepyourtable, and so on), then use --replicate-wild-ignore-table=norep% to prevent them from being replicated." - we could at least do that for reports etc
> if you are using statement based replication or mixed replication then any temp tables used to build real tables have to be replicated
>
> or else the query will fail on the slave
> it's an improvement basically 'make civicrm support replication'
> it does work with replication but I think that's more because various people have just configured it to do so
>
> but I don't think there has ever been any official support for that or effort to understand the design implications
13 Oct eileen:
> ... our replication issue DOES seem to be related to the temp tables created for civimail at this stage. ... What we are seeing is the DROP statement is written to the binlog BEFORE the create statement is - somewhat in line with https://www.xaprb.com/blog/2007/01/20/how-to-make-mysql-replication-reliable/
>
> (not really clear from there but it says "As I mentioned, each transaction goes into the binlog in the order in which it commits, not in the order in which it is started, so transactions may execute in a different order on the replica. ")
>
> the binlog is parsed on the slaves & they temp tables mount up
>
> not 100% sure if this will solve all our woes - but not letting civicrm use temp tables to create recipient lists seems to be important
We ran a bunch of Civi sites with MySQL replication several years ago and had a lot of problems with it: replication would fall over periodically and then everything would grind to a near standstill as it was re-sync'd.
As a starting point, it would be useful to gather some data on how many people use replication / clustering with Civi, how frequently problems are encountered, what the most common problems are and whether they have been solved.https://lab.civicrm.org/dev/core/-/issues/10Enabling plugin in CKEditor Default doesn't enable it in Civimail despite sho...2023-06-23T17:54:21Zluke.stewartEnabling plugin in CKEditor Default doesn't enable it in Civimail despite showing it as enabledWhen enabling a CKEditor plugin at: civicrm/admin/ckeditor if you add it to "Default" and press save.
At this point the plugin shows up on all three tabs, (Default, Civimail, CiviEvent) however the plugin doesn't appear on a new mail des...When enabling a CKEditor plugin at: civicrm/admin/ckeditor if you add it to "Default" and press save.
At this point the plugin shows up on all three tabs, (Default, Civimail, CiviEvent) however the plugin doesn't appear on a new mail despite clearing caches, and force refreshing the browser.
Navigating to the "Civimail" tab and pressing save there as well gives the desired behaviour that the plugin is enabled.![CKEditor](/uploads/5c8b21a886fbf4b0eb27cd0a0ba0d09d/CKEditor.png)
Tested on 4.7.27 and 4.7.31RC
To reproduce:
1. Navigate to civicrm/admin/ckeditor
1. Select a plugin from the plugin dropdown on the default tab
1. Obeserve additional component appears in preview
1. Click Save
1. Clear caches civicrm/admin/setting/updateConfigBackend
1. Create an new email -> civicrm/mailing/send?reset=1
1. Observe additional component that it doesn't show in the toolbar.
1. Return to civicrm/admin/ckeditor
1. Shift to the Civi mail tab. Observe the plugin is listed.
1. Scratch head.
1. Press save.
1. Create a new mail.
1. You now have the required plugin.
I haven't tested behaviour with regards to the event tab.https://lab.civicrm.org/dev/core/-/issues/3236No pagination on Contribution Detail report2022-04-22T15:51:42ZJonGoldNo pagination on Contribution Detail reportThis seems to be a side effect of [this commit](https://github.com/civicrm/civicrm-core/commit/e6bab5eae9e7293dff9ecb9852f85e6aa01dad7f#diff-585f40aa84b2e15ef6b0768dd64bfd0c) fixing core#170. I'm not 100% sure why this isn't happening o...This seems to be a side effect of [this commit](https://github.com/civicrm/civicrm-core/commit/e6bab5eae9e7293dff9ecb9852f85e6aa01dad7f#diff-585f40aa84b2e15ef6b0768dd64bfd0c) fixing core#170. I'm not 100% sure why this isn't happening on the sandbox, but I'm reasonably certain it's because servers without Full Group By use a different code path.
There were 2.5 bugs that needed to be fixed:
* The first temp table for this report sets a limit of 50 rows - so the second time through `buildQuery()`, the SQL statement `SELECT * FROM civireport_contribution_detail_temp3 $this->_orderBy` will never return more than 50, so the pager won't be set.
* `setPager()` assumes that a) the last SQL statement executed includes `SQL_CALC_FOUND_ROWS`; b) that `$this->limit` is set.
Finally, I found a call to `setPager()` in a place where it would never be correct (on a temp table that's not the "final" temp table) so I removed it.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3332"Start date must be the same or later than Member since" triggered when dates...2022-04-22T16:17:28Zcalbasi"Start date must be the same or later than Member since" triggered when dates are the sameI get this issue on my drupal/civicrm 5.10.3 instance. And I test it, and I've found it there too: https://civicrm.demo.civihosting.com
Using the same date for "start date" and "member since" fields should NOT trigger this error.
My w...I get this issue on my drupal/civicrm 5.10.3 instance. And I test it, and I've found it there too: https://civicrm.demo.civihosting.com
Using the same date for "start date" and "member since" fields should NOT trigger this error.
My workaround was change one of 2 dates, but this issue is a bug and an usability issue.5.11https://lab.civicrm.org/dev/core/-/issues/3537Does CiviCRM handle UNIX filesystem functionality like symlinks?2024-02-10T05:03:27ZxurizaemonDoes CiviCRM handle UNIX filesystem functionality like symlinks?Some cloud hosting providers dynamically assign storage (disk) and may use symlinks to associate dynamic storage with predictable filesystem locations. CiviCRM seems to be confused by the presence of symlinks in the CiviCRM install path ...Some cloud hosting providers dynamically assign storage (disk) and may use symlinks to associate dynamic storage with predictable filesystem locations. CiviCRM seems to be confused by the presence of symlinks in the CiviCRM install path (and possibly resource paths).
This manifests as "weird" resource URLs or inability to resolve filesystem paths.
> This doesn't work in all configurations. For example, if your directory structure uses symlinks, it may not resolve correctly.
For examples, https://civicrm.stackexchange.com/search?q=symlink eg
* https://civicrm.stackexchange.com/questions/19495/set-civicrm-files/19498#19498
* https://civicrm.stackexchange.com/questions/20064/help-needed-in-setting-up-rest-api-in-civi-crm/20076#20076
* https://civicrm.stackexchange.com/questions/20265/mailchimp-plugin-creating-webhook-with-invalid-url
* https://civicrm.stackexchange.com/questions/21925/incorrect-resource-url-warning-but-menu-arrows-are-present
For WP specifically, https://github.com/civicrm/civicrm-core/pull/11086https://lab.civicrm.org/dev/core/-/issues/3627Only add closing quote to href token output when necessary2022-06-11T14:57:26ZMichael McAndrewOnly add closing quote to href token output when necessary[Lines 1345 to 1350 of CRM/Mailing/BAO/Mailing.php](https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/BAO/Mailing.php#L1345-L1350) add a trailing quote to tokens of 'type' `embedded_url` as according to the code:
```
...[Lines 1345 to 1350 of CRM/Mailing/BAO/Mailing.php](https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/BAO/Mailing.php#L1345-L1350) add a trailing quote to tokens of 'type' `embedded_url` as according to the code:
```
// add trailing quote since we've gobbled it up in a previous regex
// function getPatterns, line 431
```
In my testing, sometimes the trailing quote is not gobbled, e.g. in this example `<p><a href="https://example.org/communication-preferences?cid1={contact.contact_id}&{contact.checksum}">Click here to select your communication preferences</a></p>`.
As a fix, I am proposing to only add a closing quote if the url does not already have one.https://lab.civicrm.org/dev/core/-/issues/11Email - send now error screen should display earlier2023-06-23T17:54:21ZJchesterEmail - send now error screen should display earlierIn Advanced Search if you are displaying results as contacts and then:
* select more than 50 of the results
* select **Email - send now (to 50 or less)**
you see the Error message telling you that you can't email more than 50 contac...In Advanced Search if you are displaying results as contacts and then:
* select more than 50 of the results
* select **Email - send now (to 50 or less)**
you see the Error message telling you that you can't email more than 50 contacts this way and the process stops
However, if you display the results as contributions or as memberships then
* select more than 50 of the results
* select **Email - send now (to 50 or less)**
you are taken to the email set up page. It is not until you click on Send Email on that page that you see the Error message telling you that you can't email more than 50 contacts this way and the process is stopped.
It would be a better user experience if the error message always appeared when **Email - send now (to 50 or less)** was selected.5.9https://lab.civicrm.org/dev/core/-/issues/3232Soft Credit report fails when Only Full Group By is enabled2022-04-22T15:51:29ZJonGoldSoft Credit report fails when Only Full Group By is enabledThis is replicable by running the report with no changes to defaults on dmaster.
The cause is that the Soft Credit report overrides `CRM_Core_Form::postProcess()` and calls `CRM_Core_DAO::executeQuery()` directly instead of `CRM_Core_Fo...This is replicable by running the report with no changes to defaults on dmaster.
The cause is that the Soft Credit report overrides `CRM_Core_Form::postProcess()` and calls `CRM_Core_DAO::executeQuery()` directly instead of `CRM_Core_Form::buildRows()`, which the FGB safeguards exist. So even though the report is marked as not optimized for FGB, it makes no difference.5.12.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3341Prevent Duplicate memberships2024-01-03T05:03:26ZprdufresnePrevent Duplicate membershipsThere needs to be a mechanism to prevent duplicate memberships for the same user. There are legitimate circumstances for there to be multiple memberships, but there needs to be a way to prevent it as well.
I propose two options:
1. A ...There needs to be a mechanism to prevent duplicate memberships for the same user. There are legitimate circumstances for there to be multiple memberships, but there needs to be a way to prevent it as well.
I propose two options:
1. A checkbox in the Contribution Page settings Memberships tab to "Prevent duplicate memberships"
2. A checkbox in the Membership Types page that "Allows duplicate membership of this type"
In either case, the verification logic should be specific to that membership type.https://lab.civicrm.org/dev/core/-/issues/3538Docker2022-06-11T14:45:10ZMichael McAndrewDockerHey there,
I've been doing a bit of work on [CiviCRM on Docker](https://github.com/michaelmcandrew/civicrm-buildkit-docker/). I know that others have been doing the same and I feel like it would be great to start co-ordinating a bit mor...Hey there,
I've been doing a bit of work on [CiviCRM on Docker](https://github.com/michaelmcandrew/civicrm-buildkit-docker/). I know that others have been doing the same and I feel like it would be great to start co-ordinating a bit more.
I am wondering whether cloud native is the right place for it, or if we should create a Docker project.
On the one hand, I feel like there could be a lot of Docker chat and wouldn't want to drown out other chat. On the other, I don't want to proliferate groups unnecessarily.
Any thoughts? I am erring toward a seperate group at the minute.https://lab.civicrm.org/dev/core/-/issues/3628Add pre/post hook for CRM_Mailing_BAO_MailingJob2022-06-15T11:19:25ZMonish DebAdd pre/post hook for CRM_Mailing_BAO_MailingJobThis ticket is about adding pre, post hook to MailingJob and it involve:
1. Call the pre/post hook inside `CRM_Mailing_BAO_MailingJob::create()`
2. Add `CRM_Mailing_BAO_MailingJob::deleteMailingJob` to delete Mailing Jobs and add pre/pos...This ticket is about adding pre, post hook to MailingJob and it involve:
1. Call the pre/post hook inside `CRM_Mailing_BAO_MailingJob::create()`
2. Add `CRM_Mailing_BAO_MailingJob::deleteMailingJob` to delete Mailing Jobs and add pre/post delete hook
3. Replace all the DAO call with corresponding create and delete fn in the codebase.Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/2204Proposal - make 5.33 the last CiviCRM version to support php 7.1 (agreed) and...2021-02-05T06:10:18ZeileenProposal - make 5.33 the last CiviCRM version to support php 7.1 (agreed) and mysql 5.6 (deferred) (& equivalent MariaDB version)This extracts from our end-of-life planning for old mysql versions
https://lab.civicrm.org/dev/core/-/issues/1681 and php versions https://lab.civicrm.org/dev/core/-/issues/1528 and makes the proposal that the 5.33 ESR is the last versi...This extracts from our end-of-life planning for old mysql versions
https://lab.civicrm.org/dev/core/-/issues/1681 and php versions https://lab.civicrm.org/dev/core/-/issues/1528 and makes the proposal that the 5.33 ESR is the last version to support php 7.1 and mysql 5.6. This means that sites can get up to 8 more months support on these versions for $120.
Background/ notes
- we have aligned recent end of life for php & mysql versions with ESR versions because it means that if there is an economic value to delaying upgrading people can opt in. If $120 doesn't seem like value for money then it's hard to make the case it is worth $x in developer time
- we have been announcing that both are EOL for ? 6 months? via system checks
- we haven't had a lot of push back from sites about previous EOL efforts on php versions. Generally once we stop supporting a php version there are a reasonable amount of breaking changes after the first 2-3 months
- we had annecdotal evidence from 2 partners that getting off mysql 5.5 was tricky for some sites. OTOH there are unlikely to be any breaking changes for quite some time for 5.6 sites for quite some time. It's likely they could continue to use 5.6 for a year or more after we stop supporting it - we just get to say 'sorry not supported' when those weird edge cases pop up around row format or it there is some unforseen reason for a breaking change
- mysql 8.0 is about to be released
- php 8.0 is about to be released
- generally our ability to support newer mysql versions / php versions has been delayed by difficulties around legacy support and we have effectively supported old versions at the expense of newer versions
- php stopped supporting php 7.1 about a year ago
- Oracle still appears to support php 5.6 (not sure if it's for free or not)5.34.0https://lab.civicrm.org/dev/core/-/issues/12Improvement: for crmUiWizard-driven workflows, scroll back to top between steps2023-06-23T17:54:21ZginkgofjgImprovement: for crmUiWizard-driven workflows, scroll back to top between stepsSome "steps" in a wizard are fairly long and require scrolling to reach all the required fields. See the CiviMail wizard (civicrm/a/#/mailing) for example.
Differences in height between the steps can make clicking the buttons that contr...Some "steps" in a wizard are fairly long and require scrolling to reach all the required fields. See the CiviMail wizard (civicrm/a/#/mailing) for example.
Differences in height between the steps can make clicking the buttons that control the workflow (back, forward, etc.) at the bottom of the wizard a jarring experience. Sometimes the next step is significantly shorter than the previous one, and the user is left looking at white space. Sometimes the next step is very similar to the previous step, and it is unclear that anything occurred after the user's click because the user's view hasn't changed.
In any case, a better user experience would be to move the user to the top of the wizard at each transition.5.0.0ginkgofjgginkgofjghttps://lab.civicrm.org/dev/core/-/issues/3269Allow new custom field entities to be added to reports2022-04-22T15:53:16ZJonGoldAllow new custom field entities to be added to reportsNow that we allow custom fields on almost any entity, it makes sense that we should allow CiviReport to make use of these. E.g. contribution reports should allow the use of FinancialType custom fields; relationship reports should allow ...Now that we allow custom fields on almost any entity, it makes sense that we should allow CiviReport to make use of these. E.g. contribution reports should allow the use of FinancialType custom fields; relationship reports should allow RelationshipType custom fields, etc.
Ideally, this should be possible by adding the entity to the report's `$_customGroupExtends` array. However, this fails because [CRM_Report_Form::customDataFrom()](https://github.com/civicrm/civicrm-core/blob/master/CRM/Report/Form.php#L4001) calls [CRM_Core_BAO_CustomQuery::$extendsMap](https://github.com/civicrm/civicrm-core/blob/3291b804470947bc3e3d1f580ffbd057d26e7898/CRM/Core/BAO/CustomQuery.php#L110-L129), a hard-coded list of tables which various entities extend.
I propose replacing calls to `CRM_Core_BAO_CustomQuery::$extendsMap` with a new method `CRM_Core_BAO_CustomQuery::getExtendsMap()`, which will also pull in any entities defined in `civicrm_option_value`.
I'm happy to do this work, I would like concept approval first though.https://lab.civicrm.org/dev/core/-/issues/3333I'm unable to create a new member2022-04-22T16:17:30ZbriandefferdingI'm unable to create a new memberI'm attempting to create a new member for the state party, and I am getting and error, informing me this task cannot be done at this time. I have a screenshot attached.![Screen_shot_2019-06-22_at_10.34.41_PM](/uploads/b7e0a143eba8cc582f3...I'm attempting to create a new member for the state party, and I am getting and error, informing me this task cannot be done at this time. I have a screenshot attached.![Screen_shot_2019-06-22_at_10.34.41_PM](/uploads/b7e0a143eba8cc582f3bd26740281003/Screen_shot_2019-06-22_at_10.34.41_PM.png)https://lab.civicrm.org/dev/core/-/issues/3532Determine CiviCRM host and port in Docker-friendly way - via an environment v...2024-02-25T05:03:20ZMichael McAndrewDetermine CiviCRM host and port in Docker-friendly way - via an environment variablehttps://lab.civicrm.org/dev/core/-/issues/3583Incorrect Total Count on mail summary report2022-06-11T14:54:52ZMonish DebIncorrect Total Count on mail summary reportWhen you visit the mail summary report, the `Total Count` is incorrect which includes the open count of all mailings, instead of its corresponding mail.
Here's the screenshot to show the difference in count.
Mailing Summary report(sho...When you visit the mail summary report, the `Total Count` is incorrect which includes the open count of all mailings, instead of its corresponding mail.
Here's the screenshot to show the difference in count.
Mailing Summary report(shows incorrect `Total opens` count which is 6):
![Screen_Shot_2018-06-01_at_5.29.57_PM](/uploads/24f196c6e8f88d138b4e557b8c52572a/Screen_Shot_2018-06-01_at_5.29.57_PM.png)
Mailing Status page(shows correct `Total Opens` count which is 5):
![Screen_Shot_2018-06-01_at_5.28.48_PM](/uploads/741cb845269b8f408fe535b0ab080528/Screen_Shot_2018-06-01_at_5.28.48_PM.png)5.3.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/3564All unsubscribe group members are excluded from a mailing with a manually spe...2022-06-11T14:54:11ZlolcodeAll unsubscribe group members are excluded from a mailing with a manually specified unsubscribe group (group_type=Base) if the unsubscribe group is a Smart groupAll unsubscribe group members are excluded from a mailing with a manually specified unsubscribe group (group_type=Base) if the unsubscribe group is a Smart group.
**To reproduce:** Create a smart group with some members in it. Some mem...All unsubscribe group members are excluded from a mailing with a manually specified unsubscribe group (group_type=Base) if the unsubscribe group is a Smart group.
**To reproduce:** Create a smart group with some members in it. Some members may also be added and removed manually as usual. Search for some contacts including some who are in that smart group and choose the action to send/schedule a bulk email. When creating the mail select the Smart group as your unsubscribe group.
**The expected result:** The mailing is not sent to any contacts in the search who are in the smart un-subscribe group with the status "Removed".
**The result:** The mailing is not sent to any contacts in the search who are in the smart un-subscribe group at all.5.2.0https://lab.civicrm.org/dev/core/-/issues/3303Front End Event Registration Form - Drop Down Select List Labels not accessible2023-12-28T05:03:24ZndavisFront End Event Registration Form - Drop Down Select List Labels not accessibleOn front end registration forms, when using screen reader software (JAWS etc) When tabbing from a text field into a drop down select list field, the screen reader reads the selected data, not the field label, the way it does with other f...On front end registration forms, when using screen reader software (JAWS etc) When tabbing from a text field into a drop down select list field, the screen reader reads the selected data, not the field label, the way it does with other field types. This is broken. It should read the field label for drop down lists like it does with other field types. The user knows what is selected when they click it and it's read.
To fix this issue, change the aria-labelledby attribute of the s2id_autogen1 id'd input html element from select2-chosen-1 to s2id_autogen1
Code Example for the credit card form at https://demo.circle-interactive.co.uk/civicrm/event/register?id=1&reset=1:
`<label for="s2id_autogen1" class="select2-offscreen">Country</label>
<input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="select2-chosen-1" id="s2id_autogen1">`
**aria-labelledby="select2-chosen-1"**
needs to be changed to
`<label for="s2id_autogen1" class="select2-offscreen">Country</label>
<input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="s2id_autogen1" id="s2id_autogen1">`
**aria-labelledby="s2id_autogen1"**
This change can be extrapolated to state list drop downs (indeed any drop-downs)
For blind users this causes confusion because they don't know what field they're on if they're in a state/province named after the country and it works differently than the rest of the field types.
Changing this in the html source using developer tools of firefox or chrome fixes issue until page is refreshed.
I tried to figure out where this is happening but the javascript spaghetti is very confusing. If anyone can point me to the right file I'll patch it.
thx,
Neil P Davis
Developer
National Federation of the Blindhttps://lab.civicrm.org/dev/core/-/issues/3270getAddressColumns doesn't fully support prefix2022-04-22T15:53:18ZJonGoldgetAddressColumns doesn't fully support prefixThere's one place where the table name is hard coded that should be `$tableAlias`. I wrote a fix + UT.
I also realized that the way odd/even street numbers are handled causes the address table to always get joined regardless of whether...There's one place where the table name is hard coded that should be `$tableAlias`. I wrote a fix + UT.
I also realized that the way odd/even street numbers are handled causes the address table to always get joined regardless of whether it's necessary, but that's out of scope for now.5.14.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3343Canceled pending memberships are considered "lifetime" memberships2024-01-04T05:03:21ZJonGoldCanceled pending memberships are considered "lifetime" memberships`CRM_Member_BAO_Membership::getAllContactMembership()` with `$onlyLifeTime` set to `TRUE` searches for all of a contact's memberships, and will return a non-empty array if a membership exists that a) has no end date, b) status is not `Pe...`CRM_Member_BAO_Membership::getAllContactMembership()` with `$onlyLifeTime` set to `TRUE` searches for all of a contact's memberships, and will return a non-empty array if a membership exists that a) has no end date, b) status is not `Pending`.
Today, I came across a scenario where a pending membership was canceled. Since status was `Canceled` and not `Pending` it was returned as a "lifetime" membership and prevented the user from signing up online for a new membership.
This is a bit of an edge case - but I wonder if there's a better definition of a lifetime membership? If I exclude `Canceled` memberships that would exclude lifetime canceled memberships (another edge case). Is there anything I can do short of querying the `civicrm_membership_log` to see if the membership was ever anything but pending or canceled?JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/3526Extensions Mapper caches full path which breaks with dynamic containers2022-06-11T14:42:45ZherbdoolExtensions Mapper caches full path which breaks with dynamic containersCRM_Extension_Mapper caches the full path to extensions which with dynamic containers (such as with Pantheon) means that the cached path might not match the active container's path. This causes a fatal error.
The only solution seems to ...CRM_Extension_Mapper caches the full path to extensions which with dynamic containers (such as with Pantheon) means that the cached path might not match the active container's path. This causes a fatal error.
The only solution seems to be to force CRM_Extension_Mapper to fetch the extensions paths from the database, or prevent it from caching the full path. Currently with the CiviCRM Starterkit we are forcing it to fetch the list from the database each time (https://www.drupal.org/node/2347897).
Relates to https://lab.civicrm.org/dev/cloud-native/issues/6https://lab.civicrm.org/dev/core/-/issues/15Wrong parameter passing in LineItem.php2023-06-23T17:54:21ZjitendraWrong parameter passing in LineItem.phpFound an incorrect parameter supplied to getFieldValue() function in CRM/Price/BAO/LineItem.php.
Current Code from https://github.com/civicrm/civicrm-core/blob/master/CRM/Price/BAO/LineItem.php#L458-
$membershipId = CRM_Core_DAO::g...Found an incorrect parameter supplied to getFieldValue() function in CRM/Price/BAO/LineItem.php.
Current Code from https://github.com/civicrm/civicrm-core/blob/master/CRM/Price/BAO/LineItem.php#L458-
$membershipId = CRM_Core_DAO::getFieldValue('CRM_Member_DAO_MembershipPayment', 'contribution_id', $line['entity_id'], 'membership_id');
`getFieldValue()` accepts the following parameters which is not correctly fed in the above line
> * @param string $daoName
* Name of the DAO (Example: CRM_Contact_DAO_Contact to retrieve value from a contact).
> * @param int $searchValue
* Value of the column you want to search by.
> * @param string $returnColumn
* Name of the column you want to GET the value of.
> * @param string $searchColumn
* Name of the column you want to search by.
> * @param bool $force
* Skip use of the cache.https://lab.civicrm.org/dev/core/-/issues/3271Regression: Can't use operators to filter contact subtypes other than "Is One...2022-04-22T15:53:19ZJonGoldRegression: Can't use operators to filter contact subtypes other than "Is One Of"This is introduced by core#544, which introduces a hard-coded `LIKE` where the code should allow for different operators.
[A commit based on 5.14 is here](https://github.com/MegaphoneJon/civicrm-core/commit/625b0b06e64d02883614e31bb4ef7...This is introduced by core#544, which introduces a hard-coded `LIKE` where the code should allow for different operators.
[A commit based on 5.14 is here](https://github.com/MegaphoneJon/civicrm-core/commit/625b0b06e64d02883614e31bb4ef79825a1b8ad2#diff-d355cdb00cea3915a3cf306c6c08f6a6L2131) and hopefully I (or someone) will have time to merge and add tests in the near future.5.16.0https://lab.civicrm.org/dev/core/-/issues/3540Hardcoded filesystem paths in JS strings in cache2022-06-11T14:45:13ZherbdoolHardcoded filesystem paths in JS strings in cacheI've noticed hardcoded filesystem paths in civicrm_cache where group_name = js_strings. With dynamic containers on a host this could mean that the JS can't be found if it switches containers. Is there a way to make this relative?I've noticed hardcoded filesystem paths in civicrm_cache where group_name = js_strings. With dynamic containers on a host this could mean that the JS can't be found if it switches containers. Is there a way to make this relative?https://lab.civicrm.org/dev/core/-/issues/3629Extraneous space in From address causes on-hold set on all recipients2022-06-11T14:57:32ZBobSExtraneous space in From address causes on-hold set on all recipientsIf a CiviMail email is sent with a From address having the form<br>
`"Name" <me@example.com>` (note two spaces before '<')<br>
then:
1. No emails are sent
2. **All recipients are marked On-Hold!**
Occurs on CiviCRM 4.7.26.
*Edit*: Al...If a CiviMail email is sent with a From address having the form<br>
`"Name" <me@example.com>` (note two spaces before '<')<br>
then:
1. No emails are sent
2. **All recipients are marked On-Hold!**
Occurs on CiviCRM 4.7.26.
*Edit*: Also occurs on 5.2.1
Could not reproduce on demo site as sending email is not enabled there.
The following three CMS log entries are created for each recipient:
1:<pre>Ignoring exception thrown by nullHandler: , Validation failed for: "(INVALID)" <(INVALID)></pre>
2:<pre>$backTrace = #0 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Error.php(959): CRM_Core_Error::backtrace("backTrace", TRUE) #1 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/PEAR.php(921): CRM_Core_Error::nullHandler(Object(PEAR_Error)) #2 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/PEAR.php(577): PEAR_Error->__construct("Validation failed for: \"(INVALID)\" <(INVALID)>", NULL, 16, (Array:2), NULL) #3 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/PEAR.php(236): PEAR::_raiseError(NULL, "Validation failed for: \"(INVALID)\" <(INVALID)>") #4 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/Mail/RFC822.php(209): PEAR::__callStatic("raiseError", (Array:1)) #5 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/Mail.php(191): Mail_RFC822->parseAddressList((Array:2), "localhost", FALSE) #6 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/Mail/mail.php(151): Mail->prepareHeaders((Array:10)) #7 ...</pre>
3:<pre>
Notice: Only variables should be passed by reference in CRM_Mailing_BAO_MailingJob->deliverGroup() (line 721 of /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Mailing/BAO/MailingJob.php).
</pre>5.5.0https://lab.civicrm.org/dev/core/-/issues/2449Contribution page creates a wrong amount and probably payment processor use t...2021-03-15T18:40:07ZjaapjansmaContribution page creates a wrong amount and probably payment processor use this wrong amount**Steps to reproduce**
1. Set localization settings **decimal separator**: `,` and **thousand separator**: `.`
2. Create a contribution page with a amount `897.654.321,987654321`
3. Make a contribution with this contribution page in liv...**Steps to reproduce**
1. Set localization settings **decimal separator**: `,` and **thousand separator**: `.`
2. Create a contribution page with a amount `897.654.321,987654321`
3. Make a contribution with this contribution page in live mode. (We used a dummy payment processor)
**Whats is wrong?**
The amount is changed from `897.654.321,99` to `89.765.432.198.765,00` this is shown on the thank you page as in CiviCRM contribution. So it looks like the wrong amount is charged on the dummy payment processor.
**Screenshots**
![Screenshot_20210309_120737](/uploads/b26eded4cc5e5312a44daa90b1971db9/Screenshot_20210309_120737.png)
![Screenshot_20210309_120742](/uploads/dfcf28497afd690f702ca5399fe89672/Screenshot_20210309_120742.png)
![Screenshot_20210309_120643](/uploads/4fe5b4cfcb0d28d5ca5177d83b4c30fd/Screenshot_20210309_120643.png)
![Screenshot_20210309_120834](/uploads/dfb07362bc3421f7fdc4e4c9fd40b5d4/Screenshot_20210309_120834.png)
**Environment**
Drupal 7
CiviCRM 5.37.aplha1 (dmaster)5.37.0https://lab.civicrm.org/dev/core/-/issues/2447Wrong event fee shown in CiviCRM2023-07-07T05:03:20ZjaapjansmaWrong event fee shown in CiviCRM**Steps to reproduce**
1. Set the localization settings to **decimal separator**: `,` and **thousand separator**: `.`
2. Create a price set with two quantity fields and a drop down.
3. Create an event with only registration and payments...**Steps to reproduce**
1. Set the localization settings to **decimal separator**: `,` and **thousand separator**: `.`
2. Create a price set with two quantity fields and a drop down.
3. Create an event with only registration and payments and select the created price set above
4. Do a registration and a payment. All amounts are correct on the registration screen
5. After you have done a registration check the participant list or the event tab on the contact card. And/or click on view participant. The total amount for the event fee is displayed wrong.
**Screenshot**
Below a screenshot which shows the wrong amount.
![Screenshot_20210309_114606](/uploads/c3150fda8f90aacccfc26b9c50584e92/Screenshot_20210309_114606.png)
**Remarks**
This also happens when you do an event registration from the contact record in CiviCRM.
**Environment**
Drupal 7
CiviCRM 5.37.aplha1 (dmaster)https://lab.civicrm.org/dev/core/-/issues/2446Custom field of type money and drop down does not hold the selected option (C...2021-12-01T09:37:57ZjaapjansmaCustom field of type money and drop down does not hold the selected option (CiviCase & CiviContact)**Steps to reproduce**
1. Create custom field of type money and input type Drop Down Select List.
2. Add a couple of options
3. Go to a case and select a value for the custom field press save.
4. Check the custom field value it is saved...**Steps to reproduce**
1. Create custom field of type money and input type Drop Down Select List.
2. Add a couple of options
3. Go to a case and select a value for the custom field press save.
4. Check the custom field value it is saved and displayed
5. Press edit again - the drop down is now empty
Here is a screen recording of the problem:
![Dropdown_on_case](/uploads/4bef0bd4b99af9d3b0cfab36334c4a43/Dropdown_on_case.gif)
**Remarks**
This problem also occurs when you add a money drop down for contacts (probably also on other screens).
**Environment**
Drupal 7
CiviCRM 5.37.alpha1https://lab.civicrm.org/dev/core/-/issues/2442Proposal - adjust weights on activity contact record types2021-04-07T22:47:08ZeileenProposal - adjust weights on activity contact record typesThis came out of testing search kit - when you search for contacts and add in activity contacts the default record type is 'Assignees' - in search kit data and, I think, real world data I think 'Target' would be a better choice as assign...This came out of testing search kit - when you search for contacts and add in activity contacts the default record type is 'Assignees' - in search kit data and, I think, real world data I think 'Target' would be a better choice as assignees are often empty and I feel like people 'know what they are doing' when trying to find assignees whereas for target I think they are less deliberate about thinking which contact they want.
![image](/uploads/400685a613ddd35ef3190da22631b067/image.png)
Changing this would mean altering the default weights on the option values to re-order the 3 activity types. Personally I think it would be fine to make this change. If we are nervous we could do for new installs only.
I'm not sure the order of source & assignee matters - I flip flop on the order I'd choose there.https://lab.civicrm.org/dev/core/-/issues/16Select "Enable multiple bulk email address for a contact", "hold_date" can no...2023-06-23T17:54:21ZLiyanaSelect "Enable multiple bulk email address for a contact", "hold_date" can not be updatedI have reported the bug at https://issues.civicrm.org/jira/browse/CRM-20189, and now I'll explain why the error occours only if you assign true to the variable civimail_multiple_bulk_emails.
( $result = civicrm_api3('Setting', 'creat...I have reported the bug at https://issues.civicrm.org/jira/browse/CRM-20189, and now I'll explain why the error occours only if you assign true to the variable civimail_multiple_bulk_emails.
( $result = civicrm_api3('Setting', 'create', array(
'civimail_multiple_bulk_emails' => 1,
));)
If civimail_multiple_bulk_emails is true, you have three options to select for "On Hold?" in your email edit block, see the file ".../CRM/Contact/Form/Edit/Email.php".
If you chose the "- select -", the value is "0", which data type String is, and in the function "holdEmail" (.../CRM/Core/BAO/Email.php) the condition "elseif ($email->on_hold == 'null')..." will not be filled, because a string '0' is not 'null'!
Steps to reproduce:
1. Open the page „Administer CiviCRM“ --> “CiviMail Component Settings”, and select the option “Enable multiple bulk email address for a contact”
2. Open a contact and set “on hold” to the email (i.g. select “On Hold Opt Out”), and check the hold_date with api, ), in my test the “hold_date” is “2017-02-22 09:27:56”, and “on_hold=2
3. On the page of contact, reset the “On Hold” and save it, and check the value with api, and the value of “on_hold” is 0, BUT the “hold_date” IS NOT CHANGED! The “hold_date” should be deleted, and set the current time for “reset_date”!
4. As a following error: the “hold_date” is the old one, not changed, if you set “on hold” to the email again (i.g. select “On Hold Bounce”). In my test the “hold_date” is still “2017-02-22 09:27:56”, and “on_hold=1https://lab.civicrm.org/dev/core/-/issues/3276Unreleased regression - fee levels incorrectly show sold out (in code that wi...2022-04-22T15:53:33ZeileenUnreleased regression - fee levels incorrectly show sold out (in code that will be 5.16)Fees are incorrectly showing as sold out, blocking change fee selection.
This is an unexpected consequence of
https://github.com/civicrm/civicrm-core/pull/14244
The path is that because $this->_id is now set it gets assigned to the fo...Fees are incorrectly showing as sold out, blocking change fee selection.
This is an unexpected consequence of
https://github.com/civicrm/civicrm-core/pull/14244
The path is that because $this->_id is now set it gets assigned to the form
https://github.com/civicrm/civicrm-core/blob/5774b54f47445de233daa85672ce4f793dff347a/CRM/Event/Form/Participant.php#L265
Which then gets passed to the call to load the fee block
https://github.com/civicrm/civicrm-core/blob/c4145dedecb1f3157ecf8fd85421f562e8128e73/templates/CRM/Event/Form/Participant.tpl#L411
which results in $_pid being set & as a result online being set
https://github.com/civicrm/civicrm-core/blob/90b461f1623e75e94e0f472a3c6bf23e01defbc1/CRM/Event/Form/EventFees.php#L350
which leads to the element being frozen
https://github.com/civicrm/civicrm-core/blob/90b461f1623e75e94e0f472a3c6bf23e01defbc1/CRM/Event/Form/EventFees.php#L393
which is interpretted as 'sold out'
https://github.com/civicrm/civicrm-core/blob/6b83d5bdd0f2ca546924feae6aa42aeddb1d40cf/templates/CRM/Price/Form/PriceSet.tpl#L93
This is an example of a code antipattern which is too prevalent in our codebase - ie. hanging various assumptions off a parameter.
I *think* the right answer is to assign a variable of online & then pass that through & make appropriate decisions based on that.
The first question is - do we revert https://github.com/civicrm/civicrm-core/pull/14244 out of the rc and then re-commit into master to give us more time given how awful this code path is5.16.0https://lab.civicrm.org/dev/core/-/issues/3541[Meta] Does CiviCRM have a single defined application HTTP entry point which ...2024-02-11T05:03:23Zxurizaemon[Meta] Does CiviCRM have a single defined application HTTP entry point which routes all requests?Various issues arise when we have multiple entry points to the application (eg scripts in `extern/`, direct call scripts like KCFinder `integration/civicrm.php`, IPN handlers).
These issues stem from duplicated / non-identical approache...Various issues arise when we have multiple entry points to the application (eg scripts in `extern/`, direct call scripts like KCFinder `integration/civicrm.php`, IPN handlers).
These issues stem from duplicated / non-identical approaches to bootstrapping / path discovery / session management.
The end goal here is to eliminate alternate entry points and ensure any callback uses CiviCRM's core routing.
As much as possible auth/bootstrap/url/path resolution should be handled in one place only (each) for maintainability.
## Background issues / examples:
* [CRM-17212](https://issues.civicrm.org/jira/browse/CRM-17212)
* [CRM-13249](https://issues.civicrm.org/jira/browse/CRM-13249)
* [CRM-12246](https://issues.civicrm.org/jira/browse/CRM-12246)
* cloud-native#6
* cloud-native#7
## Targets
* [`extern/authorizeIPN.php`](https://github.com/civicrm/civicrm-core/blob/master/extern/authorizeIPN.php), [`ipn.php`](https://github.com/civicrm/civicrm-core/blob/master/extern/ipn.php), [`pxIPN.php`](https://github.com/civicrm/civicrm-core/blob/master/extern/pxIPN.php) - IPN handlers → use `civicrm/ipn/%` entry point
* [`extern/cxn.php`](https://github.com/civicrm/civicrm-core/blob/master/extern/cxn.php)
* [`extern/open.php`](https://github.com/civicrm/civicrm-core/blob/master/extern/open.php) - endpoint to track mail opens via image URL
* [`extern/rest.php`](https://github.com/civicrm/civicrm-core/blob/master/extern/rest.php) - API endpoint → `civicrm/api/v3`, `civicrm/api/v4` etc
* [`extern/soap.php`](https://github.com/civicrm/civicrm-core/blob/master/extern/soap.php) - SOAP interface, still used by CiviSMTP? → `civicrm/soap`
* [`extern/url.php`](https://github.com/civicrm/civicrm-core/blob/master/extern/url.php) - Mailing redirect → `civicrm/redirect` ?
* [`packages/kcfinder/integration/civicrm.php`](https://github.com/civicrm/civicrm-packages/blob/master/kcfinder/integration/civicrm.php) - KCFinder integration for CiviCRM - IDK
IPN handlers should be tackled as those core payment processors are moved to extensions.https://lab.civicrm.org/dev/core/-/issues/3630Fix accessible mailings when users don't have view all contacts permission2024-02-19T05:03:29ZMichael McAndrewFix accessible mailings when users don't have view all contacts permissionCRM_Mailing_BAO_Mailing::mailingACLIDs is responsible for limiting the mailings that are visible to users when they do not have either view or edit all contacts (at the BAO layer at least)
It works by returning a list of Ids of mailings...CRM_Mailing_BAO_Mailing::mailingACLIDs is responsible for limiting the mailings that are visible to users when they do not have either view or edit all contacts (at the BAO layer at least)
It works by returning a list of Ids of mailings that should be visible.
One of the queries that is used to construct this list looks like this:
```sql
SELECT DISTINCT(m.id) AS id
FROM civicrm_mailing m
LEFT JOIN civicrm_mailing_group g ON g.mailing_id = m.id
WHERE ((g.entity_table LIKE 'civicrm_group%'
AND g.entity_id IN (3))
OR (g.entity_table IS NULL
AND g.entity_id IS NULL
AND m.domain_id = 1))
```
The logic behind the `OR (g.entity_table IS NULL AND g.entity_id IS NULL AND m.domain_id = 1) where clause looks wrong to me.
My assumption is that it is there because if you created a mailing (added lots of content, etc.) but didn't then assign it a group, it would suddenly disappear from view when you went back to look for it because it didn't contain a group that you have access to.
The problem with this condition is that the user also gets to see mailings by other contacts who have similarly not defined any groups yet.
Provided the above assumption is correct, a better condition would be `OR m.created_id = $user_id` (where user id is the contact ID of the current logged in user.
@JonGold, I wonder what you think about this given that your issue https://issues.civicrm.org/jira/browse/CRM-16981 was similar in nature. @seamuslee - I'm guessing you might have some thoughts on this as well.
Also related is https://issues.civicrm.org/jira/browse/CRM-18181 (though I have not yet got my head around how :)
Aaalso related, in my experimentation, the Mailing api does not respect these permissions, so people get to see all mailings in the recipients field in the Angular powered new CiviMail UI. Are you experiencing that @JonGold?
I've running the above suggestion with a client at the moment. If we get some consensus on how it should work, I would be happy to Shepard this into core.https://lab.civicrm.org/dev/core/-/issues/2388Searchkit bug - not displaying grouped by field2021-02-21T22:07:08ZeileenSearchkit bug - not displaying grouped by fieldAt a url like
civicrm/admin/search#/create/Contribution?params=%7B"version":4,"select":%5B"financial_type_id:label","SUM(total_amount)%20AS%20SUM_total_amount"%5D,"orderBy":%7B%7D,"where":%5B%5D,"groupBy":%5B"financial_type_id"%5D,"join...At a url like
civicrm/admin/search#/create/Contribution?params=%7B"version":4,"select":%5B"financial_type_id:label","SUM(total_amount)%20AS%20SUM_total_amount"%5D,"orderBy":%7B%7D,"where":%5B%5D,"groupBy":%5B"financial_type_id"%5D,"join":%5B%5D,"having":%5B%5D%7D
the financial type field is empty
![image](/uploads/5297013039c6f27b591c1ce2d354d71b/image.png)
![image](/uploads/0f74b9e2b98d9e312018218ad43ac727/image.png)
@colemanw5.36.0https://lab.civicrm.org/dev/core/-/issues/17Convert Campaign Interview Task to use Pseudoconstant and remove PHP notices2023-06-23T17:54:21Zmattwiremjw@mjwconsult.co.ukConvert Campaign Interview Task to use Pseudoconstant and remove PHP noticesRemove deprecated CRM_Core_OptionGroup and replace with CRM_Core_PseudoConstant. Fix PHP notices.
Ref: https://github.com/civicrm/civicrm-core/pull/11809Remove deprecated CRM_Core_OptionGroup and replace with CRM_Core_PseudoConstant. Fix PHP notices.
Ref: https://github.com/civicrm/civicrm-core/pull/11809