
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.
Comment | File | Size | Author |
---|---|---|---|
#30 | recognize-superfish-library-vers-3392874.patch | 622 bytes | pooja_sharma |
Issue fork superfish-3392874
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
frank.dev commentedsame
Comment #3
lobsterr commentedI will check it
Comment #4
andreaciravolo commentedsame
Comment #5
greatmatter commentedLine 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);
Comment #6
magtak commentedSame
Comment #7
kwiseman commentedI 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.
Comment #8
papijo commented@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???
Comment #9
jlancaster commentedSame 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.
Comment #10
magtak commentedI am getting
Comment #11
lobsterr commentedI 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.
Comment #12
jlancaster commentedThanks. 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.
Comment #13
kreatil commentedI'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.
Comment #14
gmejias commentedI 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".
If you can add a patch for its temporary solution it would be perfect
Comment #15
drupalprog commentedi 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.
Comment #16
andreaciravolo commentedOk
ha funzionato anche per me
Grazie
andrea
Comment #17
papijo commented@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!
Comment #18
lobsterr commentedComment #19
subir_ghosh#15 removed the error for me.
Comment #20
donpwinston commentedI'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://<my domain>/libraries/superfish/superfish.js?s2jcvr
Where did this url come from?
I believe it should be:
https://<my domain>/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.
(After aggregating the js files and flushing caches the problem went away. The aberrant path must have been stuck in some cache, maybe an opcache problem)
Comment #21
Kashalinka commentedI 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.
Comment #22
greatmatter commented@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.
Comment #23
sibany commented@drupalprog #15 - working, Thanks
Comment #24
dknudsen commented@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!
Comment #25
effortdee commented#15 worked for me
Comment #26
drupalprog commentedWelcome everyone.
Comment #28
sandip choudhury commented#15 works for me.
Comment #29
trydoknight commented#15 solved this problem for me! Thanks
Comment #30
pooja_sharma commentedComment #31
lobsterr commented@pooja_sharma
The last release have already fixed the name of the VERSION file. so, we don't need to do what you propose.
https://github.com/LOBsTerr/drupal-superfish/commits/2.3.8
Current release requires 2.3.7 version of the library and it was fixed already there
https://git.drupalcode.org/project/superfish/-/blame/8.x-1.x/composer.js...
Update the library and it should work