[阻塞-P0] ShopXO 插件后台路由权限问题:VrTicket 控制器 + 视图渲染 #10
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
问题描述
ShopXO 的 Plugins/Index 控制器在调用插件后台页面时有类名大小写问题,导致 vr_ticket 插件后台页面无法正常访问。
根因分析
1. Plugins/Index 控制器流程
URL: admin.php?s=Plugins/Index&pluginsname=vr_ticket&pluginscontrol=SeatTemplate&pluginsaction=List
2. 权限 key 不匹配
PluginsAdminPowerMenu() 返回的 power key 格式是 seat_template-list(下划线分隔),而权限检查使用 URL 参数格式 plugins-seattemplate-index(无下划线),两者不匹配。
尝试过的方案
方案 A:VrTicket.php 独立控制器(未完成)
在 app/admin/controller/VrTicket.php 创建独立控制器。
问题:MyView() 基于 theme 目录 app/admin/view/default/ 计算视图路径,plugins 符号链接在容器内无法 resolve(目标为绝对路径 /Users/bigemon/...,PHP 在容器内无法跟随)。
当前路径:plugins/vr_ticket/admin/view/seat_template/list.html
期望路径:app/plugins/vr_ticket/admin/view/seat_template/list.html
状态:模板文件 not found
方案 B:Seattemplate.php(已创建)
将 SeatTemplate.php 改名为 Seattemplate.php(小写 t)。
问题:权限 key 不匹配 + 原有 SeatTemplate.php 仍然存在
下一步(建议)
环境信息