注册 登录 欢迎您到模板精:织梦模板_dede模板_免费网站模板_网站源码下载

织梦教程_免费织梦模板下载_dede模板

该栏目分享织梦建站的基础知识,从织梦CMS的安装,到织梦标签的常规调用,以及织梦的常见问题答疑都有涉及。

当前位置:首页 > 织梦教程 >

织梦自定义图片字段报错Call to a member function GetInnerText

免费网站模板 2020-09-15 10:58 织梦教程 评论
织梦程序当你添加了自定义图片字段时,前台打开当前栏目列表就会出现
 
Fatal error: Call to a member function GetInnerText() on string in /include/taglib/channel/img.lib.php on line 51
 
后台出现
 
Fatal error: Call to a member function GetInnerText() on a non-object in /include/customfields.func.php on line 539
 
解决方法
打开 /include/customfields.func.php 搜索
 
$fvalue = trim($ntag->GetInnerText());
 
改成
 
$fvalue = ($ntag=="") ? trim($ntag) : trim($ntag->GetInnerText());
 
继续打开 /include/taglib/channel/img.lib.php 搜索
 
$innerTmp = $arcTag->GetInnerText();
 
改成
 
$innerTmp = ($arcTag=="") ? trim($arcTag) : trim($arcTag->GetInnerText());