求助, typecho 分类目录出错

2016-01-29 14:02:13 +08:00
 zuanfeng

http://www.zuanfeng.net/category/vps/ 这个分类打开是正常的
http://www.zuanfeng.net/category/domain/ 这个就出错误了
An error occurred.
Sorry, the page you are looking for is currently unavailable.
Please try again later.
If you are the system administrator of this resource then you should check the error log for details.
为什么不是一起出错,而是一个正常一个错误?这个错误有没有解决办法?
我把主题模板切换回官方自带的主题模板就都正常,没有新的错误记录产生。换成我上传的就产生新的日志,但是分类目录又能打开一阵子,过一阵子又是出错。

PHP message: PHP Notice: Undefined index: slug in /usr/share/nginx/html/var/Widget/Abstract/Contents.php on line 667
PHP message: PHP Notice: Undefined index: slug in /usr/share/nginx/html/var/Widget/Abstract/Contents.php on line 670
PHP message: PHP Notice: Undefined index: cid in /usr/share/nginx/html/var/Widget/Abstract/Contents.php on line 639
PHP message: PHP Notice: Undefined index: created in /usr/share/nginx/html/var/Widget/Abstract/Contents.php on line 653
PHP message: PHP Notice: Undefined index: type in /usr/share/nginx/html/var/Widget/Abstract/Contents.php on line 664
PHP message: PHP Notice: Undefined index: slug in /usr/share/nginx/html/var/Widget/Abstract/Contents.php on line 667
PHP message: PHP Notice: Undefined index: slug in /usr/share/nginx/html/var/Widget/Abstract/Contents.php on line 670" while reading response header from upstream, client: 23.4.92.14, server: zuanfeng.net, request: "GET /category/vps/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.zuanfeng.net", referrer: "http://www.zuanfeng.net/category/domain/"
2016/01/29 13:03:33 [error] 12176#0: *1 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: cid in /usr/share/nginx/html/var/Widget/Abstract/Contents.php on line 639
PHP message: PHP Notice: Undefined index: created in /usr/share/nginx/html/var/Widget/Abstract/Contents.php on line 653

1762 次点击
所在节点    问与答
3 条回复
zgk
2016-01-31 08:55:12 +08:00
应该是主题循环文章或者分类目录访问数组的时候访问了一个不存在的 key 然后就报错了,可能是主题作者直接在线上环境调试没看到这个错误。一般来说访问一个数组之前最好用 isset 或者 empty 来判断一下。
GUMU
2016-01-31 10:05:33 +08:00
这是哪个主题?如果是公开的可以放出来~说不定能找到哪儿写错了
zuanfeng
2016-02-01 21:23:25 +08:00
@GUMU
https://github.com/mikeyzm/White-M/releases 我问了作者说是我的伪静态不对,不过我怎么试也不行。
https://github.com/koyoter/simple-theme 我也试了同样的问题,囧。
http://www.imhan.com/archives/magike_editor_for_typecho_09/ 这个插件真心简洁我也想用也是同样的错误,主题不重要了,能否把这个插件弄一弄?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/254230

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX