[GH-ISSUE #1610] Root menu always empty #1373

Closed
opened 2026-02-28 01:29:48 +03:00 by kerem · 3 comments
Owner

Originally created by @nonsintetic on GitHub (May 18, 2023).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1610

Basic Infos

Hardware

WiFimanager Branch/Release: Master

Esp8266/Esp32:

Hardware: ESP32

Description

In the current Master branch the menu in the root page is always empty. Think I figured out why:

The comparison done in WiFiManager::setMenu() (to determine what menus should be displayed) always equals false now. Think this is because it's comparing pointers, memory addresses, instead of contents like before.

See comment in code below:

void WiFiManager::setMenu(const char * menu[], uint8_t size){
  _menuIds.clear();
  for(size_t i = 0; i < size; i++){
    for(size_t j = 0; j < _nummenutokens; j++){
      
    //following line is always false, the menu never gets populated
      if(menu[i] == _menutokens[j]){
        if((String)menu[i] == "param") _paramsInWifi = false; // param auto flag
        _menuIds.push_back(j);
      }

    }
  }
}

Originally created by @nonsintetic on GitHub (May 18, 2023). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1610 ### Basic Infos #### Hardware WiFimanager Branch/Release: Master Esp8266/Esp32: Hardware: ESP32 ### Description In the current Master branch the menu in the root page is always empty. Think I figured out why: The comparison done in `WiFiManager::setMenu()` (to determine what menus should be displayed) always equals false now. Think this is because it's comparing pointers, memory addresses, instead of contents like before. See comment in code below: ``` void WiFiManager::setMenu(const char * menu[], uint8_t size){ _menuIds.clear(); for(size_t i = 0; i < size; i++){ for(size_t j = 0; j < _nummenutokens; j++){ //following line is always false, the menu never gets populated if(menu[i] == _menutokens[j]){ if((String)menu[i] == "param") _paramsInWifi = false; // param auto flag _menuIds.push_back(j); } } } } ```
kerem closed this issue 2026-02-28 01:29:49 +03:00
Author
Owner

@tablatronix commented on GitHub (May 19, 2023):

Yeah looks like I changed the consts def but not the methods that use it crap

<!-- gh-comment-id:1553938230 --> @tablatronix commented on GitHub (May 19, 2023): Yeah looks like I changed the consts def but not the methods that use it crap
Author
Owner

@tablatronix commented on GitHub (May 19, 2023):

Also need to check that nummenutokens size is set.

I clearly did not test this somehow

<!-- gh-comment-id:1553941925 --> @tablatronix commented on GitHub (May 19, 2023): Also need to check that nummenutokens size is set. I clearly did not test this somehow
Author
Owner

@tablatronix commented on GitHub (May 19, 2023):

9b8de0d

<!-- gh-comment-id:1555046540 --> @tablatronix commented on GitHub (May 19, 2023): 9b8de0d
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1373
No description provided.