织梦后台文章列表页分页错误问题

2022-11-09,,,

问题:织梦(dedecms)5.7后台大量删除文章后,页码仍然显示存在,但是点开后是空的。


例如等待审核的档案栏目中没有文章,打开也是有很多空的列表。:



分析原因:有人称之为织梦5.7的bug,这个我们通常叫做“缓存微表”问题。 解决方法:


打开dede/content_list.php找到


// 缓存处理 

$sql = "select count(*) as dd from `zmb_arctiny` $tinyquery "; 

$cachekey = md5($sql); 

$arr = getcache('listcache', $cachekey); 

if (empty($arr)) 



    $arr = $dsql->getone($sql); 

    setcache('listcache', $cachekey, $arr); 



$totalresult = $arr['dd'];



修改为:

$arr = $dsql->getone("select count(*) as dd from `zmb_arctiny` $tinyquery "); 

$totalresult = $arr['dd'];



这样就可以了,大家可以打开后台看看翻页是否也问题吧!