Layout Builder error with 'Exception Day'

Created on 14 October 2022, about 2 years ago
Updated 4 September 2023, about 1 year ago

Problem/Motivation

When we configure the field via Layout Builder we receive the following error:
Notice: Trying to access array offset on value of type null in office_hours_exceptions_preprocess_field() (line 37 of modules/contrib/office_hours/office_hours.theme.exceptions.inc).
And also some settings won't apply.
It means that office_hours_exceptions_preprocess_field() doesn't support layout builder, becaue the content view mode stores in the '#third_party_settings' in this case.

Steps to reproduce

1. Add office_hours field to the content
2. Enable Layout Builder for full view
3. Configure view mode (Manage Layout button)
4. Add a new field as a block to the page
5. Save changes.
6. Check the view mode.

Proposed resolution

Try to retrieve view mode from '#third_party_settings' first.

πŸ› Bug report
Status

Fixed

Version

1.7

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine HitchShock Ukraine

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