Membership dashboard is not shown
Overview
When clicking on Memberships --> Dashboard the screen shows an error
Reproduction steps
- Make sure you don't have Civi Contribute enabled
- Click on Memberships --> Dashboard
Current behaviour
The page won't load. See below the error message in a screenshot
Expected behaviour
Page is shown.
Environment information
- CiviCRM: 5.71
- PHP: 8.1
- CMS: Drupal 7
Comments
Work around is to enable Civi Contribute.
Proposed solutions:
This should be solved at two places:
-
In
CRM\Membership\BAO\Membership.php
in the functionisSubscriptionCancelled
check if CiviContribute is enabled (see https://github.com/civicrm/civicrm-core/blob/master/CRM/Member/BAO/Membership.php#L1657) See this PR: https://github.com/civicrm/civicrm-core/pull/29882 -
In
Civi\Api4\Service\Spec\SpecGatherer
in the functiongetAllFields
a check whether$entity
is not empty. (See https://github.com/civicrm/civicrm-core/blob/master/Civi/Api4/Service/Spec/SpecGatherer.php#L61) See this PR: https://github.com/civicrm/civicrm-core/pull/29883