本站资源均来自互联网,仅供学习与参考,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
Copyright @ 2015-2020 织梦园 版权所有
Power by DedeCms
鲁ICP备15039853号-1
鲁公网安备 37132302000249号
模板标签 TAG标签 网站地图 XML地图 今日更新 返回顶部
如果你的TAG标签关联过很多已经删除的文档,那么在TAG标签列表页就会出现有页码分页没有数据的情况,如下图所示
这是因为织梦的TAG标签列表核心文件不严谨引起的,我们可以让关联的TAG标签所属的已经删除的文档在TAG表中删除掉就能解决空数据列表问题
打开 /include/arc.taglist.class.php 找到,大概在 129 至 131 行,这3行代码
$cquery = "SELECT COUNT(*) AS dd FROM `dede_taglist` WHERE tid = '{$this->TagInfos['id']}' AND arcrank >-1 "; $row = $this->dsql->GetOne($cquery); $this->TotalResult = $row['dd']; |
如图
改成
$this->dsql->SetQuery("SELECT aid FROM `dede_taglist` WHERE tid = '{$this->TagInfos['id']}' AND arcrank>-1 "); $this->dsql->Execute(); while($row=$this->dsql->GetArray()) { $atrow = $this->dsql->GetOne("SELECT id FROM `dede_arctiny` WHERE id='{$row['aid']}' AND arcrank>-1"); if(!is_array($atrow)) { $this->dsql->ExecuteNoneQuery("DELETE FROM `dede_taglist` WHERE aid='{$row['aid']}' "); continue; } $idlists .= ($idlists=='' ? $row['aid'] : ','.$row['aid']); } if($idlists!=='') $this->TotalResult = $row['dd'] = count(explode(',',$idlists)); |
如图
完成