wordpress知更鸟主题BUG记录

本文详细记录了WordPress知更鸟主题遇到的常见BUG,包括首页幻灯问题、GET404错误、post500问题及其解决方案。通过调整主题设置、修改PHP配置和更新外链配置,成功解决了这些问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

更多分类文章:

网站建设 | Python | Linux | 大数据 | 数据库 | Git | Nodejs | Golang | 电脑技巧 | 计算机技术

1.首页幻灯问题

打开网站主页出现如下问题,所有缩略图不显示,一些页面效果失效,如下所示。

 

wordpress知更鸟主题BUG记录

检查浏览器错误:

 

wordpress知更鸟主题BUG记录

涉及主题下owl.js

err显示最后一行定位到首页幻灯,关闭幻灯之后正常了。

检查之后发现是一张幻灯添加的图片不见了。。这就出现了错误,因为该主题必须要两张以上幻灯才不会出现错误。

2.GET 404问题

错误如下

 

wordpress知更鸟主题BUG记录

应该是引用了外链,但是该外链域名又未添加到/www/....../begin主题目录下的timthumb-config.php中

// 添加外链图片地址域名
if(! isset($ALLOWED_SITES)){
	$ALLOWED_SITES = array (
		's0.wordpress.com',
		'ww1.sinaimg.cn',
		'ww2.sinaimg.cn',
		'ww3.sinaimg.cn',
		'ww4.sinaimg.cn',
		'wx1.sinaimg.cn',
		'wx2.sinaimg.cn',
		'wx3.sinaimg.cn',
		'wx4.sinaimg.cn',
		'n.sinaimg.cn',
		's2.ax1x.com',
		'wx2.sbimg.cn',
		'wx1.sbimg.cn',
		'xxxxxxxxxxx',
	);
}

按显示尺寸应该是分类封面图片,去“主题设置”,关闭“分类封面”,解决。

3.post 500问题

jquery.min.js?ver=1.10.1:4 POST https://xxx/wp-admin/admin-ajax.php 500

 

wordpress知更鸟主题BUG记录

查看nginx error日志:/www/wwwlogs路径,错误如下。

PHP message: PHP Fatal error: Uncaught Error: Call to undefined function cat_cover_url

2020/09/10 18:05:56 [error] 20136#0: *32900 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function cat_cover_url() in /www/....../begin/inc/section.php:583
Stack trace:
#0 /www/....../begin/inc/shortcode.php(543): nav_cat()
#1 /www/....../wp-includes/shortcodes.php(343): nav_cat_shortcode()
  thrown in /www/....../begin/inc/section.php on line 583" while reading response header from upstream, client: 128.71.31.126, server: wanghaoyi.com, request: "POST /wp-admin/admin-ajax.php HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-74.sock:", host: "wanghaoyi.com"

解决方法:后台关闭没有用到的“菜单图文”和“菜单分类”功能。

Deprecated: Array and string offset access syntax with curly braces is deprecated

开启wordpress的debug模式,看到如下错误:

Deprecated: Array and string offset access syntax with curly braces is deprecated in /www/wwwroot/www.wanghaoyi.com/wp-content/themes/begin/inc/letter-series.php on line 9
 
Deprecated: Array and string offset access syntax with curly braces is deprecated in /www/wwwroot/www.wanghaoyi.com/wp-content/themes/begin/inc/letter-series.php on line 9
 
Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in /www/wwwroot/www.wanghaoyi.com/wp-content/plugins/crayon-syntax-highlighter-2.8.6/util/crayon_util.class.php on line 73
Notice: Undefined index: night in /www/wwwroot/www.wanghaoyi.com/wp-content/themes/begin/inc/inc.php on line 1437
class="home blog logged-in " ontouchstart="">

这是因为PHP7.4不再支持使用大括号访问数组以及字符串的偏移,即php7.4不支持数组{}写法,统一为数组[]。


原文链接::wordpress知更鸟主题BUG记录

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值