Hi guys,
When adjusting the latest Dublin theme to tablet mode there is a javascript error thrown in regards to the menu:
The error happens when assigning to the appMenu variable:
Checking the html, .Menu_TopMenus doesn't exist, there is the .Application_Menu that's length is checked on the first line, along with the .Menu_TopMenu items that are the children items of the .Application_Menu:
This is causing some other things, like charts, to break on our screens on tablets.
We've checked for this across multiple enviornments/projects using Dublin and also upgraded to the latest version with the same error.
As a workaround we are adding the .Menu_TopMenus class via javascript.
Seems like that javascript isn't supposed to be pointing at the .Menu_TopMenus class, rather the .Application_Menu class.
Thanks,
Justin
After digging in a bit more, I noticed that if testing a new application, the Menu_TopMenus outer div is generated on a new application.
So in conclusion, I'm not sure if the div was manually deleted by a dev in the Menu web block or what happened. I would assume probably deleted by a dev.
While the user shouldn't delete divs like this, I wonder if there might be a better approach to avoid internal javascript errors like we experienced. Maybe if the div's referenced in the javascript were built in placeholders or something like that.
Justin Babel wrote:
I have the same error...
Hi Clara,
Did you see my follow up post with the solution? Did this work for you?
I fixed it by adding a container with the style class Menu_TopMenus inside the Application_Menu container
I'm having the same problem in LisbonTheme...Styles desapearing and some containers too and no one are deleting them...
Ricardo Pereira wrote:
When you create a new application is everything there?
I just compared a new one with mine and I found where the items that were missing should go. However I don't know why they disapeared, but the problem never happend again after fixing all the mistakes.