Requesting /bat_api/rest/calendar-events returns HTTP 500:

Error: Call to undefined method Drupal\bat_event\Entity\EventType::usesStates()
in EventsRestResource->get() (line 196)

usesStates() does not exist on EventType. The correct method is
getFixedEventStates(), already used later in the same method.

Fix:

- $store_constant = $this->eventType->usesStates()
+ $store_constant = $bat_event_type->getFixedEventStates()
? DrupalDBStore::BAT_STATE
: DrupalDBStore::BAT_EVENT;

Comments

afagioli created an issue. See original summary.

  • afagioli committed a4a7ec00 on 11.1.x
    Issue #3636429: Fix fatal usesStates() on EventType
    
afagioli’s picture

Status: Active » Needs review
afagioli’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

afagioli’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.