Development issueshttps://lab.civicrm.org/groups/dev/-/issues2021-06-08T23:58:40Zhttps://lab.civicrm.org/dev/core/-/issues/2637Could not find a valid session key appearing on Paypal transactions2021-06-08T23:58:40ZandrewcormickdockeryCould not find a valid session key appearing on Paypal transactionsOverview
----------------------------------------
We are experiencing a problem similar to that reported in https://lab.civicrm.org/dev/core/-/issues/1997 , except we're using Civi 5.35.2 and Drupal 7.80. When returning from Paypal afte...Overview
----------------------------------------
We are experiencing a problem similar to that reported in https://lab.civicrm.org/dev/core/-/issues/1997 , except we're using Civi 5.35.2 and Drupal 7.80. When returning from Paypal after a contribution payment (user presses the "Return to seller" button), the "Could not find a valid session key" error appears. The transaction is completed successfully in both Paypal and CiviCRM. The only problem is that the thank you page is not displayed appropriately.
![image](/uploads/e1c15057e192b7ba5e79c28675eb9cbc/image.png)
Reproduction steps
----------------------------------------
1. Complete a donation page using PayPal Standard
1. Click continue
1. Go To PayPal
1. Make payment
1. In Paypal, press the "Return to seller" button
Current behaviour
----------------------------------------
Error appears as described
Expected behaviour
----------------------------------------
Thank you page should be displayed to user
Environment information
----------------------------------------
* __Browser:__ _Chrome 91.0.4472.77_
* __CiviCRM:__ _5.35.2_
* __PHP:__ _7.3.28-1+0~20210503.84+debian9~1.gbp6819da_
* __CMS:__ _Drupal 7.80_
* __Database:__ _MariaDB 10.4.13_https://lab.civicrm.org/dev/financial/-/issues/175Can't remove previously-added currencies2021-07-01T18:10:13Zmegaphonetech-dennisCan't remove previously-added currenciesOverview
----------------------------------------
When I remove previously-added currencies from the list of available currencies under *Language and Currency* and hit the **Save** button, the currencies are still listed among the avail...Overview
----------------------------------------
When I remove previously-added currencies from the list of available currencies under *Language and Currency* and hit the **Save** button, the currencies are still listed among the available currencies when I return to that page.
Reproduction steps
----------------------------------------
1. Go to **Administer** >> **Localization** >> **Languages, Currency, Locations**
1. Next to *Available Currencies* add some currencies. I used CLP and TWD. Click on the **Save** button located at the bottom of the page.
1. Return to **Administer** >> **Localization** >> **Languages, Currency, Locations**
1. Next to *Available Currencies* remove previously-added currencies, and click on the **Save** button located at the bottom of the page.
1. Return to **Administer** >> **Localization** >> **Languages, Currency, Locations** and find those currencies still listed next to *Available Currencies*.
Current behaviour
----------------------------------------
There are no error messages or any indication that something has gone wrong.
Expected behaviour
----------------------------------------
I expected the currencies I removed from this page to no longer be listed as *Available Currencies* when I returned to this page.
Environment information
----------------------------------------
Replicable on the demo server.https://lab.civicrm.org/dev/translation/-/issues/69"On behalf of" and "in honor of" labels disappear when multilingual is enabled2021-07-27T13:36:29ZJonGold"On behalf of" and "in honor of" labels disappear when multilingual is enabledThis is related to #27 but is a separate issue. To replicate:
* Create a contribution page that allows giving on behalf of an organization.
* Load the contribution page, note the label on the new checkbox.
* Enable multilingual support....This is related to #27 but is a separate issue. To replicate:
* Create a contribution page that allows giving on behalf of an organization.
* Load the contribution page, note the label on the new checkbox.
* Enable multilingual support.
* Reload the contribution page. Note that the label is missing.
This is inconsistent with other l10n behavior, where the default language is the fallback. I propose that the behavior match on these fields.5.41.0JonGoldJonGoldhttps://lab.civicrm.org/dev/financial/-/issues/174Partial payment records amount of full contribution disrupting balance2023-06-16T09:36:40Zmagnolia61Partial payment records amount of full contribution disrupting balanceIn https://lab.civicrm.org/dev/financial/-/issues/173 the user dashboard pay now button was enabled for partially paid contributions. When I first tested this it looked fine, as the proper remaining amount was charged for the additional ...In https://lab.civicrm.org/dev/financial/-/issues/173 the user dashboard pay now button was enabled for partially paid contributions. When I first tested this it looked fine, as the proper remaining amount was charged for the additional payment.
On further testing I noticed that it was not recorded properly. Situation was like this:
Contribution Amount = 155
Initial payment = 55
Amount Due = 100
Via the User Dashboard Pay Now button the remaining 100 is paid.
The contribution status is now completed.
But the payment transaction is recorded as being the full 155.
So Civi thinks too much has been paid.
![Screenshot_2021-06-02_Dashboard_-_Testdeel_contribution_Gedeeltelijk_Stichting_Onvergetelijke_Zomerkampen](/uploads/aafe9f5a09dd4a57a4ad39042cf5148d/Screenshot_2021-06-02_Dashboard_-_Testdeel_contribution_Gedeeltelijk_Stichting_Onvergetelijke_Zomerkampen.png)
![Screenshot_2021-06-02_Online_betalen_Stichting_Onvergetelijke_Zomerkampen](/uploads/1905ada9754fb2414871da4197ec45c6/Screenshot_2021-06-02_Online_betalen_Stichting_Onvergetelijke_Zomerkampen.png)
![Screenshot_2021-06-02_Testdeel_contribution_Gedeeltelijk_Stichting_Onvergetelijke_Zomerkampen](/uploads/b5501ee9d40fd6ae41f1a1ae1692bf6c/Screenshot_2021-06-02_Testdeel_contribution_Gedeeltelijk_Stichting_Onvergetelijke_Zomerkampen.png)
The second payment should have been recorded as 100 euro, but is listed as the full contribution amount
![Screenshot_2021-06-02_Testdeel_contribution_Gedeeltelijk_Stichting_Onvergetelijke_Zomerkampen-balance](/uploads/9fbebc447f2cfe1b00dd6d4c9040fc33/Screenshot_2021-06-02_Testdeel_contribution_Gedeeltelijk_Stichting_Onvergetelijke_Zomerkampen-balance.png)https://lab.civicrm.org/dev/core/-/issues/2636AuthX extension: user_load() deprecated in Drupal 8.x.2021-06-04T00:46:50ZfsnetAuthX extension: user_load() deprecated in Drupal 8.x.Overview
----------------------------------------
The AuthX extension is not usable with Drupal 9 since user_load() is deprecated in Drupal 8.x and removed in 9.x.
Reproduction steps
----------------------------------------
1. Enable Au...Overview
----------------------------------------
The AuthX extension is not usable with Drupal 9 since user_load() is deprecated in Drupal 8.x and removed in 9.x.
Reproduction steps
----------------------------------------
1. Enable AuthX extension.
2. Send HTTP request with username/password .
Current behaviour
----------------------------------------
Fails with
```
Error: Call to undefined function Civi\Authx\user_load() in Civi\Authx\Drupal8->loginStateless()
```
Expected behaviour
----------------------------------------
User is loaded without errors.
Environment information
----------------------------------------
* __CiviCRM:__ _5.37.2_
* __CMS:__ _Drupal 9.1.9_
Comments
----------------------------------------
user_load() needs to be replaced with \Drupal\user\Entity\User::load().5.39.0https://lab.civicrm.org/dev/wordpress/-/issues/101CiviCRM internal AJAX path ( q=civicrm/ajax/* ) should set wp_doing_ajax - Gr...2023-12-06T17:05:07ZFrancis (Agileware)CiviCRM internal AJAX path ( q=civicrm/ajax/* ) should set wp_doing_ajax - Gravity Forms 2.5.3+ breaks MailingsCiviCRM version: 5.37.2
Today ran into an issue on a few client sites where a Gravity Forms update to version 2.5.3+ would cause Mailings to not be loaded.
The cause for this was that a new filter in Gravity Forms would inject a `<scri...CiviCRM version: 5.37.2
Today ran into an issue on a few client sites where a Gravity Forms update to version 2.5.3+ would cause Mailings to not be loaded.
The cause for this was that a new filter in Gravity Forms would inject a `<script>` tag immediately after the `<head>` tag that appears in the `body_html` JSON field from `Mailing.getSingle` API calls, with no escaping - which then breaks the JSON parser.
Note that this uses the internal `civicrm/ajax` path and thus doesn't go through the WP Rest interface.
Gravity Forms checks the `DOING_AJAX` constant before performing this injection, so the workaround was to add a hook_civicrm_config implementation that would `define('DOING_AJAX', true)` if the `q` parameter starts with `civicrm/ajax`
Would be preferable if this was done something during the initialisation of the CiviCRM WordPress plugin itself, for both admin and front-end paths.
There *is* a filter `wp_doing_ajax`, which defaults to `DOING_AJAX`, however it's worth noting that Gravity Forms *does not use the interface to this filter*, but the `DOING_AJAX` constant itself, so in this case it would be better to define `DOING_AJAX` as well.https://lab.civicrm.org/dev/core/-/issues/2634Membership api for v42021-08-25T22:27:29ZeileenMembership api for v4Apiv4 doesn't have a membership api yet - mostly because of issues with the membership.create process.
I caught up with @kcristiano this week & we fleshed out what the 3 issues are
1) Membership api does financial stuff including creat...Apiv4 doesn't have a membership api yet - mostly because of issues with the membership.create process.
I caught up with @kcristiano this week & we fleshed out what the 3 issues are
1) Membership api does financial stuff including creating line items and in some cases creating contribution. I worked through getting rid of one of these bits of magic, converting the back office form to use Order api when setting up a new recurring membership. Getting review on this was slow going so it will take a long time to convert other places. (I have started on the batch membership form & Kevin is going to help with review there).
However, I made a proposal that Kevin agreed with that we simply don't touch ANY of that financial stuff if $params['version'] === 4. The idea is that the handling (which may or may not be right) for apiv3 and for those calls that still call the BAO directly will be unchanged but for v4 callers need to either
a) call the order api (which we will fix to call the v4 membership api internally) or
b) create their own line items. Note that memberships without contributions actually should have line items according to the model.
I will work on this once we have fixed some issues with the order api's integrity - https://github.com/civicrm/civicrm-core/pull/20656 is the most obvious but the intent is to get the extra cover that deprecating our random magic will provide https://github.com/civicrm/civicrm-core/pull/20678 too. (This is not a big piece of work but it requires fairly experienced review )
2) Membership date handling for new memberships is in the v3 api (and the form layer). I did a patch for this. https://github.com/civicrm/civicrm-core/pull/20759 -
3) Membership date handling for renewals. Apiv3 has some magic around this that is not in the BAO. I have come to the conclusion we can handle this by
-- using the Order->payment flow. In other words the dates are calculated at the point when Payment.create is added, using the membership_num_terms as stored in https://github.com/civicrm/civicrm-core/pull/20672
-- OR - if that flow won't work for people for any reason, they can pass in all the date values.5.42.0https://lab.civicrm.org/dev/core/-/issues/2633Cannot remove Group Organisation selection in multisite setup2023-12-10T05:03:31ZMonish DebCannot remove Group Organisation selection in multisite setupSteps to replicate:
1. Go to any existing or create new group.
2. Select 'Organization' from the drop down and save.
3. Go the setting page of the group and unselect the organisation.
Result:
Revisit the edit form and you will find ...Steps to replicate:
1. Go to any existing or create new group.
2. Select 'Organization' from the drop down and save.
3. Go the setting page of the group and unselect the organisation.
Result:
Revisit the edit form and you will find that the organisation selection is not removed.Monish DebMonish Debhttps://lab.civicrm.org/dev/wordpress/-/issues/100Unable to make CiviCRM work on WordPress with XAMPP2021-06-08T14:59:35ZJayUnable to make CiviCRM work on WordPress with XAMPPHello,
I am working on a WP Plugin which relies on CiviCRM. Unfortunately I have only been able to get Civi to work under Linux and not under Windows with XAMPP.
After configuring everything I get an endless loop of notices until I run...Hello,
I am working on a WP Plugin which relies on CiviCRM. Unfortunately I have only been able to get Civi to work under Linux and not under Windows with XAMPP.
After configuring everything I get an endless loop of notices until I run out of memory:
```log
[26-May-2021 07:17:49 UTC] PHP Notice: Undefined property: CRM_Core_Config::$extensionsDir in C:\xampp\htdocs\jay\waehlbar2021\wp-content\plugins\civicrm\civicrm\CRM\Extension\System.php on line 84
[26-May-2021 07:17:49 UTC] PHP Notice: Undefined property: CRM_Core_Config::$extensionsURL in C:\xampp\htdocs\jay\waehlbar2021\wp-content\plugins\civicrm\civicrm\CRM\Extension\System.php on line 85
[26-May-2021 07:17:49 UTC] PHP Notice: Undefined property: CRM_Core_Config::$uploadDir in C:\xampp\htdocs\jay\waehlbar2021\wp-content\plugins\civicrm\civicrm\CRM\Extension\System.php on line 87
```
#89 seems to be related to this. I feel like under XAMPP the config/`civicrm.settings.php` is not read properly.https://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/2631Secondary recipient email body is blank when sent using "Find Contribution"2023-08-18T05:03:27ZtapashSecondary recipient email body is blank when sent using "Find Contribution"Overview
----------------------------------------
Secondary recipient email body is blank when sent using "Find Contribution"
Reproduction steps
----------------------------------------
1. Click on **Find Contribution -> enter a contact...Overview
----------------------------------------
Secondary recipient email body is blank when sent using "Find Contribution"
Reproduction steps
----------------------------------------
1. Click on **Find Contribution -> enter a contact name -> click search **.
2. Select 1 contact (contribution) from the list -> select "Email send now to 50 or less" from action menu
3. Email popup window opens. -> in the TO field add a second recipient -> Select a template or add text in body
4. Send
Current behaviour
----------------------------------------
- First recipient that was selected from find contribution list receives the email with body, subject & attachment (if any)
- Second recipient who was added later receives a blank email with no body or subject. If any attachment were added, that gets added though.
Expected behaviour
----------------------------------------
Second recipient who was added later should also receive the same email as the first recipient.
Environment information
----------------------------------------
* __Browser:__ safari 13
* __CiviCRM: 5.37.2
* __PHP: 7.3
* __CMS: Drupal 7.x
* __Database:__ _MySQL 5.7.7
* __Web Server:__ _Apache 2.4/https://lab.civicrm.org/dev/core/-/issues/2630Improve performance of queries in CRM_Contact_Form_Search_Custom_Base2023-02-06T04:12:42ZErikHommelImprove performance of queries in CRM_Contact_Form_Search_Custom_BaseSee this SE post: https://civicrm.stackexchange.com/questions/39636/slow-query-fixes-msp-custom-searches
It might be worth implementing the suggested improvements?See this SE post: https://civicrm.stackexchange.com/questions/39636/slow-query-fixes-msp-custom-searches
It might be worth implementing the suggested improvements?https://lab.civicrm.org/dev/core/-/issues/2629Participant Status: pending refund can have two conflicting meanings2024-01-17T05:03:29Zmagnolia61Participant Status: pending refund can have two conflicting meaningsOverview
----------------------------------------
With partial payments and partial refunds becoming mainstream in CiviCRM, I think it is time to reconsider the connection between contribution status and participant status. I think there...Overview
----------------------------------------
With partial payments and partial refunds becoming mainstream in CiviCRM, I think it is time to reconsider the connection between contribution status and participant status. I think there are more than one aspects of this, but I will focus on 'pending refund'
Example use-cases
----------------------------------------
1. change the payment or price-set to make a partial refund necessary
2. cancel the participant to make a (partial) refund necessary
Current behaviour
----------------------------------------
Currently a participant status: Pending Refund defaults as a positive count.
But there are two scenario's that can cause this participant status:
1. there is a contribution total that is higher than the total event fee amount
2. there has been a cancellation for the event and the fee is pending to be refunded
In scenario 1: The participant is still expected to attend the event
In scenario 2: The participant will not attend the event
Proposed behaviour
----------------------------------------
I think it is becoming troublesome to relate the contribution status with the event status.
The default is that 'Pending refund' counts positive towards attendance.
Two proposals could be
a) to remove participant statuses connected with the contribution
- may cause other difficulties, might me the best in the long end
b) to add a new status and to differentiate between two types of pending refund scenarios:
- Pending refund (cancelled)
- Pending refund (attending)
First one would have count status 0, second one count status 1
Comments
----------------------------------------
Any thoughts on this one? Can I find agreement on this proposal?https://lab.civicrm.org/dev/core/-/issues/2628Contribution Detail Report Select County2023-08-15T05:03:14ZandyburnsContribution Detail Report Select CountyThis report `CRM_Report_Form_Contribute_Detail`, and any reports based on it, have the order of Country, State, County wrong. It allows you to select the County first, then State, then Country. e.g. There are 12 entries for Douglas Count...This report `CRM_Report_Form_Contribute_Detail`, and any reports based on it, have the order of Country, State, County wrong. It allows you to select the County first, then State, then Country. e.g. There are 12 entries for Douglas County in Colorado, USA, and choosing the wrong one returns no donations. The order of these fields needs to be reversed, so that only the counties in the selected state are shown and this would match how Advanced Search works.
![image](/uploads/c3a5ae49d598a698df9d6423298decba/image.png)
Revised order:
1. Country
1. State/Province
1. Countyhttps://lab.civicrm.org/dev/financial/-/issues/173"Pay Now" button on user dashboard is only for Pending, not Partially Paid co...2021-06-02T10:08:33ZJonGold"Pay Now" button on user dashboard is only for Pending, not Partially Paid contributions### Steps to replicate:
* Install Line Item Editor.
* Create a completed contribution.
* Use line item editor to increase the amount of the contribution, so the status changes to "Partially Paid".
* (Optional) For comparison, create a Pe...### Steps to replicate:
* Install Line Item Editor.
* Create a completed contribution.
* Use line item editor to increase the amount of the contribution, so the status changes to "Partially Paid".
* (Optional) For comparison, create a Pending contribution.
* Enable Tax and Invoicing in CiviContribute Settings.
* Visit the user dashboard.
### Expected Result
Both the "Pending" and "Partially Paid" contributions will have a "Pay Now" button next to them.
### Actual Result
Only the "Pending" contribution has a "Pay Now" button.
This was so quick to fix that I thought at first it might be intentional, but I really think it's just one of those places where partial payments are still a bit rough around the edges. Partially paid invoices are functional, so I think it's just adding a button that links to existing functionality.
I see that #14051 by @eileen covered this, and @magnolia61 requested it cover "Partially Paid" invoices as well, so I imagine that if anyone knows a reason why this PR should not be wed to core, it's them, and they'll speak up now.5.39.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/2625Adding recurring contributions in the backend of CiviCRM2021-09-22T14:32:30ZjaapjansmaAdding recurring contributions in the backend of CiviCRMCurrently there is a page to view a recurring contribution.
However a form is missing for adding new recurring contributions from the backend. Nor is it possible to edit existing recurring contributions.
See below a sketch of the chang...Currently there is a page to view a recurring contribution.
However a form is missing for adding new recurring contributions from the backend. Nor is it possible to edit existing recurring contributions.
See below a sketch of the changes on the tab Recurring Contributions on the contact summary.
![Screenshot_20210520_213037](/uploads/f04570f2d1896c00e70ad10718ed777d/Screenshot_20210520_213037.png)
Those buttons lead to a form where one can either enter a new recurring contribution, or edit an existing one.
**Solution**
1. Add a form for adding and editing the recurring contribution. I do think the form for add and edit could be the same.
2. Add the necessary buttons on the recurring contribution tab
**Funding**
I have funding to work on this so a PR might follow soon.jaapjansmajaapjansmahttps://lab.civicrm.org/dev/core/-/issues/2624Line items not visible on recurring contribution2021-07-28T14:48:48ZjaapjansmaLine items not visible on recurring contributionWhen creating a new contribution recur with a contribution page and a price set with multiple line items. The line items are not stored within the contribution recur entity.
**Steps to reproduce**
1. Create a new price set (Financial t...When creating a new contribution recur with a contribution page and a price set with multiple line items. The line items are not stored within the contribution recur entity.
**Steps to reproduce**
1. Create a new price set (Financial type donation)
2. Create a price set field (Financial type Campaign donation)
3. Create a second price set field (Financial type Products)
4. Create a contribution page:
Financial type: donation
Amounts tab: Payment Processor: test processor
Amounts tab: Contributions amount section enabled: checked
Amounts tab: Price set: _select the created price set_
Amounts tab: Recurring contributions: check
5. Create a new contribution recur through the contribution page
6. Lookup the contribution recur on the Contact Summary
**Expected result**
Showing the line items. The total amount is correct.
**Actual result**
Line items are not visible at the contribution recur.
Below a screenshot of the contribution
![Screenshot_20210520_211830](/uploads/2447b95df431002e4405559a72fec4b5/Screenshot_20210520_211830.png)
And of the recurring contribution
![Screenshot_20210520_211918](/uploads/4036a932904649bbaa7c0d93b13879fb/Screenshot_20210520_211918.png)
**Possible solution**
I have looked up the line items in the database and there are no line items linked to the recurring contribution.
So the possible solution would exists of two steps:
1. Connect the line items to contribution recur
2. Make the line items visible in a similar way as on the contribution.
**Remarks**
Creating a new contribution with the `contribution.repeattransaction` api based on the first contribution and the recurring contribution correctly creates the line items at the contribution level.
**Funding**
I have some funding to work on this. So PR's might follow soon.
**PRs**
* ~~Fix for saving line items at the recurring contribution: https://github.com/civicrm/civicrm-core/pull/20398~~
* Fix for showing the line items from the template contribution: https://github.com/civicrm/civicrm-core/pull/20399
* Fix for excluding template contributions from reports: https://github.com/civicrm/civicrm-core/pull/20450
* Fix for searching template contributions: https://github.com/civicrm/civicrm-core/pull/20451
* Fix for excluding template contributions on the contact summary tab: https://github.com/civicrm/civicrm-core/pull/20452
* Fix for adding a button view template on the recurring contributions tab: https://github.com/civicrm/civicrm-core/pull/20685
* ~~Fix for creation of template contributions: https://github.com/civicrm/civicrm-core/pull/20453~~
**To do**
* Update user documentation
* Make sure an upgrade path exists
See also financial#65.41.0jaapjansmajaapjansmahttps://lab.civicrm.org/dev/core/-/issues/2623Upgrade 5.33.4 to 5.33.5, unable to view groups in Manage Groups or view mail...2021-05-24T11:39:10ZmattUpgrade 5.33.4 to 5.33.5, unable to view groups in Manage Groups or view mailings, activities or relationships in respective contact tabsOverview
----------------------------------------
After upgrading from 5.33.4 to 5.33.5, unable to view groups in Manage Groups or view mailings, activities or relationships in respective contact tabs.
Reproduction steps
---------------...Overview
----------------------------------------
After upgrading from 5.33.4 to 5.33.5, unable to view groups in Manage Groups or view mailings, activities or relationships in respective contact tabs.
Reproduction steps
----------------------------------------
1. Click on **Contacts -> Manage Groups** or
1. Open a contacts summary and click on **Mailings**, **Activities** or **Relationships**.
Current behaviour
----------------------------------------
All displays mentioned are empty of results. Contact Activities tab displays following error in browser console.
```
XHRGET.../civicrm/ajax/contactactivity?snippet=4&context=activity&cid=2&draw=1&columns%5B0%5D%5Bdata%5D=activity_type&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=true&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=subject&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=true&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B2%5D%5Bdata%5D=source_contact_name&columns%5B2%5D%5Bname%5D=&columns%5B2%5D%5Bsearchable%5D=true&columns%5B2%5D%5Borderable%5D=true&columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B3%5D%5Bdata%5D=target_contact_name&columns%5B3%5D%5Bname%5D=&columns%5B3%5D%5Bsearchable%5D=true&columns%5B3%5D%5Borderable%5D=false&columns%5B3%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B3%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B4%5D%5Bdata%5D=assignee_contact_name&columns%5B4%5D%5Bname%5D=&columns%5B4%5D%5Bsearchable%5D=true&columns%5B4%5D%5Borderable%5D=false&columns%5B4%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B4%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B5%5D%5Bdata%5D=activity_date_time&columns%5B5%5D%5Bname%5D=&columns%5B5%5D%5Bsearchable%5D=true&columns%5B5%5D%5Borderable%5D=true&columns%5B5%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B5%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B6%5D%5Bdata%5D=status_id&columns%5B6%5D%5Bname%5D=&columns%5B6%5D%5Bsearchable%5D=true&columns%5B6%5D%5Borderable%5D=true&columns%5B6%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B6%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B7%5D%5Bdata%5D=links&columns%5B7%5D%5Bname%5D=&columns%5B7%5D%5Bsearchable%5D=true&columns%5B7%5D%5Borderable%5D=false&columns%5B7%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B7%5D%5Bsearch%5D%5Bregex%5D=false&start=0&length=25&search%5Bvalue%5D=&search%5Bregex%5D=false&activity_type_id=&activity_type_exclude_id=&activity_date_time_relative=&activity_date_time_low=&activity_date_time_high=&activity_status_id=&_=1621483697855
Uncaught TypeError: json is null
<anonymous> .../sites/default/files/js/js_VksT9VyUPqN12it0nB53nHNlLsFmhtLUGWGK2iQcxvM.js line 14 > eval:20
dispatch .../sites/default/files/js/js_VksT9VyUPqN12it0nB53nHNlLsFmhtLUGWGK2iQcxvM.js:15
handle .../sites/default/files/js/js_VksT9VyUPqN12it0nB53nHNlLsFmhtLUGWGK2iQcxvM.js:15
trigger .../sites/default/files/js/js_VksT9VyUPqN12it0nB53nHNlLsFmhtLUGWGK2iQcxvM.js:15
trigger .../sites/default/files/js/js_VksT9VyUPqN12it0nB53nHNlLsFmhtLUGWGK2iQcxvM.js:15
each .../sites/default/files/js/js_VksT9VyUPqN12it0nB53nHNlLsFmhtLUGWGK2iQcxvM.js:14
each .../sites/default/files/js/js_VksT9VyUPqN12it0nB53nHNlLsFmhtLUGWGK2iQcxvM.js:14
js_VksT9VyUPqN12it0nB53nHNlLsFmhtLUGWGK2iQcxvM.js line 14 > eval:20:31
```
Environment information
----------------------------------------
* __Browser:__ Firefox 88.0.1 (64-bit)
* __CiviCRM:__ 5.33.4 to 5.33.5
* __PHP:__ 7.3.28
* __CMS:__ Drupal 7.80
* __Database:__ MySQL 5.6.51-91.0
* __Web Server:__ Nginx 1.20.0https://lab.civicrm.org/dev/core/-/issues/2622APiv4 does not handled display name when only email is provided2021-05-27T22:27:30ZeileenAPiv4 does not handled display name when only email is providedDemonstrated in the test https://github.com/civicrm/civicrm-core/pull/18865
Options are
1) accept that it's OK to pass 'email' to contact.create bao even though it is not a 'contact field' or
2) do an extra check on every primary email...Demonstrated in the test https://github.com/civicrm/civicrm-core/pull/18865
Options are
1) accept that it's OK to pass 'email' to contact.create bao even though it is not a 'contact field' or
2) do an extra check on every primary email save - note that historically parsing the smarty greeting tpl for the display name is expensive so we'd need to only set if empty.
I'm on the fence about the performance of 2 - most of our db locks these days are actually db insert locks on the email table for some reason (now that we have eliminated the acl related locks)
@colemanw - but to gitlab as promisedhttps://lab.civicrm.org/dev/core/-/issues/2621APIv4, setCheckPermissions FALSE is required to get listing of Events for Ano...2021-06-07T03:17:08Zjustinfreeman (Agileware)APIv4, setCheckPermissions FALSE is required to get listing of Events for Anonymous usersAPIv4, setCheckPermissions FALSE is required to get listing of Events for Anonymous users, despite Anonymous having access to Events. The same type of call using APIv3 works without error.
Tested using a standard CiviCRM 5.37.2 install ...APIv4, setCheckPermissions FALSE is required to get listing of Events for Anonymous users, despite Anonymous having access to Events. The same type of call using APIv3 works without error.
Tested using a standard CiviCRM 5.37.2 install on WordPress. The same site allows Anonymous access to the CiviCRM event listing page, /civicrm/event/list/?reset=1
Here's example code which will return a **403 unauthorised error** for anonymous users.
```
$results = \Civi\Api4\Event::get()
->addSelect('id', 'title', 'start_date', 'end_date', 'event_tz', 'event_type_id', 'is_online_registration')
->addWhere('start_date', '>=', 'today')
->addWhere('is_public', '=', TRUE)
->addWhere('is_active', '=', TRUE)
->addOrderBy('start_date', 'ASC');
```
However, this code will work for anonymous users.
```
$results = \Civi\Api4\Event::get()
->addSelect('id', 'title', 'start_date', 'end_date', 'event_tz', 'event_type_id', 'is_online_registration')
->addWhere('start_date', '>=', 'today')
->addWhere('is_public', '=', TRUE)
->addWhere('is_active', '=', TRUE)
->addOrderBy('start_date', 'ASC')
->setCheckPermissions(FALSE);
```
**It's not clear why setCheckPermissions would be required at all for this type of API call.**
Agileware Ref: CIVICRM-1764