WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => General Help & Support => Topic started by: svsanchez on May 10, 2017, 02:54:32 AM

Title: Showmenu2 problem
Post by: svsanchez on May 10, 2017, 02:54:32 AM
Hello!

I'm having a strange problem with my Showmenu2: when I access a section which has children or sibblings, show menu shows them for a while, but then they disappear! They only appear when I mouseover the active section. I tried copying both the PHP and CSS templates from another site where this doesn't happen but the problem persists. Could someone please help me solve the issue?

Here's the link to one of the pages with the problem:

http://www.deguate.com/legal/pages/constitucional/el-estado/origen.php

As you can see the page is located under the "El Estado" section, and has several siblings that only appear when the page is loaded and then when the mouse is placed over "El Estado".

Thank you!
Title: Re: Showmenu2 problem
Post by: dbs on May 10, 2017, 09:02:45 AM
Hi, the subsubmenu will only showed with hover (i see <ul style="display: none;">).
The first appearing is only while the page loading is over. Your page load "very" slow.
Can you show us your menu code (showmenu2)?
Title: Re: Showmenu2 problem
Post by: Ruud on May 10, 2017, 10:45:07 AM
There seems to be nothing wrong with the show_menu2 code.

In the javascript file /menu/sherpa/scripts/sherpa_ui.js there is a line that closes all submenu's always.

This javascript (and others) is loaded on a wrong place (somewhere in the body, using a new html/body code) and is loaded very slow. Because it is so slow you will see the submenu for some time until this script is executed.

Line 52:
Code: (sherpa_ui.js) [Select]
$("ul li ul").hide();
If this code is needed for other menu's to close, it should be using a more specific selector (using classes).
F.i.: this would close all submenu's in the top navigation only.
Code: (untested) [Select]
$("ul.round_all li ul").hide();
Title: Re: Showmenu2 problem
Post by: svsanchez on May 10, 2017, 08:57:51 PM
Hello, many, MANY thanks to both of you. I was able to fix the problem with the sections being hidden, they now stay put.

HOWEVER, I'm concerned by your comments about the page being VERY slow. Is the slowliness of the page due to the top menu or is there something else causing it?
Title: Re: Showmenu2 problem
Post by: Ruud on May 10, 2017, 11:41:44 PM
The slow loading is caused mainly by all the advertising scripts being loaded. In total 119 javascripts were loaded.

After a few minutes of loading, this page used 450+ http requests and loaded about 12Mb of data from about 60 different domains.. This was done using Firefox with all blockers "off".
The chrome browser was much faster (about 50 seconds) but needed 550+ http requests to load the page.

I am using a fast (150Mb) connection in NL, so that should not be an issue ;)
Title: Re: Showmenu2 problem
Post by: svsanchez on June 15, 2017, 11:43:12 PM
Hi Ruud, how did you make that analysis? I would like to find where all those 12MB of data you downloaded are coming from. At first I thought it was due to a videoplayer but I just revisited that page and there's no videoplayer... I'm using a 4 Mb connection in Guatemala and the page loaded in a little less than 20 seconds which I know is not good but it couldn't have dowloaded 12 MB in only 20 seconds, so there's definitely something I'm seeing.
Title: Re: Showmenu2 problem
Post by: Ruud on June 16, 2017, 10:38:14 AM
I just reloaded the page (using ctrl-F5 to ommit the browser caching) with the developer tools (F12) open on the network tab.
It will show all traffic needed to load the page, including all external data for advertising, socialmedia and analytics..

(http://i67.tinypic.com/5oi55i.jpg)

Note that every load seems to be having different results, probably caused by all external data that is not in your control.