You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Pages: inferred path is wrong when a page module name contains the pages folder name #4168
Current dev (dash 4.5.1), Python 3.14. Server side only, any browser or OS.
Describe the bug
When register_page(__name__) is called without path, _infer_path (dash/_pages.py:71) splits the module name on the pages folder name as a substring and keeps what follows the last match. A page module whose name contains the folder name loses part of its path:
One such page silently takes over / and its real URL 404s. Two of them collide on /, and the first request to the app raises modules ['pages.homepages', 'pages.landing_pages'] have duplicate paths.
Expected behavior
The folder name should only match as a whole dotted part of the module name, so these pages get /landing-pages, /homepages, /subpages/report and /overviews.
Activity