Old Library Path Not Removed

Created on 19 October 2023, about 1 year ago
Updated 21 October 2023, about 1 year ago

Problem/Motivation

The resource <script src="/libraries/superfish/superfish.js?s2rxd0"></script> shows up in the source of every page.
This causes warnings in the Drupal log and 404 errors in the JavaScript console. The warning is: Warning: file_get_contents(libraries/superfish/superfish.js): Failed to open stream: No such file or directory in Drupal\Core\Asset\JsCollectionOptimizerLazy->generateHash() (line 43 of /var/www/html/web/core/lib/Drupal/Core/Asset/AssetGroupSetHashTrait.php)

Steps to reproduce

Turn off css and js aggregation. Flush Drupal and browser cache. View page resources

Proposed resolution

Remove library path setting from source. I looked for where this is happening and could not find it.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: works as designed

Version

1.7

Component

Superfish Library

Created by

🇺🇸United States donpwinston

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

Comments & Activities

  • Issue created by @donpwinston
  • 🇮🇳India jagraj_singh_gill

    Hi @donpwinston,
    Can you please provide more details on it ? I tried with Drupal version 9.5.11 with same version as you described i.e. 8.x-1.7
    Placed the Superfish menu block in header, Turned off css and js aggregation, Flushed Drupal and browser cache. Checked the page source, browser console as well as Drupal logs. I was unable to replicate the same.

  • 🇺🇸United States donpwinston

    I don't know what else to say. Do you have any idea how the <script src="/libraries/superfish/superfish.js?s2rxd0"></script> tag is showing up in my pages?

    I've had headaches with caching. I've flushed Drupal caches, opcache, and APCu cache. Are there any others? At one time I downloaded the superfish library and copied it to /libraries/superfish but now I believe composer takes care of that and calls it drupal-superfish.

    The library_path functions in superfish.module are a little confusing. Could I patch it to force it to use only /libraries/drupal-superfish without breaking anything? If so then how? Then I could be sure it is not the module code that is doing it.

  • 🇺🇸United States donpwinston

    I found the problem. I made a Drupal sub theme of bootstrap barrio and put a weight on the old superfish library. I need to change the name to drupal-superfish.

    Sorry.

  • Status changed to Closed: works as designed about 1 year ago
Production build 0.71.5 2024