luci-base: LuCI is not detecting properly sysauth.htm in 3rd party theme and uses default sysauth.ut.
See original GitHub issueSteps to reproduce:
- On a fresh snapshot (it works in the last official release, but not in the snapshots), install 3rd party luci-theme-argon package by downloading the packages from that repo or using CLI:
opkg update
opkg install luci-compat
opkg install luci-lib-ipkg
wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v2.2.9.4/luci-theme-argon-master_2.2.9.4_all.ipk
opkg install luci-theme-argon*.ipk
wget --no-check-certificate https://github.com/jerrykuku/luci-theme-argon/releases/download/v2.2.9/luci-app-argon-config_0.9-20210309_all.ipk
opkg install luci-app-argon-config*.ipk
- In OpenWrt, go to System > System > Language and Style and select the Argon design.
- Logout OpenWrt to return to the login page
Actual behavior:
For some reason, LuCI is executing /usr/share/ucode/luci/template/sysauth.ut
instead of /usr/lib/lua/luci/view/themes/argon/sysauth.htm
. However, it renders properly the htm headers and the footers provided in the theme, so it seems that the issue only affects the sysauth detection.
Expected behavior:
LuCI should render the provided sysauth.htm file /usr/lib/lua/luci/view/themes/argon/sysauth.htm
. This is the current behavior in the official release (only fails in the snapshot):
Additional Information:
OpenWrt version information from system /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='SNAPSHOT'
DISTRIB_REVISION='r21314-1996d600bd'
DISTRIB_TARGET='mediatek/mt7622'
DISTRIB_ARCH='aarch64_cortex-a53'
DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r21314-1996d600bd'
DISTRIB_TAINTS='no-all busybox'
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Latest Luci changes affecting a lot of legacy 3rd party themes
Any idea on how to use lua script in the sysauth.ut file, A way to restore previous capability, or any other creative solution...
Read more >luci-theme-openwrt-2020 theme question · Issue #6118 - GitHub
The login page in the upper right corner is displayed as follows: Click in and the following error is displayed: A fallback is...
Read more >2m-subdomains.txt - Index of /
... mm openerp htdocs ld db linux 3rdparty css html apps Example linux-3 project ... DD-s-Dictionary parsing sys-auth azure-mgmt-network learnWeb BaiduMap ...
Read more >restore luci? : r/openwrt - Reddit
A runtime error occurred: /usr/lib/lua/luci/template.lua:97: Failed to execute template 'themes/bootstrap/header'.
Read more >Class: LuCI
New view code should use 'require dom'; to request the LuCI.dom class. Deprecated. Yes. env. The env object holds environment ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This actually is a kind of bug in the Argon theme itself. The shipped
sysauth.htm
is rendered but throws a runtime exception, which causes LuCI to fall back to it’s builtinsysauth.htm
.The issue is within this line:
https://github.com/jerrykuku/luci-theme-argon/blob/master/luasrc/view/themes/argon/sysauth.htm#L132
On 22.03, the global
node
variable is not defined which causes the( (node and node.title) and ' - ' .. translate(node.title) or ''))
part to be skipped. On master,node
is defined and referring to the dispatcher’snode()
function, leading to a Luaattempt to index a function value
exception due to thenode.title
expression. After removing the extraneous code which has never been rendered anyway, the theme appears to function normally.@jow-
I flashed the new snapshot build r21335-e410833bdd, using the same Argon theme. Now, the login page loads properly, but it can’t access the rest of the site. it returns the following error:
It seems the file index.htm is not there. The only file in that folder is luaindex.htm
I don’t know if this is related to the same issue. Should I report it as a new issue or just continue here?
I answer myself, I see there is already a new issue #6111 about this. Never mind.