WordPress的Sakurairo主题每当增加新文章就会让整个网站都打不开的解决方案

大半年前有人提过issue可是被作者无视啦,放在这里备用一下,以免有遇到一样问题的人,希望百度等搜索引擎的spider能够爬到这里吧(笑)

https://github.com/mirai-mamori/Sakurairo/issues/778

每当添加新文章时,都停留在加载页面,主页怎么都渲染不出来

如果你跟我一样”幸运的”打开了报错,然后按F12就会发现有以下字样

<b>Fatal error</b>:  Uncaught TypeError: number_format(): Argument #1 ($num) must be of type float, string given in /var/www/html/wp-content/themes/Sakurairo/functions.php:458
Stack trace:
#0 /var/www/html/wp-content/themes/Sakurairo/functions.php(458): number_format()
#1 /var/www/html/wp-content/themes/Sakurairo/functions.php(500): restyle_text()
#2 /var/www/html/wp-content/themes/Sakurairo/tpl/content-thumb.php(91): get_post_views()
#3 /var/www/html/wp-includes/template.php(812): require('...')
#4 /var/www/html/wp-includes/template.php(745): load_template()
#5 /var/www/html/wp-includes/general-template.php(206): locate_template()
#6 /var/www/html/wp-content/themes/Sakurairo/index.php(67): get_template_part()
#7 /var/www/html/wp-includes/template-loader.php(106): include('...')
#8 /var/www/html/wp-blog-header.php(19): require_once('...')
#9 /var/www/html/index.php(17): require('...')
#10 {main}
thrown in <b>/var/www/html/wp-content/themes/Sakurairo/functions.php</b> on line <b>458</b><br />

幸运的是,后台还是能打开的,如果你没有更改后台目录的话,访问 http://你的网站/wp-admin/

对我有效的解决方案是在后台这里更改数据显示格式为以下两者之一:

23333次访问(默认,所以这个问题没被大伙发现)

23K次访问

本人之前用的是23,333次访问,所以每当发新的文章时就会让整个网站挂掉,之前甚至持续一周

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇
粤ICP备20015830号