litespeedtech / litespeedtech/lscache-drupal

After upgrading to D10, css/js are broken on some pages

Open
#38 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
15
Forks
19
PR merge metrics
No merged PRs in 30d

Description

I upgraded a site from D9 to D10.

This site was using Litespeed Drupal module (v 1.2) on D9.

On D10, I used v1.5.

End result: some pages worked and some did not.

I disabled all caching and css/js aggregation. Problem still persists.

For the pages that did work, the correct css/js files are accessed.

For the pages that didn't work, Drupal is trying to get the optimized css/js files but they do not exist (this is with css/jss disabled).

When I checked the Drupal logs I see:

Symfony\Component\HttpKernel\Exception\BadRequestHttpException: The theme must be passed as a query argument in Drupal\system\Controller\AssetControllerBase->deliver() (line 132 of /code/web/core/modules/system/src/Controller/AssetControllerBase.php).

When I uninstall the LiteSpeed Drupal module, everything works perfectly.

I don't know if this issue is related, but here it is anyway: https://www.drupal.org/project/drupal/issues/3393274

I have resorted to not using the Drupal Litespeed module until this is fixed.

Let me know if you need any additional info. I have the db backup on D10 with Litespeed enabled.

Just to note, I am not 100% sure if this is the fault of the Litespeed module or just my hosting. My hosting is using Litespeed webserver and was working perfectly using D9 and Litespeed v1.3.

It's difficult to test this locally. Locally, I am using ddev with nginx so I cannot replicate the problem locally.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the LiteSpeed Drupal module at version 1.5 and Drupal's core/modules/system/src/Controller/AssetControllerBase.php, especially deliver() around the reported line 132. Review the Drupal logs and compare pages that load assets with pages requesting missing optimized CSS/JS while caching and aggregation are disabled. Done means the affected D10 pages load their CSS and JavaScript correctly with the LiteSpeed module enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.