Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法加载归档是什么原因? #132

Open
Asyncload opened this issue May 14, 2023 · 5 comments
Open

无法加载归档是什么原因? #132

Asyncload opened this issue May 14, 2023 · 5 comments

Comments

@Asyncload
Copy link

归档无法加载 Joe7.7.1 typecho 1.2.0 php 7.4 mysql 8.0 nginx 1.21
@zwtduserid
Copy link

zwtduserid commented May 14, 2023 via email

@Asyncload
Copy link
Author

已经解决了,居然是数据库问题,改成mysql5.7 就可以了。

@longalang
Copy link

这个是因为在 MySQL8.0 中GROUP BY子句不再支持排序功能,可以修改 core/route.php 文件380行的SQL语句:
image
手动添加一个ORDER BY子句排一下序,修改为

$sql = "SELECT FROM_UNIXTIME(created, '%Y 年 %m 月') as date FROM `{$prefix}contents` WHERE created < {$time} AND (password is NULL or password = '') AND status = 'publish' AND type = 'post' GROUP BY FROM_UNIXTIME(created, '%Y 年 %m 月') ORDER BY FROM_UNIXTIME(created, '%Y 年 %m 月') DESC LIMIT {$pageSize} OFFSET {$offset}";

@zwtduserid
Copy link

zwtduserid commented Mar 14, 2024 via email

@jd82k
Copy link

jd82k commented Apr 8, 2024

请使用修改版https://github.com/jd82k/Joe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants