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
这些问题通常是因为Dedecms的某些核心文件未能正确处理自定义字段的数据类型,导致调用方法失败。以下是解决该问题的具体步骤。### 解决方法 #### 第一步:修改 customfields.func.php 文件 打开 `/include/customfields.func.php` 文件,并搜索以下代码:
$fvalue = trim($ntag->GetInnerText());
$fvalue = ($ntag=="") ? trim($ntag) : trim($ntag->GetInnerText());
#### 第二步:修改 img.lib.php 文件 接下来,打开 `/include/taglib/channel/img.lib.php` 文件,并搜索以下代码:
$innerTmp = $arcTag->GetInnerText();
$innerTmp = ($arcTag=="") ? trim($arcTag) : trim($arcTag->GetInnerText());
### 总结 通过以上两步操作,您可以有效解决 Dedecms 在使用自定义图片字段时出现的错误提示问题。这些修改不仅修复了前台列表页的显示问题,同时也避免了后台管理界面中的错误提示。 如果您还有其他疑问或需要进一步的帮助,请随时联系技术支持团队。希望这篇文章能帮助到正在使用 Dedecms 的站长朋友们!