zin formPanel组件报错
这段代码块,当我注释formPanel部分时,能正常显示。把它加回来(取消注释),页面报错。请问为什么啊?
10:31:43 Uncaught Error: Object of class stdClass could not be converted to string in D:\software\ZenTao\app\zentao\lib\zin\core\node.class.php:874
<?php
namespace zin;
set::title($lang->bug->import->fileImport);
radio
(
set::id('redLight'),
set::name('trafficLight'),
set::text('红灯')
);
// formPanel
// (
// formGroup
// (
// set::name('name'),
// set::label('项目名称'),
// set::width('1/2'),
// set::strong(true),
// set::placeholder('请输入项目名称')
// )
// );
render('modalDialog');
当前使用的禅道版本号是多少呢?推荐使用最新的版本测试一下,比如开源版21.4 这部分代码有优化。
相关的代码参考资料:
二次开发机制:http://www.zentao.net/book/zentaopmshelp/225.html
二次开发简介:https://www.zentao.net/book/extension-dev/custom-dev-1319.html
禅道的目录结构:http://www.zentao.net/book/zentaopmshelp/155.html
如何查找要修改的文件:http://www.zentao.net/book/zentaopmshelp/156.html
版本是21.4,挺奇怪的 写法是模仿其他模块写的 也参考了zin网站上的说明,就是formPanel里的内容是直接拷贝zin网站上的例子,不知道为啥就是报错。
目前看代码没有明显的问题,可以尝试打断点,跟踪一下,具体是哪里报错了,根据具体的情况再进行判断。
打印时可以使用 a(变量);die; 或者 \a(变量);die; 的方式。
也可以打开debug:禅道服务器代码目录 zentao/config/my.php中debug的值改成true,会在zentao/tmp/log/目录下php开头的文件中记录日志。




