Preprocessing of Event checks for reference improperly

Created on 3 May 2022, over 2 years ago
Updated 1 November 2023, about 1 year ago

Problem/Motivation

If an event of a type that can reference a meeting, but the event does not have one, WSOD occurs.

Steps to reproduce

Given event type meeting_calendar_event with an entity_reference type field field_meeting (referencing a live_meeting content type in my example). This field_meeting is not required.
Create a meeting_calendar_event, but do not provide a reference.
Attempt to view the new event (wsod)

Proposed resolution

opigno_calendar_event.module, in template_preprocess_opigno_calendar_event, line 267 checks for "empty", but there is always a non-empty in the reference field. Using $event->field_meeting->isEmpty() works here.

Remaining tasks

submit patch.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

πŸ› Bug report
Status

Needs review

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Nels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024