ExtremeFiretop
Very Senior Member
Unfortunately, I don't own or have direct access to a BE-class router for developing purposes so that makes debugging this kind of "incompatibility issues" rather difficult (if not impossible).
Hopefully, someone else with a BE router can take a look at these types of problems.
@Martinski
Hey buddy, so because we are working on the WebUI for MerlinAU, you happened to direct me to this thread in our latest PR; and I noticed the problems being discussed with the sitemap.
I've gone ahead and fixed it in 3006 and will submit a PR to your repo shortly with the fix.
In short; On 3004 firmware, the router’s JavaScript populates a global array myMenu as soon as you call show_menu().
Therefore, the original code just checked if(myMenu.length == 0) ... retry and then called GenerateSiteMap(...) once myMenu was non‐empty.
However, on 3006 firmware, ASUS changed how they store menu data. They seem to now use:
Code:
Session.set("menuList.", menuTree.list);
As a result, myMenu never gets populated automatically, so the old check (if(myMenu.length == 0) ... retry) would loop forever on 3006.
Code:
DEBUG: show_menu() is defined. Calling it now..
DEBUG: Now calling LoadSiteMap()...
DEBUG: Entering LoadSiteMap()...
DEBUG: menuList or menuExclude not ready; retry in 1s...
DEBUG: Added click event listener to #sitemap_showurls
DEBUG: Entering LoadSiteMap()...
DEBUG: menuList or menuExclude not ready; retry in 1s...
DEBUG: Entering LoadSiteMap()...
DEBUG: menuList or menuExclude not ready; retry in 1s..
DEBUG: Entering LoadSiteMap()..
DEBUG: menuList or menuExclude not ready; retry in 1s...
My PR works on both 3004 and 3006 by using a hybrid of both approaches:
- First checks if myMenu is already populated (the 3004 way).
- If not, it tries to pull menuList. from Session (the 3006 way).
- Then it sets myMenu (and menuList, if needed) so GenerateSiteMap(...) will see the data regardless of firmware version.
Last edited: