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

Comments

donpwinston created an issue. See original summary.

donpwinston’s picture

Issue summary: View changes
donpwinston’s picture

Issue summary: View changes
jagraj_singh_gill’s picture

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.

donpwinston’s picture

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.

donpwinston’s picture

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.

This bug can be closed/deleted.

Sorry.

donpwinston’s picture

Status: Active » Closed (works as designed)