Actions
Bug #14576
openWMenu do sometimes going to the wrong internal path at application startup
Start date:
06/03/2026
Due date:
% Done:
0%
Estimated time:
Description
When a WMenu has internal path enabled, it sometimes ignore the internal path at application startup and goes to another one.
Here is a way to reproduce the issue:
class Application : public Wt::WApplication
{
public:
Application(const Wt::WEnvironment& env)
: Wt::WApplication(env)
{
auto stack = root()->addNew<Wt::WStackedWidget>();
Wt::WMenu* menu = root()->addNew<Wt::WMenu>(stack);
menu->setInternalPathEnabled("/");
menu->addItem("dashboard", std::make_unique<Wt::WText>("Dashboard Page"));
menu->addItem("links", std::make_unique<Wt::WText>("Link Page"));
auto menuItem = menu->addItem("", std::make_unique<Wt::WText>("Account Settings Page"));
menuItem->setHidden(true);
menuItem->setPathComponent("account-settings");
}
};
Setting the internal path manually using setInternalPath(internalPath(), true) fixes the issue.
Updated by Romain Mardulyn 5 days ago
- Status changed from InProgress to Review
- Assignee deleted (
Romain Mardulyn)
Actions