Latest release 8.x-1.7 does not recognize the superfish library?

Created on 10 October 2023, 9 months ago
Updated 12 December 2023, 7 months ago

Problem/Motivation

Latest release 8.x-1.7 throws a critical error

Hi!
I've been happily using Superfish with its associated library on my Drupal 9 sites (online and local) using 8.x-1.6.
Today after updating to 8.x-1.7 my sites throw a critical error:
Errors found
Superfish library Not installed
Please download the Superfish library from https://www.drupal.org/project/superfish .
Please help!
Note.- If I remove Superfish and revert to previous version 8.x-1.6 all is well again.

🐛 Bug report
Status

Fixed

Version

1.7

Component

Superfish Library

Created by

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

Comments & Activities

  • Issue created by @papijo
  • Assigned to LOBsTerr
  • 🇧🇪Belgium LOBsTerr

    I will check it

  • 🇺🇸United States greatmatter

    Line 47 of superfish.js has an error:

    o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels),

    should be

    o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels);

  • 🇺🇸United States kwiseman

    I agree with @greatmatter - Line 47 of superfish.js ending in a comma and not a semicolon is causing a problem for the site we've upgraded to 8.x-1.7.

    However, our site is not getting the same error as @papijo. In the browser console, we're getting "Uncaught SyntaxError: expected expression, got keyword 'var'" on line 48.

  • @greatmatter I have replaced the ending comma with a semicolon in "MYDRUPALSITE\libraries\superfish\superfish.js" but am still getting the Superfish library Not installed error.
    @kwiseman I am not getting any error in my browser console.
    What I don't understand is that the Superfish library was working OK with previous version of Superfish 8.x-1.7, even if it had that syntax error, so I suppose the bug comes from Superfish module itself, not the library???

  • 🇺🇸United States jlancaster

    Same symptoms here as #7. Status report is clean but the "keyword var" error pops up in js console. Forcing downgrade to 1.6 or adding semicolon fixes.

  • 🇬🇷Greece magtak

    I am getting

    Uncaught TypeError: $menu.superfish is not a function
        attach http://mysite.ddev.site/modules/contrib/superfish/js/superfish.js?v=2.0:32
        each jQuery
        attach http://mysite.ddev.site/modules/contrib/superfish/js/superfish.js?v=2.0:21
        attachBehaviors http://mysite.ddev.site/core/misc/drupal.js?v=9.5.11:24
        attachBehaviors http://mysite.ddev.site/core/misc/drupal.js?v=9.5.11:21
        <anonymous> http://mysite.ddev.site/core/misc/drupal.init.js?v=9.5.11:24
        listener http://mysite.ddev.site/core/misc/drupal.init.js?v=9.5.11:14
    
  • Status changed to Needs review 9 months ago
  • 🇧🇪Belgium LOBsTerr

    I have fixed a JS error from #5. A new release was tagged https://github.com/LOBsTerr/drupal-superfish/releases/tag/2.3.1

    I checked he installation on the fresh instance and also tried to update. I don't have any issues.

  • 🇺🇸United States jlancaster

    Thanks. 2.3.1 release fixed the console error related to library and all is good now. Never had issues with library being found in status report so I can't speak to that being resolved or not.

  • 🇩🇪Germany kreatIL

    I'm not sure if this is related, but after updating to 8.x-1.7, the arrows that indicate the presence of a submenu have disappeared on my site. This doesn't seem to be a CSS issue, as the entire HTML tags are no longer being rendered.

    Reverting back to 8.x-1.6 resolves the issue for me as well.

    Can someone confirm that? If needed, I'm happy to open a separate issue for this.

  • 🇪🇸Spain gmejias

    I have fixed the error in the superfish.js library and now I have no problems

    This already happened in " Variable declaration problem with aggregation in library 🐛 Variable declaration problem with aggregation in library Fixed ".

    If you can add a patch for its temporary solution it would be perfect

  • 🇮🇳India drupalprog

    i tried almost everything via composer, uninstall module then again install, replace superfish library again, change semicolon but no luck
    finally i checked code & did some debugging & found
    you need to rename folder "superfish" to "drupal-superfish" then it will recognized.

    so path will be
    libraries >> drupal-superfish

    superfish module used superfish_library_path function in which library path is set to
    $library = 'drupal-superfish'

    hope it will helpful to others.

  • 🇮🇹Italy andreaciravolo

    Ok
    ha funzionato anche per me
    Grazie
    andrea

  • @drupalprog
    I was really beginning to despair when finally I read your recent post, which I found not only "useful" but a real life-saver!
    Why has this change of dir names not been made clear earlier on, I wonder?

    Anyway Superfish 8.x-1.7 works as expected now. Thanks everyone!

  • Status changed to Fixed 9 months ago
  • 🇮🇳India newswatch Delhi/Bangalore

    #15 removed the error for me.

  • 🇺🇸United States donpwinston

    I'm getting an error in my JavaScript console: "Failed to load resource: the server responded with a status of 404 (Not Found)"

    The url is: https:///libraries/superfish/superfish.js?s2jcvr

    Where did this url come from?

    I believe it should be:
    https:///libraries/drupal-superfish/superfish.js?s2jcvr

    Just upgraded to Drupal 10.1.5 and upgraded superfish to 1.7. The menus appear to be working fine.

  • I fixed the comma/semicolon error in #5 and the error persisted. Then I followed the advice in #15 (change the libraries >> superfish folder name to drupal-superfish) and that removed the error for me. Thank you so much for sharing this fix. I have several Drupal sites, all using superfish and was groaning to think I might need to find another menu project to replace it. I'm very grateful to both "greatmatter" (#5) and "drupalprog" (#15.

  • 🇺🇸United States greatmatter

    @kashalinka: My pleasure. Question: did you install the module via composer? I ask because when I ran the update via composer, it automatically added the drupal-superfish folder.

  • 🇮🇱Israel sibany

    @drupalprog #15 - working, Thanks

  • @greatmatter: I encountered to problem with the superfish library not being found when I used the Drupal administration interface to update the superfish module from 8.1.6 to 8.1.7 in Drupal 9.5.11. The library directory was still called superfish. I then used Composer to require superfish ^8.1.7, and the superfish library directory was deleted and properly replaced with drupal-superfish, as you surmised. All is working now.

    I did not initially observe any of the errors noted above. The very obvious symptom was that all of my menus and submenus were expanded, and much of the basic CSS styling was missing. I was really sweating until I found this thread. Thanks to all!

  • 🇬🇧United Kingdom effortDee

    #15 worked for me

  • 🇮🇳India drupalprog

    Welcome everyone.

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Fixed 7 months ago
  • 🇮🇳India Sandip Choudhury

    #15 works for me.

  • #15 solved this problem for me! Thanks

Production build 0.69.0 2024