Home › Forums › WoodMart support forum › Mobile menu toggle does not work because class ‘wd-active’ is missing
Mobile menu toggle does not work because class ‘wd-active’ is missing
- This topic has 7 replies, 3 voices, and was last updated 1 year, 10 months ago by
Artem Temos.
-
AuthorPosts
-
January 19, 2024 at 3:47 pm #531573
webreturnParticipantDear developers of WoodMart,
The mobile menu doesn’t seem to work, because JavaScript can’t find
ul.wd-active. This error appears:mobileNavigation.min.js?ver=7.4.3:1 Uncaught TypeError: Cannot read properties of null (reading 'length') at woodmartThemeModule.mobileNavigation (mobileNavigation.min.js?ver=7.4.3:1:608) at mobileNavigation.min.js?ver=7.4.3:1:5907Taking a look at PHP file
/woodmart/inc/template-tags/template-tags.phpI can see that the classwd-activeis removed from variable$pages_activeand appended to variable$categories_activeif setting <b>Swap menus</b> is toggled on in the header builder.This setting can only be toggled on/off when option <b>Show categories menu</b> is enabled.
However, if you toggle option <b>Swap menus</b> on and toggle option <b>Show categories menu</b> off, that this settings stays enabled.This causes a problem, because the PHP-file does not take into account whether or not option <b>Show categories menu</b> is toggled on.
<b>Solution:</b>
Add a check in the PHP-file to only move classwd-activeto the categories menu if the categories menu is enabled, because otherwise classwd-activeis taken away from the only menu that is left.To fix this we disabled option <b>Swap menus</b> and then disabled option <b>Show categories menu</b>.
Kind regards,
Thijs Terluin
WebreturnJanuary 19, 2024 at 5:37 pm #531632
Artem TemosKeymasterHello,
Thank you for your report. We will review this and fix it in our next theme update.
Kind Regards
January 30, 2024 at 1:33 am #534754
RichardTRCParticipantHi Artem. This is quite a major issue, do you think we could get a patch or update asap please?
By the way; I applied patch “533790 – FIXED: Mobile menu issue.” because I thought it was for this issue. How do I undo that patch?
January 30, 2024 at 11:07 am #534867
Artem TemosKeymasterHello,
Could you please clarify why this issue is critical for you? What problem do you have on your website now?
Kind Regards
January 30, 2024 at 1:32 pm #534982
RichardTRCParticipantHi Artem.
Currently “Show categories menu” has to be enabled for the mobile header menu otherwise the entire menu doesn’t open on mobile. Any site using woodmart which had Show categories menu disabled will not be able to open their mobile menu.
January 30, 2024 at 1:36 pm #534984
Artem TemosKeymasterPlease, send us your admin access so we can check this issue on your website.
January 30, 2024 at 2:18 pm #534998
RichardTRCParticipantThe site in question is being developed locally so I can’t share access.
I just went to go and gather some screenshots for you and very strangely the issue isn’t occurring anymore! I spent all day yesterday trying to diagnose it and it’s now disappeared and the mobile menu is working fine! Sorry to waste your time. Thanks for your speedy responses Artem, have a great day.
January 30, 2024 at 3:51 pm #535063
Artem TemosKeymasterNo problem. Let me know if the issue appears again for some reason.
Kind Regards
-
AuthorPosts
The topic ‘Mobile menu toggle does not work because class ‘wd-active’ is missing’ is closed to new replies.
- You must be logged in to create new topics. Login / Register
