Routed URLs in library info don't work in a subdirectory

Created on 26 February 2025, about 1 month ago

Overview

As reported by @hooroomoo

When serving a site from inside a subdir, draft CSS/JS URLs end up double nested

e.g. if your site is in subdir, the url to draft css/js is subdir/subdir/xb/api/autosaves/js/{xb_config_entity_type_id}/{xb_config_entity}

This is because inside LibraryDiscoveryParser it does this

// Line 241
if ($source[0] === '/') {
              // An absolute path maps to DRUPAL_ROOT / base_path().

But because we use Url::fromRoute there, we're already adding the base path, so it gets added twice.

Proposed resolution

Don't use Url::fromRoute

User interface changes

πŸ› Bug report
Status

Active

Version

0.0

Component

Miscellaneous

Created by

πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024