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.
Comments
Comment #2
donpwinston commentedComment #3
donpwinston commentedComment #4
jagraj_singh_gill commentedHi @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.
Comment #5
donpwinston commentedI 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.
Comment #6
donpwinston commentedI 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.
Comment #7
donpwinston commented