Generate relative path for css file

Created on 11 December 2020, almost 4 years ago
Updated 18 April 2023, over 1 year ago

Problem/Motivation

When we have multiple domains configured for a Drupal website, this causes an error when the generated CSS file URL is absolute instead of relative. We need to force it to be relative.

Steps to reproduce

Have to different domains one for back office and two for the front end, thew CSS path file will generate to the back office domain.

Proposed resolution

Add file_url_transform_relative() to simple_menu_icons_css_alter()

🐛 Bug report
Status

RTBC

Version

2.2

Component

Code

Created by

🇵🇹Portugal msantos202

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷France klelostec

    Patch #4 works for me with version 2.3.

    This solves my problem with CSS aggregation enabled.
    In this case, Drupal tries to download CSS file from a public URL which timeout due to the network server configuration.
    This causes very long page loads after cache clear.

Production build 0.71.5 2024