记一篇LEDE安装主题遇见的问题

手欠升级了主题
报错代码

/usr/lib/lua/luci/template.lua:55: Failed to execute template 'admin_status/index'.
A runtime error occurred: /usr/lib/lua/luci/template.lua:55: Failed to execute template 'header'.
A runtime error occurred: /usr/lib/lua/luci/template.lua:55: Failed to execute template 'themes/material/header'.
A runtime error occurred: [string "/usr/lib/lua/luci/view/themes/material/head..."]:20: attempt to call field 'node_childs' (a nil value)
stack traceback:
        [string "/usr/lib/lua/luci/view/themes/material/head..."]:20: in main chunk
stack traceback:
        [C]: in function 'n'
        /usr/lib/lua/luci/template.lua:55: in function 'render'
        /usr/lib/lua/luci/dispatcher.lua:582: in function 'include'
        [string "/usr/lib/lua/luci/view/header.htm"]:3: in main chunk
stack traceback:
        [C]: in function 'n'
        /usr/lib/lua/luci/template.lua:55: in function 'render'
        /usr/lib/lua/luci/dispatcher.lua:582: in function 'include'
        [string "/usr/lib/lua/luci/view/admin_status/index.h..."]:1: in main chunk
stack traceback:
        [C]: in function 'n'
        /usr/lib/lua/luci/template.lua:55: in function </usr/lib/lua/luci/template.lua:47>
        (tail call): ?
        /usr/lib/lua/luci/dispatcher.lua:765: in function 'dispatch'
        /usr/lib/lua/luci/dispatcher.lua:737: in function 'dispatch'
        /usr/lib/lua/luci/dispatcher.lua:379: in function </usr/lib/lua/luci/dispatcher.lua:378>

解决方案

使用WINSCP进入 找到/usr/lib/lua/luci/view/themes/bootstrap文件夹。替换出错主题。
可以在错误页面看到用的哪个主题,把出错的主题和bootstrap里面的文件都替换掉。刷新一下然后进系统设置里把主题改回bootstrap就可以了
bootstrap文件下载


怎么使用WINSCP进入这里就不演试了用scp协议进入
有什么不对的请指正...

Last modification:April 28th, 2020 at 07:51 pm
如果觉得我的文章对你有用,请随意赞赏