You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

TestLink 1.9.20无法生成API密钥及页面空白问题求助

TestLink迁移后部分页面空白,PHP报错排查求助

我正在用TestLink结合Robot Framework做测试自动化,刚把TestLink从本地VM迁移到专用服务器,已经完成旧数据的导出与导入。迁移后初步检查无异常,但尝试生成Robot Framework访问TestLink数据库的devKey时,发现「我的设置」页面显示空白,进一步检查发现「角色管理」中的「查看角色」「分配测试计划角色」等页面也无法正常显示。

系统信息

  • 新旧环境均为OpenSuse 15.4虚拟机
  • Apache版本:2.4.51
  • PHP版本:7
  • 安装严格遵循官方文档,无报错

已尝试的操作

  • 尝试访问TestLink用户论坛,发现无法访问且联系不上管理员
  • 排查Apache2错误日志
  • 对比新旧环境的TestLink源代码,未发现差异
  • 用testlink、My Settings、bug等关键词组合搜索解决方案
  • 尝试网上找到的各种方案,均无效
  • 对比新旧环境的PHP模块
  • 查看TestLink的PHP源码寻找线索

具体错误日志

[Tue Feb 13 15:40:42.330733 2024] [php7:notice] [pid 11409] [client 192.168.2.90:60700]
PHP Fatal error:  Uncaught Error: Call to a member function hasRight() on null in /srv/www/htdocs/testlink/lib/functions/common.php:1925

Stack trace:

#0 /srv/www/htdocs/testlink/lib/functions/common.php(1643): getGrantSetWithExit()
#1 /srv/www/htdocs/testlink/lib/usermanagement/userInfo.php(22): initUserEnv()
#2 {main}
thrown in /srv/www/htdocs/testlink/lib/functions/common.php on line 1925,
referer: http://testlink/testlink/lib/general/navBar.php?tproject_id=0&tplan_id=0&updateMainPage=1
[Tue Feb 13 15:43:00.856658 2024] [php7:notice] [pid 11412] [client 192.168.2.90:48402]
PHP Fatal error:  Uncaught Error: Object of class stdClass could not be converted to string in /srv/www/htdocs/testlink/gui/templates_c/0b0c74a505ce728d1d3f154b00c8bd391ff525f0_0.file.usersAssign.tpl.php:119
Stack trace:
#0 /srv/www/htdocs/testlink/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_65cb71f242f212_89907882()
#1 /srv/www/htdocs/testlink/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()
#2 /srv/www/htdocs/testlink/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render()
#3 /srv/www/htdocs/testlink/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render()
#4 /srv/www/htdocs/testlink/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_execute()
#5 /srv/www/htdocs/testlink/lib/usermanagement/usersAssign.php(136): Smarty_Internal_TemplateBase->display in /srv/www/htdocs/testlink/gui/templates_c/0b0c74a505ce728d1d3f154b00c8bd391ff525f0_0.file.usersAssign.tpl.php on line 119, referer: http://testlink/testlink/lib/usermanagement/usersView.php

「分配测试计划角色」页面的错误日志与上述角色管理页面类似。

我现在完全不知道问题出在配置还是数据库,也找不到有效的排查方向,希望有人能提供解决线索,或者告诉我还需要补充哪些信息。

内容的提问来源于stack exchange,提问作者hynerix

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.30 03:35:44