RedirectSubscriber blocking CSS

Created on 30 April 2024, 2 months ago

Problem/Motivation

When CSS aggregation is turned on. Data Policy redirects users to the policy page, but it also redirects the CSS/JS request. This means the resulting page has no styling. This effectively breaks the site, unless the user works out how to accept the policy without any styling.

Steps to reproduce

  • Enable CSS and JS aggregation for the site: /admin/config/development/performance
  • Create/edit a data policy to trigger the policy redirect.
  • Sign-in as a non-admin user that does not have the 'without consent' permission.

You should be redirected to the data policy page and see that there is no styling, which will look like the attached image.

Proposed resolution

I have written a patch that skips the redirect on:

  • 'image.style_private'
  • 'system.css_asset'
  • 'system.js_asset'

These are the 3 routes that appeared during my testing, which I believe shouldn't be redirected.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

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

Comments & Activities

Production build 0.69.0 2024