Paragraph library not loaded when used in DMB Notification

Created on 26 June 2023, 12 months ago

Problem/Motivation

Not sure if this is a bug or Ive missed some configuration somewhere but the problem Im encountering is that when I add paragraph content to a dmb notification, the library (css/js) that is associated with that paragraph is not getting loaded and thus the notification is not styled per the paragraph being used.

However, if I add the same paragraph to the content type of the page being viewed, it loads the library as expected, and now the styling is applied to the notification.

Ive attached a screenshot to help illustrate.

Steps to reproduce

Create a paragraph and assign a library with css file to it. Use paragraph in dmb notifcation. Library expected to load but is not.

Explanation of current setup

Ive created a new paragraph called "notification-bar". The template attaches library like

{{ attach_library('mytheme/notification-bar') }}

The theme library is like:

notification-bar:
  css:
    component:
      public/css/patterns/components/notification-bar.min.css: {minfied: true}

When this paragraph is used in a field in node content types, the library (css) is loaded as expected so I can confirm the paragraph is setup correctly.

Is there possibly something Im missing getting the library to load when the paragraph is used in a dmb notification?

Thanks!

πŸ› Bug report
Status

Active

Version

1.6

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States justclint

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

Comments & Activities

  • Issue created by @justclint
  • πŸ‡ΊπŸ‡ΈUnited States Mojiferous

    Talking to our team, it sounds like dev have done this before by adding the library to the DMB block, which is not an ideal solution. I think because of how this is loaded attached libraries in the template are likely not working, so this is definitely a bug

  • πŸ‡ΊπŸ‡ΈUnited States justclint

    Thanks for the suggestion. Attaching library to the block in preprocess does the job for now.

Production build 0.69.0 2024