Skip to content

luci-base: empty data-page in HTML on log in, or if brand name is clicked #8534

@owlsy

Description

@owlsy

Is there an existing issue for this?

  • I have searched among all existing issues (including closed issues)

Actual behaviour

Depending on how you get to the Overview page in LuCI, the data-page="admin-status-overview" attribute can be missing, causing anything that relies on the data-page name to not function. Accidentally discovered due to my recent CSS commits that target the data-page="admin-status-overview" attribute, along with existing older CSS entries that aren't being applied due to this issue.

First scenario:

<body class="lang_en " data-page=""></body>

Second scenario:

<body class="lang_en " data-page=""></body>

Third scenario:

<body class="lang_en " data-page="admin-status-overview"></body>


Expected behaviour

All scenarios should present a data-page="admin-status-overview", as we are viewing the Overview page.

First scenario:

<body class="lang_en " data-page="admin-status-overview"></body>

Second scenario:

<body class="lang_en " data-page="admin-status-overview"></body>

Third scenario:

<body class="lang_en " data-page="admin-status-overview"></body>


Steps to reproduce

First scenario:

  1. Visit LuCI login page, and login
  2. Taken to the Overview page
  3. View HTML source and check the data-page tag in body

Second scenario:

  1. On any page in LuCI, click on the brand name (top left corner, named OpenWrt by default)
  2. Taken to the Overview page
  3. View HTML source and check the data-page tag in body

Third scenario:

  1. On any page in LuCI, hover over Status, and click 'Overview'
  2. Taken to the Overview page
  3. View HTML source and check the data-page tag in body

Additional Information

{
	"kernel": "6.12.74",
	"hostname": "OpenWrt",
	"system": "MediaTek MT7621 ver:1 eco:3",
	"model": "TP-Link ER605 v2",
	"board_name": "tplink,er605-v2",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "25.12.2",
		"firmware_url": "https://downloads.openwrt.org/",
		"revision": "r32802-f505120278",
		"target": "ramips/mt7621",
		"description": "OpenWrt 25.12.2 r32802-f505120278",
		"builddate": "1774469393"
	}
}

Might be something to do with how body.getAttribute('data-page') is being done in modules/luci-base/htdocs/luci-static/resources/ui.js

Pinging @systemcrash who might know due to previous commit history on this file.


What browsers do you see the problem on?

Safari, Chrome, Firefox, Microsoft Edge

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions