Styles and scripts not loading for paragraphs where template includes Drupal SDC component

Created on 24 June 2025, 15 days ago

Problem/Motivation

Drupal version: 11.2
Module version: 4.0.0-beta1

When I embed a paragraph that has a template that includes a single directory component the CSS and JS do not get loaded as is usually the case with single directory components.

Steps to reproduce

Use the module to embed a paragraph. Create a template for that specific paragraph and include a single directory component like this:

{% embed 'customtheme:some-component' %}
  {% block component_content %}
    {{ content }}
  {% endblock %}
{% endembed %}

Ensure that the component has a CSS file with a big obvious style like background-color: hotpink; and a some-component.component.yml.

Look at the front-end. The CSS does not load.

Proposed resolution

I'm not sure why the CSS and JS are not being included so unsure right now.

Remaining tasks

Investigate why this is happening.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇬🇧United Kingdom d.fisher

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

Comments & Activities

Production build 0.71.5 2024