Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-11-03T05:03:20Zhttps://lab.civicrm.org/dev/core/-/issues/1771Saved import mapping doesn't work for multi-record custom sets2023-11-03T05:03:20ZAndy ClarkSaved import mapping doesn't work for multi-record custom setsWhen importing a multi-record custom field set, the mapping saves correctly. Tables civicrm_mapping and civicrm_mapping_field appear to be correct. However, when you go to use the saved mapping, only the first (top) field appears to hav...When importing a multi-record custom field set, the mapping saves correctly. Tables civicrm_mapping and civicrm_mapping_field appear to be correct. However, when you go to use the saved mapping, only the first (top) field appears to have been saved - in my case the first field was the external identifier. The import then fails with 'unknown error'. Even so, the mapping tables are OK but the import fails. Using release 5.24.4https://lab.civicrm.org/dev/user-interface/-/issues/21"Allow sharing through social media?" – misleading label2020-10-12T22:26:23Znicol"Allow sharing through social media?" – misleading label![image](/uploads/6cafff09b7214f580edef390a8272825/image.png)
Without going into the design / etc issues of the Help Spread the Word social media box at the bottom of event and contribution pages, the checkbox enabling and disabling it ...![image](/uploads/6cafff09b7214f580edef390a8272825/image.png)
Without going into the design / etc issues of the Help Spread the Word social media box at the bottom of event and contribution pages, the checkbox enabling and disabling it is a little confusing. Users could turn it on by mistake because they check a box asking them to "Allow sharing through social media?" of the event or contribution page in question.
![image](/uploads/5121c784856610036c72466d1e7c9346/image.png)
Obviously everyone clicks yes to that. But in reality obviously any public page can be shared through social media - this checkbox neither enables nor blocks social sharing. Unless I'm badly mistaken, checking it simply adds Facebook/Twitter/LinkedIn share buttons and tracking code to the foot of the event or contribution page in a green box. It would be clearer to label this as "Add social media sharing button footer".
![image](/uploads/2765ae670a5d063ce3316dc1a02e1f95/image.png)
Post-GDPR & CCPA it might also be good to state in the info box that turning this on will add Facebook/Twitter/LinkedIn tracking code, as that could impact the site's privacy policy/cookie declaration.5.32.0https://lab.civicrm.org/dev/user-interface/-/issues/22Configuration Screen: Register your site: Page not found2020-05-20T18:59:02Zbirgit.pauliConfiguration Screen: Register your site: Page not foundOn the Configuration screen the link to Register your site run into a 404 error.
The link is: https://civicrm.org/register-your-site?src=iam&sid=9e73835fc43e2905bbc4f014162bf077
Found in both version: CiviCRM Spark and CiviCRM self-hos...On the Configuration screen the link to Register your site run into a 404 error.
The link is: https://civicrm.org/register-your-site?src=iam&sid=9e73835fc43e2905bbc4f014162bf077
Found in both version: CiviCRM Spark and CiviCRM self-hosted
Version: 5.25.0https://lab.civicrm.org/dev/core/-/issues/1772Deleting a smart group does not delete the saved search2020-07-08T11:14:07ZJKingsnorthDeleting a smart group does not delete the saved searchSteps to recreate:
- Create a search for name like 'smith'
- Use the search results to create a smart group 'Smiths'
- In the DB new rows in _saved_search, new entry in _group
- Delete the group 'Smiths'
- In the DB, the _group row as b...Steps to recreate:
- Create a search for name like 'smith'
- Use the search results to create a smart group 'Smiths'
- In the DB new rows in _saved_search, new entry in _group
- Delete the group 'Smiths'
- In the DB, the _group row as been deleted, but the _saved_search row is still there
I picked up on this because saved searches with 'old' custom fields were coming out on the system checklist report for smart groups with disabled/deleted fields. But because they are not associated with a group anymore, the entries are blank:
![image](/uploads/6c57eb85989871ff936d3e11b21097bd/image.png)
Discussion points:
1 - We could fix the query that's building these alerts to only list active groups, excluding 'orphaned' saved searches, but it might be better to...
2 - Are saved_search entries used anywhere apart from smart groups? If not, can we:
- delete the orphaned saved searches in an update routine
- delete saved searches automatically when the smart group that uses them is deletedhttps://lab.civicrm.org/dev/core/-/issues/3308Membership end date is miscalculated on recurring payments that fail temporarily2023-12-29T05:42:34ZJonGoldMembership end date is miscalculated on recurring payments that fail temporarilyMembership organizations hate this one weird trick to get 17% off any membership!
To replicate:
* Create a monthly recurring membership using, say, Paypal. E.g. starting 2020-03-01, ending 2020-03-31.
* If the second recurring payment ...Membership organizations hate this one weird trick to get 17% off any membership!
To replicate:
* Create a monthly recurring membership using, say, Paypal. E.g. starting 2020-03-01, ending 2020-03-31.
* If the second recurring payment goes through on time, the membership end date is extended properly to 2020-04-30. However, if the payment fails, Paypal will retry 5 days later. If it goes through at that time, the membership end date will also be extended for 5 days.https://lab.civicrm.org/dev/core/-/issues/3238Graphs on Contribution Summary report replace final row with grand total value2022-04-22T15:51:46ZAndrew WestGraphs on Contribution Summary report replace final row with grand total valueGraphs on the Contribution Summary report will include the grand total in some circumstances. To replicate on demo site:
1. Using demo data, launch the Contribution Summary report
2. Leave all settings as default
3. Refresh results a...Graphs on the Contribution Summary report will include the grand total in some circumstances. To replicate on demo site:
1. Using demo data, launch the Contribution Summary report
2. Leave all settings as default
3. Refresh results and note the grand total. Current data shows this:
![Annotation_2020-05-20_211434](/uploads/17d1b5942dde265bf0076d857396e46b/Annotation_2020-05-20_211434.png)
4. Switch to a bar chart in the top right and click 'View'. Hover over the final column and you'll see it's the grand total number:
![barchart](/uploads/3454788b2eecfc7ea4b8d44538b371d6/barchart.png)
I'm not terribly familiar with reports, but my initial fix was to add this to the top of CRM_Report_Form_Contribute_Summary::buildChart()
if ($this->_rollup) {
array_pop($rows);
}
If this makes sense I can make it a PR.5.28.0https://lab.civicrm.org/dev/core/-/issues/1773Unsubscribe generates 500 server error responses, logs say "missing parameters"2020-05-27T06:19:28ZRichUnsubscribe generates 500 server error responses, logs say "missing parameters"Overview
----------------------------------------
Same as reported at:
https://civicrm.stackexchange.com/questions/35323/missing-parameters-error-in-unsubscribe-confirmation
There was a PR
https://github.com/civicrm/civicrm-core/pull/1...Overview
----------------------------------------
Same as reported at:
https://civicrm.stackexchange.com/questions/35323/missing-parameters-error-in-unsubscribe-confirmation
There was a PR
https://github.com/civicrm/civicrm-core/pull/17081
to fix this but I'm still seeing these errors after applying the patch to Unsubscribe.php
I find it is intermittent: Every time *I* have used the form, it works! I've tried it on a desktop browser and Chrome on Android, for the same records as those that caused the crashes. I've tried it from a not-logged-in browser (i.e. anonymously) using the exact same link used by the people it crashed for and it "worked for me".
Environment information
----------------------------------------
* __Browser:__ Have seen errors on Chrome on iOS and Chrome on Android
* __CiviCRM:__ 5.24.5
* __PHP:__ _7.0
* __CMS:__ Drupal 7.70
* __Database:__ MariaDB 10.1
* __Web Server:__ nginx
Some more logs
---------------
Here's an example.
Error:
```
[1] => Array
(
[message] => Missing Parameters
[code] =>
[exception] => CRM_Core_Exception Object
(
[errorData:CRM_Core_Exception:private] => Array
(
[error_code] => 0
)
[cause:protected] =>
[_trace:PEAR_Exception:private] =>
[message:protected] => Missing Parameters
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /var/www/mysite.com/sites/all/modules/civicrm/CRM/Mailing/Form/Unsubscribe.php
[line:protected] => 31
```
POST was:
```
qfKey: 1f83e143301245d6f4a5839b3e49330e_7836
entryURL: https://mandrillapp.com/track/click/30767716/a-long-string
_qf_default: Unsubscribe:next
email_confirm: the-correct-email-address@example.com
_qf_Unsubscribe_next:Unsubscribe
```
5.27.0https://lab.civicrm.org/dev/core/-/issues/1774$is_pay_later is TRUE in contribution receipt even if payment is completed.2023-03-16T05:03:20Zjitendra$is_pay_later is TRUE in contribution receipt even if payment is completed.To replicate -
- Create a pay later payment in civicrm using a front end contribution page.
- Note that the email received has `Invoice` in the subject. This text is set when you choose to pay via `pay later`.
- Complete the payment usi...To replicate -
- Create a pay later payment in civicrm using a front end contribution page.
- Note that the email received has `Invoice` in the subject. This text is set when you choose to pay via `pay later`.
- Complete the payment using `completetransaction` API (or use API explorer from UI). This is used by payment processors, xero, etc to complete the payment in civicrm on receiving the confirmation.
```
$result = civicrm_api3('Contribution', 'completetransaction', [
'id' => <contribution_id>,
]);
```
- The email confirmation still has `Invoice` in the subject.https://lab.civicrm.org/dev/core/-/issues/1775civicrm_financial_trxn.fee_amount reversals mixed up2023-03-22T05:03:26ZJoeMurraycivicrm_financial_trxn.fee_amount reversals mixed upOverview
----------------------------------------
When doing reversal bookkeeping entry as part of changing a financial type, the fee_amount field does not have its sign reversed. This results in an incorrect net_amount field. See bug 1 ...Overview
----------------------------------------
When doing reversal bookkeeping entry as part of changing a financial type, the fee_amount field does not have its sign reversed. This results in an incorrect net_amount field. See bug 1 in https://gist.github.com/JoeMurray/6db6a82ff6c9e593ca5301b5f8708f52
Current behaviour
----------------------------------------
civicrm_financial_trxn.fee_amount has same value as original record in the reversal record. This results in net_amount not being a correct reversal of the original record's net_amount.
Expected behaviour
----------------------------------------
civicrm_financial_trxn.fee_amount has negative of value in original record in the reversal record. This results in net_amount being the negative in the reversal record of that field in the original record.
Comments
----------------------------------------
We should check for this issue wherever the code creates reversal transactions.
Make unit tests for all of the areas in the code where this occurs.seamusleeseamuslee2020-05-26https://lab.civicrm.org/dev/core/-/issues/1776Bank fee has wrong date on import in civicrm_financial_item.transaction_date ...2023-01-31T04:25:07ZJoeMurrayBank fee has wrong date on import in civicrm_financial_item.transaction_date incorrected uses import date rather than payment date onOn import of a transaction with a bank fee, the revenue record gets the contribution receive date correctly put into civicrm_financial_item.transaction_date but the bank fee record incorrected uses import date rather than the imported pa...On import of a transaction with a bank fee, the revenue record gets the contribution receive date correctly put into civicrm_financial_item.transaction_date but the bank fee record incorrected uses import date rather than the imported payment date.
Bug 2 in https://gist.github.com/JoeMurray/6db6a82ff6c9e593ca5301b5f8708f52
Joe to confirm the exact API calls used on import to ensure that it was not a missed or incorrect parameter, but an interpretation of this date in processing a high level call to insert a contribution including a bank fee.seamusleeseamusleehttps://lab.civicrm.org/dev/core/-/issues/1777Old Files notification on D82023-05-15T14:43:42ZhomotechsualOld Files notification on D8Overview
----------------------------------------
_A CiviCRM 5.25.* install on Drupal 8.8.* displays the status report message for the "old files" which should not exist. Ordinarily this message is helpful, because those files are in the...Overview
----------------------------------------
_A CiviCRM 5.25.* install on Drupal 8.8.* displays the status report message for the "old files" which should not exist. Ordinarily this message is helpful, because those files are in the web root and could be web-accessible. On d8 those files are outside the webroot (if using the recommended Drupal 8 install structure!)._
_This message cannot safely be actioned on D8 composer installs without causing composer errors due to changed dependencies. It would therefore require the upstream projects to stop shipping those files or CiviCRM to suppress the error on D8._
Reproduction steps
----------------------------------------
1. Install CiviCRM on Drupal 8.8.*
![2020-05-21_17_37_42-CiviCRM_System_Status__5____TestD8_and_1_more_page_-_Mikey_MJCO_-_Microsoft__Edg](/uploads/147afbee58c37efa8b8b32a13155b2cc/2020-05-21_17_37_42-CiviCRM_System_Status__5____TestD8_and_1_more_page_-_Mikey_MJCO_-_Microsoft__Edg.png)https://lab.civicrm.org/dev/wordpress/-/issues/54Tentative: issue with new page/civiwp patch2020-05-22T13:55:16ZAndrew WestTentative: issue with new page/civiwp patchThis is a tentative issue, but I wanted to flag it while I do some more testing - just in case someone somewhere is dropping a point release tonight.
I applied the patch for turning page= into civiwp= and have had problems with forms in...This is a tentative issue, but I wanted to flag it while I do some more testing - just in case someone somewhere is dropping a point release tonight.
I applied the patch for turning page= into civiwp= and have had problems with forms in extensions. Our URL /civicrm/governance/proxyvote began resolving to /civicrm/governance/proxyvote?civiwp=CiviCRM. And then the form didn't process when submitted - postprocess() just didn't fire. I'm seeing similar on profile links: /civicrm/profile/create/?gid=1&reset=1 becomes /civicrm/profile/create/?gid=1&reset=1&civiwp=CiviCRM.
I think it's very likely this is something in our setup, or a silly mistake on my part somewhere. @kcristiano seems to have tested on similar setups and it's been fine. But I've tried this on two sites with the same issue. The first is running WP 5.4, Civi 5.24.6, the second WP 5.4 and 5.25. The latter has far fewer plugins or extensions, but neither are entirely clean.
I'll test more tomorrow and report back. Hopefully this is something I've done wrong / in our setup.https://lab.civicrm.org/dev/core/-/issues/1778Workaround for contribution.payment_instrument_id2023-03-19T05:03:31ZJoeMurrayWorkaround for contribution.payment_instrument_idSummary: when a contribution is created as Pay Later, the payment method on the first payment should replace the contribution's payment method. In the long term, a better solution to handling the many payment methods per contribution pro...Summary: when a contribution is created as Pay Later, the payment method on the first payment should replace the contribution's payment method. In the long term, a better solution to handling the many payment methods per contribution problem is needed.
Background
A contribution's payment method (civicrm_contribution.payment_instrument_id) is a crufty historical artifact from the era before partial payments, and it's not currently editable when a contribution is edited.
By contrast, the payment method on payments (civicrm_financial_trxn.payment_instrument_id) is editable in the browser when editing a payment.
From an accounting perspective, it isn't clear what it would mean if the contribution's payment method was changed after one or more payments are received - should it replace the payment method on all of the payments?? Reports and search have not been refactored to use civicrm_financial_trxn.payment_instrument_id, unfortunately, so there is a motivation to make the contribution's payment method better reflect the reality of what happens.
One important, common scenario that causes a lot of grief could be better handled with a small change. When a Pay Later contribution is created, a payment method needs to be specified, but it may not turn out to be accurate. When a Pay Later contribution status is transitioned to Completed or Partially Paid due to a Record Payment action, the payment method for the payment could be used to update the contribution's. No other change in what goes in to the database is anticipated, and more particularly, no change in the financial accounting.
--------------
FWIW, this is a similar problem of many-to-one as the financial types of line items compared to the contribution's single financial type. It also developed because the introduction of the many-to-one conceptual model was not matched with the courage and resources to refactor the original one-to-one model.
A proper solution would be to get rid of the field on contribution records. Changes would be needed in view contribution, search, and reporting so that the actual payment methods used for the payments on a contribution were used consistently.
With the new Search Builder about to be released we might be on verge of a new era of accuracy and flexibilty. In a few short months, its results will be the basis of the data for a new era of reports. Let's aim to get accurate data on payment methods out in those two areas and then come back to address this long-standing problem.JoeMurrayJoeMurrayhttps://lab.civicrm.org/dev/core/-/issues/1779Documentation Query: Profile edit bounces to Home Page if user has insufficie...2023-04-09T05:03:30ZkcristianoDocumentation Query: Profile edit bounces to Home Page if user has insufficient permissionsStarting in Version 5.23 this [PR](https://github.com/civicrm/civicrm-core/pull/15770) changed behavior of what will happen if a profile page (amongst other items) is accessed without the proper permissions.
In recent profile testing if...Starting in Version 5.23 this [PR](https://github.com/civicrm/civicrm-core/pull/15770) changed behavior of what will happen if a profile page (amongst other items) is accessed without the proper permissions.
In recent profile testing if a user goes to a Profile Edit page and either does not have proper permissions (not logged in, invalid token) the page does not load, it does not give them an error it merely bounces toi the home page.
To reproduce go to : https://dmaster.demo.civicrm.org/civicrm/profile/edit?gid=1&reset=1 as an anonymous user. You will end up on the home page and will not receive any notices.
While this is better than a fatal error, it can be unexpected. Reviewing this [doc page](https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/) Do we need to be clearer on this affect and what a user will experience?
@MikeyMJCO what do you think?https://lab.civicrm.org/dev/wordpress/-/issues/55Randomly losing Profile page content in WordPress2021-10-18T19:25:49Zdarren.woodsRandomly losing Profile page content in WordPressWordPress 5.4.1 Civi 5.25.0 Debian 10
We are randomly loosing profile pages in WordPress... The WordPress page is still rendered, but without any of the Civi Profile content (Profile is embedded as a shortcode in "Edit" mode). Clearing ...WordPress 5.4.1 Civi 5.25.0 Debian 10
We are randomly loosing profile pages in WordPress... The WordPress page is still rendered, but without any of the Civi Profile content (Profile is embedded as a shortcode in "Edit" mode). Clearing the cache with "wp civicrm cache-clear" multiple times (i.e. more than once, sometimes 3 or 4 times) resolves the issue and profile forms are shown again. Deleting the tempaltes_c contents doesn't immediatly resolve it, so we think it's possibly an ACL cache issue in the DB. We have ACL entries for "everyone" to view the profile and edit underlying custom field group, and the profiles can work fine for a day or two, then suddenly vanish without any errors. Any help, much appreciated as this one is proving really hard to debug.https://lab.civicrm.org/dev/core/-/issues/1780Export selected fields doesn't export related contacts if related info is pre...2020-06-04T04:12:51ZyashodhaExport selected fields doesn't export related contacts if related info is present in mappingSteps to replicate
* Search > *Find Contacts*
* Click the *Search* button > results in X contacts
* Select All contacts
* Actions > *Export Contacts*
* Use *Export PRIMARY fields*, all X contacts are exported
* Now try *Select Fields fo...Steps to replicate
* Search > *Find Contacts*
* Click the *Search* button > results in X contacts
* Select All contacts
* Actions > *Export Contacts*
* Use *Export PRIMARY fields*, all X contacts are exported
* Now try *Select Fields for Export* with some fields as related fields like employer, spouse of id etc
* *DO NOT MERGE*
* Export > only X-N contact records where N is the contacts that appeared in related contacts fields
I replicated this on dmaster and seems to be a regression when compared it with 4.7 site where no. of contacts exported was X regardless related fields are used in mapping or primary fields are used.5.26.0https://lab.civicrm.org/dev/financial/-/issues/126Membership BAO does creepy stuff with line items2020-05-27T12:44:56ZeileenMembership BAO does creepy stuff with line itemsI've finally made sense of the code in the Membership BAO but it kinda scares me. The code is set up to create line items for memberships that do not have contributions.
It seems that a membership with no contribution will wind up creat...I've finally made sense of the code in the Membership BAO but it kinda scares me. The code is set up to create line items for memberships that do not have contributions.
It seems that a membership with no contribution will wind up creating a 'best effort' line item and deleting any line items already related to the membership.
In the code I'm looking at (the renewal form) the contribution is created later & the membership winds up with 2 line items (one with a NULL contribution id).
I used to think that line items had to have a contribution id but I've learnt that participants also support orphan line items. However, in this case they wind up with both.
I'm not clear that it was intentional that ALL memberships have line items - it looks from the code like it might have originally been for non-quick-config-only. However, I guess??? it's the model now - although I suspect it's inconsistent.....
I think we might need to start passing in skipLineItem a bit more.
I can replicate the MembershipRenewal one in a test so can process that onehttps://lab.civicrm.org/dev/core/-/issues/1781CRM_Utils_Time::setTime and getTime() and their use in unit tests2023-03-23T05:03:23ZDaveDCRM_Utils_Time::setTime and getTime() and their use in unit testsThey're used partly in tests but seem prone to rollover issues and the use of an internal $delta offset doesn't make sense (to me) in tests. I traced the history - see farther down - and I think before being used in tests it got co-opted...They're used partly in tests but seem prone to rollover issues and the use of an internal $delta offset doesn't make sense (to me) in tests. I traced the history - see farther down - and I think before being used in tests it got co-opted for use in queues, and then when it later got used in tests it was maybe based on how it originally worked and/or a misunderstanding/unknowing that its function had been reworked.
Example:
* phpunit/CRM/Core/BAO/ActionScheduleTest::assertCronRuns() calls CRM_Utils_Time::setTime(). This sets $delta to some number, let's say `-1000` just for something specific.
* Call api/v3/Job.php::civicrm_api3_job_send_reminder() with no parameters.
* This calls CRM_Core_BAO_ActionSchedule::processQueue() with NULL for the datetime param.
* processQueue() then ends up calling CRM_Utils_Time::getTime(), which returns `time() + 1000`, which if time() hasn't changed, is the original time we passed into setTime() earlier, but if it has changed, we get a different time.
So this is where I was originally confused. If the intent was to use this as a way to set and get a "fake" time for testing purposes, then why not just have setTime() store the actual fake time that was passed in and then have getTime() return that?
----
I checked back and they were introduced here: https://github.com/civicrm/civicrm-svn/commit/af28c476c4469e430f365461e65e18146d730c42.
And they **did** just store the time not a delta!
Then it got reworked here: https://github.com/civicrm/civicrm-svn/commit/923ba87fe13087d220278dd3dea9db68216e56da,
but that was before ActionScheduleTest,
which was added here https://github.com/civicrm/civicrm-svn/blob/e5910b77f4d3e34707c247a2e97b4cec51dfb965/tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php
Thus, flaky test. This particular one doesn't come up much in the PR queues though, probably because it's too fast.https://lab.civicrm.org/dev/core/-/issues/1782V4 activity api has no default for activity_date_time2023-03-20T01:56:53ZeileenV4 activity api has no default for activity_date_timePossibly this should be db level default....Possibly this should be db level default....https://lab.civicrm.org/dev/financial/-/issues/127Receipts for recurring transactions are missing links to modify future contri...2023-11-23T07:34:12ZEdselopezReceipts for recurring transactions are missing links to modify future contributionsOn a backoffice credit card contribution page, there is text indicating that the email sent for a recurring contribution will contain links to modify/cancel the recurring transaction. The receipt however, does not contain these links.On a backoffice credit card contribution page, there is text indicating that the email sent for a recurring contribution will contain links to modify/cancel the recurring transaction. The receipt however, does not contain these links.seamusleeseamuslee