Wrong loading order of assets with Bigpipe & core 10.4

Created on 29 January 2025, 2 months ago

Problem/Motivation

I have updated a site core from 10.3.x to 10.4.x recently and noticed that the chosen styles were broken. I found out that with big_pipe module enabled the css for the module gets included after the theme assets and therefore the theme overrides are not taking effect. This is probably connected to the change in asset loading order here: https://www.drupal.org/project/drupal/issues/3467860 πŸ› Logic error in Drupal's lazy load for asset aggregation Active

Steps to reproduce

Install the module on a Drupal site with big_pipe enabled. Check assets order in browser developer tools.

Proposed resolution

Investigate why this happens and make sure the module assets are included before theme assets.

πŸ› Bug report
Status

Active

Version

5.0

Component

Code

Created by

πŸ‡ΈπŸ‡°Slovakia gresko8

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

Comments & Activities

  • Issue created by @gresko8
  • πŸ‡ΈπŸ‡°Slovakia gresko8
  • πŸ‡­πŸ‡ΊHungary nagy.balint

    Hi!

    By "theme assets" do you mean gin theme?

  • πŸ‡³πŸ‡±Netherlands eelkeblok Netherlands πŸ‡³πŸ‡±

    What would you suggest is the correct asset order? I am not quite sure what I'm looking for yet. Maybe illustrate the problem with some screenshots?

  • πŸ‡­πŸ‡ΊHungary nagy.balint

    I could not reproduce it on 11.1.1 on the backend.
    Maybe it only happens on front end with a specific theme?

  • πŸ‡³πŸ‡±Netherlands eelkeblok Netherlands πŸ‡³πŸ‡±

    I've been looking into an issue with this too, but to me it looked like the theme JavaScript was previously running before the module's JS, whereas now it is running after (I say "looked like" because I didn't go deeper into the particular issue, because it already took me long enough to get this far, and other issues doing maintenance also took plenty of time already).

    I would think the latter is the correct order; first the module JS, then the theme JS. In my case, this caused problems, but in my view that means my project was (is) relying on a buggy behaviour of core. Maybe this is the case for the TS as well. However, without more details, I don't think we can determine one way or the other.

  • πŸ‡­πŸ‡ΊHungary nagy.balint

    At least on my sites, I cannot reproduce it, but if it is reproducible on a clean install, or a certain module configuration consistently, then we can take a look.

Production build 0.71.5 2024