- Issue created by @papijo
- Assigned to lobsterr
- 🇺🇸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
about 1 year ago 10:54pm 10 October 2023 - 🇧🇪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-superfishsuperfish module used superfish_library_path function in which library path is set to
$library = 'drupal-superfish'hope it will helpful to others.
@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
about 1 year ago 10:45am 11 October 2023 - 🇺🇸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?s2jcvrJust 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.
@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!
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
12 months ago 1:54am 4 December 2023