Development issueshttps://lab.civicrm.org/groups/dev/-/issues2021-01-22T20:28:33Zhttps://lab.civicrm.org/dev/financial/-/issues/148Deprecate BaseIPN functions validateData & LoadObject2021-01-22T20:28:33ZeileenDeprecate BaseIPN functions validateData & LoadObjectWe've just done a round of clean up around interacting with completeOrder and I'm putting this here as what I think would be a good starting point next time.
The function in the BaseIPN class validateData does a bit more than that - it...We've just done a round of clean up around interacting with completeOrder and I'm putting this here as what I think would be a good starting point next time.
The function in the BaseIPN class validateData does a bit more than that - it
1) loads a couple of things - one of which is needed - contribution
2) it checks a couple of things
3) it calls loadObjects which in turn does very little over & above calling
```
$contribution->loadRelatedObjects($input, $ids)
```
Most of the things thus-loaded are unused - except in some specific ways within the processor classes & the stuff around $ids['paymentProcessor'] = $paymentProcessorID; could go if we just passed that as an input to the other functions.
In the past sometimes we have duplicated functions in order to unravel them. On a number of occasions this has worked out well. On others I think we are still paying the price. In particular I think it works when you duplicate code & then keep actively cleaning it up. The mess in the batch update task feels like a case where the code was probably duplicated but then left for a looooonnnnggg time.
In this case I think we can duplicate the contents back with a 'light clean' - since we've already gotten it down to fairly minimal code chunk.5.35.0https://lab.civicrm.org/dev/core/-/issues/2047Merge - ensure location entities remaining on deleted contacts have is_primar...2020-10-16T01:52:16ZeileenMerge - ensure location entities remaining on deleted contacts have is_primary integrityThe testing I'm doing for https://lab.civicrm.org/dev/core/-/issues/2039 highlights that when a contact is deleted by merge they can be left with 1 or more address/email etc but none marked primary,
I thought about fixing the test to ex...The testing I'm doing for https://lab.civicrm.org/dev/core/-/issues/2039 highlights that when a contact is deleted by merge they can be left with 1 or more address/email etc but none marked primary,
I thought about fixing the test to exclude deleted contacts but
1) if they are undeleted again then the integrity is not fixed
2) having integrity on all contacts makes it a bit easier to check for integrity (ie the query in the test is faster than once we start filtering out deleted contacts)
I've started on some preparatory cleanup
https://github.com/civicrm/civicrm-core/pull/18499
https://github.com/civicrm/civicrm-core/pull/185005.32.0eileeneileenhttps://lab.civicrm.org/dev/core/-/issues/2011Extension display UI improvement - separate out processors2023-05-02T05:03:21ZeileenExtension display UI improvement - separate out processorsA while back JohnFF did a PR to split the extension screen out into topics. It stalled because aspects around the categorisation were problematic & I understand there was some issue that became blocking.
However, I think we all agreed t...A while back JohnFF did a PR to split the extension screen out into topics. It stalled because aspects around the categorisation were problematic & I understand there was some issue that became blocking.
However, I think we all agreed the UI outcome was good.
We discussed today that we could bring this back in a more phased way - ie
1) scan for extensions with the tag topic:payment-processor
https://docs.civicrm.org/dev/en/latest/extensions/info-xml/#tags
If some are detected then display them in a separate PaymentProcessor's tab instead of the main tab
2) encourage payment processors to add the tab & add it to those we can
3) once people can see how it works with one generally agreed categorisation open up the discussion as to what other taxonomy we should use - I would expect the permitted ones in the original implementation would just be an array - so this would be technically easy but the discussion would be probably fairly extensive. Payment processors stand out, however, as being the part of the discussion that could be easily picked off
https://github.com/civicrm/civicrm-core/pull/12924https://lab.civicrm.org/dev/core/-/issues/2044Proposal apiv4 - revisit required parameters on location entities2020-10-02T01:41:10ZeileenProposal apiv4 - revisit required parameters on location entitiesI propose we adjust the location api required fields inn v4api
- Address - don't require contact_id, make location_type_id required in xml
- Email - don't require contact_id, make location_type_id required in xml
- Phone - don't require...I propose we adjust the location api required fields inn v4api
- Address - don't require contact_id, make location_type_id required in xml
- Email - don't require contact_id, make location_type_id required in xml
- Phone - don't require contact_id, make location_type_id required in xml
For all these entities we have a valid use case for no contact_id in the context of location blocks for addresses. I wanted to cleanup the code in ManageLocation around addresses https://github.com/civicrm/civicrm-core/pull/18488 & found I can't use Address::save to do in a better way due to the above
@colemanw how far did you go down this path?5.31.0https://lab.civicrm.org/dev/core/-/issues/2046Rationalise BAO create vs add functions2023-05-13T05:03:22ZeileenRationalise BAO create vs add functionsBack in the dawn of CiviCRM there was create and there was add and there was a theory behind them. Fast forward to today - there is still create & there is still add but not much sign of a theory behind them.
What has changed is that we...Back in the dawn of CiviCRM there was create and there was add and there was a theory behind them. Fast forward to today - there is still create & there is still add but not much sign of a theory behind them.
What has changed is that we no longer recommend either create is called directly
I proposed we set a goal (long term) to consolidate create & add functions into one function - with the functionality moved from add into create & add becoming a deprecated wrapper around create. The example I'm looking at is pretty straight forward - ie in Email BAO
1) With this PR https://github.com/civicrm/civicrm-core/pull/18494 add is no longer called (seemingly not even in universe)
2) the only thing create does that add doesn't is handlePrimary so there is a weak case for a separate add.
I'll put up a PR for the change to Email - to demo it - it doesn't turn out to be an easy merge I'll close it & continue to track here.
@colemanw @mattwire @monish.deb @seamusleehttps://lab.civicrm.org/dev/core/-/issues/2060Relationship needs a pseudoconstant for relationship type2020-09-23T23:41:11ZeileenRelationship needs a pseudoconstant for relationship type@colemanw - I suggest we could have a function that concats some 2 way info?
![Screen_Shot_2020-09-24_at_7.54.18_AM](/uploads/b41459f06fbd78ab6706a89096c31e87/Screen_Shot_2020-09-24_at_7.54.18_AM.png)@colemanw - I suggest we could have a function that concats some 2 way info?
![Screen_Shot_2020-09-24_at_7.54.18_AM](/uploads/b41459f06fbd78ab6706a89096c31e87/Screen_Shot_2020-09-24_at_7.54.18_AM.png)https://lab.civicrm.org/dev/core/-/issues/2073Performance - meta issue for hunting down memory leaks2023-05-14T05:03:22ZeileenPerformance - meta issue for hunting down memory leaksWe recently had some tests fail due to running out of memory (@DaveD , @seamuslee ). Concurrently in performance testing locally I discovered that my tests of 2000 donations went in at 1/4 of the speed of my tests of 200 & of course @ja...We recently had some tests fail due to running out of memory (@DaveD , @seamuslee ). Concurrently in performance testing locally I discovered that my tests of 2000 donations went in at 1/4 of the speed of my tests of 200 & of course @jamie has blogged about slow downs.
This set me off on the path of digging into memory leaks and I seem to have found my first leak. It's in the unit tests rather than in the main code (which is where I started looking). I'll talk through my steps
- I started from https://alanstorm.com/php-meminfo-and-memory-leaks/ and installed the linked extension & despite some initial confusion was able to get it going in the context of MAMP.
- I then applied this patch and ran the address test class (update - I realise I need to find somewhere after the test class as they could still be removed during deconstruct for true leaks - but this would show excessive memory use - esp with dataproviders)
```
--- a/tests/phpunit/api/v3/AddressTest.php
+++ b/tests/phpunit/api/v3/AddressTest.php
@@ -53,6 +53,7 @@ class api_v3_AddressTest extends CiviUnitTestCase {
$this->contactDelete($this->_contactID);
$this->quickCleanup(['civicrm_address', 'civicrm_relationship']);
parent::tearDown();
+ meminfo_dump(fopen('/tmp/my_dump_file.json', 'w'));
}
```
- I analysed the file with the summary command
eileenmcnaughton@Eileens-MacBook-Pro analyzer % bin/analyzer summary /tmp/my_dump_file.json
![Screen_Shot_2020-09-29_at_3.56.50_PM](/uploads/9c5a1839fbd490a78b4ff55af872e584/Screen_Shot_2020-09-29_at_3.56.50_PM.png)
- This screen tells me there are instances of the above that are not cleaned up. I picked ``CRM_Core_DAO_LocationType ``` as it seemed the most leaky one that seemed somewhat straight forward
- I used the method from the instructions to find an instance id
bin/analyzer query -v -f "class=CRM_Core_DAO_LocationType" -f "is_root=0" /tmp/my_dump_file.json
![Screen_Shot_2020-09-29_at_4.02.33_PM](/uploads/56a926cb969bcf6bb613b0b582e50e93/Screen_Shot_2020-09-29_at_4.02.33_PM.png)
- I could determine which class was loading it bin/analyzer ref-path -v 0x1177b4380 /tmp/my_dump_file.json and it was just the AddressTest
![Screen_Shot_2020-09-29_at_4.45.09_PM](/uploads/b8d9e19c92b6daf2cd5d435304d04ead/Screen_Shot_2020-09-29_at_4.45.09_PM.png)
- And again (from the instructions) to find what it was interacting with
![Screen_Shot_2020-09-29_at_4.02.33_PM](/uploads/3de1030d4b884ca0f1c678109abb316a/Screen_Shot_2020-09-29_at_4.02.33_PM.png)
- In the interests of finding the circularity preventing the memory from being freed I went through each of the child objects & looked to see if they had dependencies - most had none but when I tried on ``` _query: 0x1177b4408 ```
I found it had 11 children
![Screen_Shot_2020-09-29_at_4.15.02_PM](/uploads/9b983cfdc55b0bcdca87ff403d2792ec/Screen_Shot_2020-09-29_at_4.15.02_PM.png)
I'm still working on figuring out what it's children are - but I do have a quick & easy fix for the specific instance & test since we only need to put the id, not the whole class, as an object on the AddressTest
- After applying https://github.com/civicrm/civicrm-core/pull/18632 I got a small improvement
![Screen_Shot_2020-09-29_at_4.31.15_PM](/uploads/a64320aafae14a7fccfaff6ce660ccb5/Screen_Shot_2020-09-29_at_4.31.15_PM.png)https://lab.civicrm.org/dev/core/-/issues/3395Separate out Search participant register form from backoffice form2024-01-14T05:03:27ZeileenSeparate out Search participant register form from backoffice formThe form you reach when selecting 'Register participant' from contact search is the same as participant edit or create for a single participant. This creates a few problems
1) AdditionalPayment form is extending the Task class purely to...The form you reach when selecting 'Register participant' from contact search is the same as participant edit or create for a single participant. This creates a few problems
1) AdditionalPayment form is extending the Task class purely to support this form
2) This form is calling CRM_Contact_Form_Task::preProcessCommon($this); - which is one of 2 places the static-ness of that function is locked in. By using a static method the expectations around the forms become much harder to track
3) Lots of hard-to-read if-else
Part of the reason for how it is I think is the focus on 'preProcess' as the action. Since that is often blocked using a different action seems to make sense allowing us to switch to $form->preProcessTask as the preferred method & extract out parts of that function (knowing they are accessible since $form is potentially 'any' form & is not restricted to an interface ). We could go down the interface path but that requires us to understand all the classes & methods & properties involved so it feels like an end goal rather than a step - how we re-wind the wool once unknotted)
![Screen_Shot_2020-09-16_at_4.11.12_PM](/uploads/562ff062b7de80d83fc30ffa4ab0bb11/Screen_Shot_2020-09-16_at_4.11.12_PM.png)https://lab.civicrm.org/dev/wordpress/-/issues/75Mailing List Subscription URL not using WP base page slug2020-09-29T07:28:37ZBorislavZlatanovMailing List Subscription URL not using WP base page slugEnvironment: CiviCRM 5.29.0, WordPress 5.4.2, PHP 7.3.20.
This issue started happening after an update of CiviCRM from 5.19 to 5.29: When subscribing to a mailing list, the confirmation link is missing a part, namely the WordPress CiviC...Environment: CiviCRM 5.29.0, WordPress 5.4.2, PHP 7.3.20.
This issue started happening after an update of CiviCRM from 5.19 to 5.29: When subscribing to a mailing list, the confirmation link is missing a part, namely the WordPress CiviCRM base page slug. The link is supposed to be:
https://example.org/civicrm?civiwp=CiviCRM&q=civicrm%2Fmailing%2Fconfirm&reset=1&cid=111111&sid=111&h=11111111111
and instead it is:
https://example.org/?civiwp=CiviCRM&q=civicrm%2Fmailing%2Fconfirm&reset=1&cid=111111&sid=111&h=11111111111
That is, it is missing the /civicrm part (which is the base page slug) after the domain name. This seems to lead to the CiviCRM Smarty template not being properly loaded. If I manually insert the /civicrm part in the link, then the template is loaded correctly.
The WordPress base page is correctly selected in Administer > System Settings > CMS Database Integration. The /civicrm part seems to be correctly appearing in the URL in other situations - in the links for tracking opens, tracking clicks, unsubscribing.
The piece of code generating the confirmation link seems to be in /civicrm/CRM/Mailing/Event/BAO/Subscribe.php, line 216:
```
$url = CRM_Utils_System::url('civicrm/mailing/confirm',
"reset=1&cid={$this->contact_id}&sid={$this->id}&h={$this->hash}",
TRUE, NULL, TRUE, TRUE
);
```
I don't know if this code is taking into consideration the WordPress base page or not, or if the page's slug is supposed to be added to the URL here or in some other place.
Any help appreciated. :)https://lab.civicrm.org/dev/core/-/issues/84Error when searching for Participants2018-04-28T07:22:36ZPradeep Nayakpradpnayak@gmail.comError when searching for Participantshttps://civicrm.stackexchange.com/questions/24671/error-when-searching-for-participants
It seems that there is regression because of https://github.com/civicrm/civicrm-core/pull/11706
Commenting line 4912(self::getGroupByFromOrderBy($g...https://civicrm.stackexchange.com/questions/24671/error-when-searching-for-participants
It seems that there is regression because of https://github.com/civicrm/civicrm-core/pull/11706
Commenting line 4912(self::getGroupByFromOrderBy($groupBy, $orderBys);) in CRM/Contact/BAO/Query.php seems to fix the issue.https://lab.civicrm.org/dev/core/-/issues/3570When creating a CiviMail it is possible to select this mailing as a "previous...2023-06-26T19:32:24ZlolcodeWhen creating a CiviMail it is possible to select this mailing as a "previous mailing" in the recipients listWhen creating a CiviMail it is possible to select this mailing as a "previous mailing" in the recipients list. I have not tested what it does but it makes no sense from a user point of view.
To reproduce just name the mailing and then o...When creating a CiviMail it is possible to select this mailing as a "previous mailing" in the recipients list. I have not tested what it does but it makes no sense from a user point of view.
To reproduce just name the mailing and then open the recipients list. In fact before the mailing is named it still shows in the list but with the name "null".
![bug-first-mailing](/uploads/ea99f69608bb75993b467f1e77795480/bug-first-mailing.jpg)
![null-mailing](/uploads/61df71ab974462ffded69b02aba4046f/null-mailing.jpg)https://lab.civicrm.org/dev/wordpress/-/issues/76REST delete Participant operation... get a WARNING message2023-12-06T16:39:30ZRTaglientoREST delete Participant operation... get a WARNING messageHi,
I am receiving a WANRNING message after an API-REST call via ajax.
The delete operation of a participant
.../wp-json/civicrm/v3/rest?entity=Participant&action=delete&api_key=...&key=..&json={"sequential":1,"id":711}
this is the ...Hi,
I am receiving a WANRNING message after an API-REST call via ajax.
The delete operation of a participant
.../wp-json/civicrm/v3/rest?entity=Participant&action=delete&api_key=...&key=..&json={"sequential":1,"id":711}
this is the response text:
> <br />
> <b>Warning</b>: array_reduce() expects parameter 1 to be array, int given in <b>C:\xampp\htdocs\civicenter\wp-content\plugins\civicrm\wp-rest\Controller\Rest.php</b> on line <b>147</b><br />
> {"is_error":0,"version":3,"count":1,"values":null}
it is only a WARNING and I catch only the final JSON object tail.
Regards Roberto.https://lab.civicrm.org/dev/core/-/issues/85mail() backend fails when empty Cc and Bcc parameters are passed2018-05-21T02:22:12Zmattwiremjw@mjwconsult.co.ukmail() backend fails when empty Cc and Bcc parameters are passedOn some servers the PHP mail() function fails to send email if empty 'Cc' or 'Bcc' headers are set.On some servers the PHP mail() function fails to send email if empty 'Cc' or 'Bcc' headers are set.5.3.0https://lab.civicrm.org/dev/core/-/issues/3639When using a smart group as a mailing, users whose state changes after the ma...2024-02-23T05:03:22ZrichardsplaygroundWhen using a smart group as a mailing, users whose state changes after the mailing is created but before the mailing is sent are not correctly countedCiviCRM 5.8.2 on Drupal 7.
When a mailing is created with a smart group and is scheduled to be sent in the future, user state changes between the time the mailing is created and the time it is sent do not get accounted for:
1. If a us...CiviCRM 5.8.2 on Drupal 7.
When a mailing is created with a smart group and is scheduled to be sent in the future, user state changes between the time the mailing is created and the time it is sent do not get accounted for:
1. If a user is added to the smart group in that period, they do not get the mailing.
2. If a user's private settings change (e.g. do not mail is checked) in that period, they receive the mailing anyway.
3. If a user is removed from the smart group in that period, they do get the mailing.
Problem 3 may be resolved by mail#28. Problem 2 is an edge case, albeit an important one. Problem 1 is a challenge for our organization, as we frequently pre-create marketing emails for our events months in advance during our slow periods, only to have them not reach newly added community members when they are finally sent.
Not more than a dabbler at development so cannot offer a PR. We would be willing to kick in some funding to have this resolved so that we can create marketing emails when we want, and have them reach all users in the smart group as per the group membership at the time of sending. (Within reason, does not have to be "real time" but the group membership as of an hour or so before sending is fine. Perhaps a cron job to update the mail job's recipient list would suffice?)https://lab.civicrm.org/dev/wordpress/-/issues/77Bug with WordPress CiviCRM 5.29.1 Shoreditch Theme 0.1-alpha35 CiviMail Modul...2020-10-19T23:20:43ZjohngehrigBug with WordPress CiviCRM 5.29.1 Shoreditch Theme 0.1-alpha35 CiviMail Module CSSFor CiviCRM WordPress sites with Shoreditch Theme, on the CiviMail Module "Mailings" > "Scheduled and Sent Mailings" page the "more" option appears HIDDEN from user following upgrade to CiviCRM 5.29.1 / Shoreditch 0.1-alpha35. Inspecting...For CiviCRM WordPress sites with Shoreditch Theme, on the CiviMail Module "Mailings" > "Scheduled and Sent Mailings" page the "more" option appears HIDDEN from user following upgrade to CiviCRM 5.29.1 / Shoreditch 0.1-alpha35. Inspecting the code shows the option is still present and user can still hover over the "more" option and click it, but otherwise visually it appears to be hidden.
Disabling the Shoreditch Theme Extension resolves the issue, so the CSS bug appears to have been introduced with the Shoreditch Theme 0.1-alpha35 released last month.
![10-8-2020_11-14-43_PM](/uploads/cf42a5a055821d7041846dcb30e7b0f5/10-8-2020_11-14-43_PM.png)https://lab.civicrm.org/dev/core/-/issues/86CIVICRM_MAIL_LOG_AND_SEND does not work properly2018-11-18T21:03:25Zmattwiremjw@mjwconsult.co.ukCIVICRM_MAIL_LOG_AND_SEND does not work properlyIn the packages/Mail it is mistyped as "CIVICRM_MAIL_LOG_AND SEND" (ie. missing an underscore): https://github.com/civicrm/civicrm-packages/pull/204
In CiviCRM core the administrator is not notified if it is set: https://github.com/civi...In the packages/Mail it is mistyped as "CIVICRM_MAIL_LOG_AND SEND" (ie. missing an underscore): https://github.com/civicrm/civicrm-packages/pull/204
In CiviCRM core the administrator is not notified if it is set: https://github.com/civicrm/civicrm-core/pull/12037
In the docs it is missing altogether: https://github.com/civicrm/civicrm-dev-docs/pull/5265.2.0https://lab.civicrm.org/dev/core/-/issues/3617Contribution tokens with option values display values, not label2022-06-11T14:57:01ZJonGoldContribution tokens with option values display values, not labelTo replicate on dmaster:
* Edit any contribution to add a value for the custom field *How long have you been a donor?*.
* With **Find Contributions**, search for that contribution and create either an email or thank-you letter.
* Use a t...To replicate on dmaster:
* Edit any contribution to add a value for the custom field *How long have you been a donor?*.
* With **Find Contributions**, search for that contribution and create either an email or thank-you letter.
* Use a token to display the value of *How long have you been a donor?*.
* Print/send.
### Expected result
The token should render the label of the selected option, e.g. "Less than 1 year", "1-3 years".
### Observed result
The token renders the value, e.g., "1", "2".
Contact tokens behave in the expected way.
Note: This is not, AFAICT, a regression. While I can't find other user reports on this, I also don't see any indication in the code that this ever was accounted for.JonGoldJonGoldhttps://lab.civicrm.org/dev/financial/-/issues/154Sales Tax not added to total when memberships include donations that are sepa...2024-02-27T01:17:44ZeileenSales Tax not added to total when memberships include donations that are separate transactionshttps://civicrm.stackexchange.com/questions/37923/sales-tax-not-added-to-total-when-memberships-include-donations-that-are-separathttps://civicrm.stackexchange.com/questions/37923/sales-tax-not-added-to-total-when-memberships-include-donations-that-are-separathttps://lab.civicrm.org/dev/wordpress/-/issues/78Fix undefined index warning that may prevent upgrades2020-10-12T12:00:21ZhaystackFix undefined index warning that may prevent upgradesAs reported on [StackExchange](https://civicrm.stackexchange.com/questions/37922/wordpress-civicrm-5-16-upgrade-to-5-30-issue-notice-undefined-index-query-i):
```
Notice: Undefined index query in .../wp-content/plugins/civicrm/civicrm.p...As reported on [StackExchange](https://civicrm.stackexchange.com/questions/37922/wordpress-civicrm-5-16-upgrade-to-5-30-issue-notice-undefined-index-query-i):
```
Notice: Undefined index query in .../wp-content/plugins/civicrm/civicrm.php on line 483
```
I haven't seen this happen in any of the upgrades I've done, but it can't hurt to check the array key exists before accessing it. PR to follow.haystackhaystackhttps://lab.civicrm.org/dev/core/-/issues/87PayPal Pro missing parameters (add standard getters)2022-08-10T05:03:38Zmattwiremjw@mjwconsult.co.ukPayPal Pro missing parameters (add standard getters)Overview
----------------------------------------
state_province, country and ip_address are not always set properly for paypal pro due to inconsistency with parameters being passed.
https://github.com/civicrm/civicrm-core/pull/12038
Be...Overview
----------------------------------------
state_province, country and ip_address are not always set properly for paypal pro due to inconsistency with parameters being passed.
https://github.com/civicrm/civicrm-core/pull/12038
Before
----------------------------------------
state_province, country and ip_address may not be passed to payment processor.
After
----------------------------------------
This applies to ALL payment processors:
* If state_province and country were passed from the payment form in one way or another, they will be presented in a consistent format to the payment processor.
* Add client ip_address to the list of parameters so payment processors don't have to retrieve this manually if they require it (paypal pro wants it but was not retrieving it).
Technical Details
----------------------------------------
This PR adds three generic "getters" to CRM_Core_Payment per @eileenmcnaughton suggestion. For compatibility, no parameters are removed but additional parameters may be set depending on what is passed in. For example if only country_id is defined, then country will be set as well.
Comments
----------------------------------------
This fixes a real issue identified with the paypal pro processor in core, but the inconsistency of parameters passed affects other processors and means each processor has to do extra coding to make sure that the parameters are in the right format when they are passed in.
See for example: https://civicrm.stackexchange.com/questions/24316/paypal-pro-billing-address-state-province-country-not-being-passed