更多分类文章:
网站建设 | Python | Linux | 大数据 | 数据库 | Git | Nodejs | Golang | 电脑技巧 | 计算机技术
1.首页幻灯问题
打开网站主页出现如下问题,所有缩略图不显示,一些页面效果失效,如下所示。
检查浏览器错误:
涉及主题下owl.js
err显示最后一行定位到首页幻灯,关闭幻灯之后正常了。
检查之后发现是一张幻灯添加的图片不见了。。这就出现了错误,因为该主题必须要两张以上幻灯才不会出现错误。
2.GET 404问题
错误如下
扫描二维码关注公众号,回复:
12013225 查看本文章
应该是引用了外链,但是该外链域名又未添加到/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
查看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记录