Page "undefined" when using module "Special menu items" <nolink>

Created on 28 June 2014, almost 11 years ago
Updated 24 April 2025, 12 days ago

Bug: Superfish redirects to page "/undefined"

Scenerio is as follows:
- Enable module special_menu_items. Create a 'placeholder' menu item
- Enable sf-Touchscreen plug-in (unconditionally)
- Click twice on the placeholder menu item.
- Superfish redirects to page "/undefined"

Solved by the simple patch below - for the superfish library. I've not posted it as a patch here because I presume that wouldn't work for the library which lives in github. Looking at the code for the dev version of the library, the same problem exists in dev too.

$ diff -rup orig.sftouchscreen.js new.sftouchscreen.js
--- orig.sftouchscreen.js 2014-06-26 14:36:12.669863000 +0100
+++ new.sftouchscreen.js 2014-06-26 14:35:11.392955400 +0100
@@ -28,7 +28,10 @@
item.click(function(event){
// Already clicked? proceed to the URL.
if (item.hasClass('sf-clicked')){
- window.location = item.attr('href');
+ url = item.attr('href');
+ if (typeof(url) != "undefined"){
+ window.location = url;
+ }
}
// Prevent it otherwise.
else {

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom adamps

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024