D10 settings are not getting attached to JS when alerts are disabled

Created on 11 March 2024, 4 months ago

Problem/Motivation

D10 settings are not getting attached to JS when all alerts are disabled.
Error is: Uncaught TypeError: Cannot read properties of undefined (reading 'workaround_needed')

Steps to reproduce

I have several disabled site alerts.
When I create a landing page and set it to unpublished on the view page I see this error in the console:
Uncaught TypeError: Cannot read properties of undefined (reading 'workaround_needed')

Proposed resolution

Add a check in site_alert.js to ensure that drupalSettings exists and that drupalSettings.siteAlert exits before attempting to access properties.

πŸ› Bug report
Status

Needs review

Version

1.3

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States wstocker

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

Comments & Activities

Production build 0.69.0 2024