"Error retrieving file for route" for Drupal 10.1 multilingual sites with aggregation

Created on 21 January 2024, 10 months ago
Updated 1 March 2024, 9 months ago

Problem/Motivation

When using multilingual path prefixes and CSS/JS aggregation and the CSS/JS files haven't been generated yet, then they aren't generated in Quant so we get errors (shown below).

Original:

When testing for πŸ“Œ Create Quant 1.5.5 release Postponed on Drupal 10.1, get lots of these types of errors:

Error retrieving file for route: http://localhost/sites/default/files/css/css_WsXhY8cOm0_ZGEIQ9S1bmy0HJ91wEr9rKz18Jhsgn6E.css?delta=1&language=en&theme=umami&include=eJxdj1sOhDAIRTdUZUmmD8aQ0GKg1XRWPx1HEzM_fJx7DwHrVjFD8IauZZ8JInuzPp8kiiIU0eyZ3ndhZQmenaUIJ5imRDYsyqhuJzwMzjlnSY1vSzHShlMUZoyVpJhj36XV5WvLjtpBCo785qERJ1Sohwy62E-71o3qxs1e0nRVSn_p9UORhM87g_qSqKwfpNhfbQ

When searching the core issue queue, I found this and I thought updating to 10.1.8 fixed the issue but it didn't:

πŸ› The theme must be passed as a query argument Closed: duplicate

Steps to reproduce

  • Install Drupal 10.1.8 with Umami profile
  • Install/configure quant_api module
  • Enable CSS/JS aggegration
  • Seed content
  • Look at logs
  • Result: Lots of error messages like above
  • Expected result: No error messages

Proposed resolution

The issue is that the CSS/JS files are redirected from no prefix to having a language prefix and we aren't allowing redirects. Update the logic to allow redirects when using path prefixes.

Remaining tasks

  • Update code
  • Review and test
  • Commit :)

User interface changes

Site looks correct because CSS/JS aggregated files are seeded properly.

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

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

Comments & Activities

Production build 0.71.5 2024