LayCenter用户中心关闭后,在原始后台无法发布文章?
显示成功,但是文章列表没有新发布的文章
发布于:2个月前 (10-07) IP属地:四川省
回答数量1
浏览量278
1 个回答
满意答案
因为LayCenter插件在post表中增加了几个longtext类型的字段,但mysql无法为longtext类型的字段配置默认值,所以在LayCenter禁用后,zblog向数据库插入数据时没有提供这些字段数据,导致无法正常插入到数据库。
两种解决方法:
1、如果以后不打算使用LayCenter,可在LayCenter配置中的其他配置页面中,勾选“卸载清空数据”,然后停用LayCenter即可删除post中新增的字段。(注意:这一操作会删除所有LayCenter所有相关数据,如果仅是临时停用,请使用下一方法)
2、在主题或任意插件的include.php文件结尾中增加以下代码:
$zbp->datainfo['Post'] = array_merge($zbp->datainfo['Post'], array(
'LayCenter_BuyContent' => array('log_LayCenter_BuyContent', 'string', '', ''),
'LayCenter_VipContent' => array('log_LayCenter_VipContent', 'string', '', ''),
'LayCenter_LoginContent' => array('log_LayCenter_LoginContent', 'string', '', ''),
'LayCenter_SendContent' => array('log_LayCenter_SendContent', 'string', '', ''),
));
如果文件结尾是?>代码,那么需要放在该代码的上一行。
如果重新启用了LayCenter,需要删掉这些增加的代码。
发布于:2个月前 (10-07) IP属地:江苏省
我来回答
您需要 登录 后回答此问题!