WordPress 1.5.1 RSS Feed的一个bug
Thursday, May 12th, 2005 | WordPress
WordPress1.5.1发布后,不少人升级后都有一些小问题,像部分插件不兼容无法使用,设为Private的文章无法正常隐藏等等,不过更大的bug在于升级到1.5.1后,WordPress的RSS Feed会出错(via)。
问题表现为:Feed不会输出本该输出的全部文章,而只会显示你当前新撰写的文章,而过了24小时后,Feed则会变为空白,没有任何的文章输出(ps.好像使用Feedburner烧过的feed没有问题)。子游提到1.5.1升级后又出了新的更新包。不过我今天重新下载升级后,这个bug还没有修复。
解决办法:
将根目录下wp-blog-header.php中的
if ( ($client_last_modified && $client_etag) ?
((strtotime($client_last_modified) >= strtotime($wp_last_modified)) && ($client_etag == $wp_etag)) :
((strtotime($client_last_modified) >= strtotime($wp_last_modified)) || ($client_etag == $wp_etag)) ) {
if ( preg_match(‘/cgi/’,php_sapi_name()) ) {
header(‘Status: 304 Not Modified’);
echo “\r\n\r\n”;
替换为
if ( ($client_last_modified && $client_etag) ?
((strtotime($client_last_modified) >= strtotime($wp_last_modified)) && ($client_etag == $wp_etag)) :
(($client_last_modified && strtotime($client_last_modified) >= strtotime($wp_last_modified)) || ($client_etag == $wp_etag)) ) {
if ( preg_match(‘/cgi/’,php_sapi_name()) ) {
header(‘Status: 304 Not Modified’);
echo “\r\n\r\n”;
重新上传到服务器上就可以了,看来以后还是不要太早尝鲜做小白鼠的好。
Update:发现William更早就提出了这个问题和修改的办法。
1 Comment to WordPress 1.5.1 RSS Feed的一个bug
[...] !显示不出下章内容了,哎,真的好失败啊~以后不敢盲目升级了! WordPress 1.5.1 RSS Feed的一个bug
永久地址http://foreverrj.vicp.net/ [...]
May 25, 2005