Leftover drupalSettings.path.scriptPath in core.libraries.yml is unnecessary

Created on 12 March 2023, over 1 year ago
Updated 12 June 2023, about 1 year ago

Problem/Motivation

There is a drupalSettings.path.scriptPath js object property that is output on every page as null. It looks like the code that populated it was removed in https://www.drupal.org/project/drupal/issues/2527846 (specifically, see this commit line) but the initialization in core.libraries.yml wasn't removed.

The only instance of scriptPath found when searching through the core codebase is where it is initialized in core.libraries.yml. It looks safe to remove as there is no code logic attempting to use it. The value is always null anyway.

Steps to reproduce

1. Go to any Drupal 9.5.x/10.x site
2. Run in browser dev console drupalSettings.path.scriptPath
3. It'll be a null value

Proposed resolution

Just remove the library init.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

The drupalSettings.path.scriptPath is removed . This may affect developers who are relying on the value existing in custom code logic, however the value is currently null across all pages and removing it should not affect most sites.

🐛 Bug report
Status

Fixed

Version

11.0 🔥

Component
System 

Last updated 2 days ago

No maintainer
Created by

🇺🇸United States angrytoast Princeton, NJ

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.

Production build 0.69.0 2024