halo-dev / theme-earth

Halo 2.0 的默认主题
https://demo.halo.run/?preview-theme=theme-earth
GNU General Public License v3.0
39 stars 47 forks source link

categories 页500错误 #121

Open JohnsonRan opened 1 year ago

JohnsonRan commented 1 year ago

是什么版本出现了此问题?

2.5.0

使用的什么数据库?

PostgreSQL

使用的哪种方式部署?

Docker Compose

在线站点地址

No response

发生了什么?

使用 earth 主题,访问 http://192.168.198.128:8090/categories 出现500错误,但http://192.168.198.128:8090/categories/fuck正常

相关日志输出

halo    | 2023-04-28T13:01:29.189+08:00 ERROR 7 --- [oundedElastic-3] org.thymeleaf.TemplateEngine             : [THYMELEAF][boundedElastic-3] Exception processing template "categories": Error resolving template [categories], template might not exist or might not be accessible by any of the configured Template Resolvers
halo    |
halo    | org.thymeleaf.exceptions.TemplateInputException: Error resolving template [categories], template might not exist or might not be accessible by any of the configured Template Resolvers
halo    |       at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869) ~[thymeleaf-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |       at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607) ~[thymeleaf-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |       at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1103) ~[thymeleaf-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |       at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1077) ~[thymeleaf-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |       at org.thymeleaf.spring6.SpringWebFluxTemplateEngine.lambda$createFullStream$0(SpringWebFluxTemplateEngine.java:198) ~[thymeleaf-spring6-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |       at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:58) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |       at reactor.core.publisher.Mono.subscribe(Mono.java:4485) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |       at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |       at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |       at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |       at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
halo    |       at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
halo    |       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
halo    |       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
halo    |       at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
halo    |
halo    | 2023-04-28T13:01:29.190+08:00 ERROR 7 --- [oundedElastic-3] o.t.spring6.SpringWebFluxTemplateEngine  : [THYMELEAF][boundedElastic-3] Exception processing template "categories": Error resolving template [categories], template might not exist or might not be accessible by any of the configured Template Resolvers
halo    |
halo    | org.thymeleaf.exceptions.TemplateInputException: Error resolving template [categories], template might not exist or might not be accessible by any of the configured Template Resolvers
halo    |       at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869) ~[thymeleaf-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |       at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607) ~[thymeleaf-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |       at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1103) ~[thymeleaf-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |       at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1077) ~[thymeleaf-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |       at org.thymeleaf.spring6.SpringWebFluxTemplateEngine.lambda$createFullStream$0(SpringWebFluxTemplateEngine.java:198) ~[thymeleaf-spring6-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |       at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:58) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |       at reactor.core.publisher.Mono.subscribe(Mono.java:4485) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |       at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |       at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |       at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |       at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
halo    |       at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
halo    |       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
halo    |       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
halo    |       at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
halo    |
halo    | 2023-04-28T13:01:29.200+08:00 ERROR 7 --- [oundedElastic-3] a.w.r.e.AbstractErrorWebExceptionHandler : [f51dbd22-1]  500 Server Error for HTTP GET "/categories"
halo    |
halo    | org.thymeleaf.exceptions.TemplateInputException: Error resolving template [categories], template might not exist or might not be accessible by any of the configured Template Resolvers
halo    |       at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869) ~[thymeleaf-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |       Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
halo    | Error has been observed at the following site(s):
halo    |       *__checkpoint ⇢ Handler run.halo.app.theme.router.factories.CategoriesRouteFactory$$Lambda$2157/0x0000000801951840@101f6f9a [DispatcherHandler]
halo    |       *__checkpoint ⇢ run.halo.app.security.authentication.login.UsernamePasswordLogoutHandler [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ run.halo.app.security.authentication.login.DelegatingLogoutPageGeneratingWebFilter [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ run.halo.app.security.authentication.login.UsernamePasswordAuthenticator [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ AuthorizationWebFilter [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ ExceptionTranslationWebFilter [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ LogoutWebFilter [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ ServerRequestCacheWebFilter [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ HaloAnonymousAuthenticationWebFilter [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ CsrfWebFilter [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ org.springframework.web.filter.reactive.ServerHttpObservationFilter [DefaultWebFilterChain]
halo    |       *__checkpoint ⇢ HTTP GET "/categories" [ExceptionHandlingWebHandler]
halo    | Original Stack Trace:
halo    |               at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869) ~[thymeleaf-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |               at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607) ~[thymeleaf-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |               at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1103) ~[thymeleaf-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |               at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1077) ~[thymeleaf-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |               at org.thymeleaf.spring6.SpringWebFluxTemplateEngine.lambda$createFullStream$0(SpringWebFluxTemplateEngine.java:198) ~[thymeleaf-spring6-3.1.1.RELEASE.jar:3.1.1.RELEASE]
halo    |               at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:58) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |               at reactor.core.publisher.Mono.subscribe(Mono.java:4485) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |               at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |               at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |               at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.5.5.jar:3.5.5]
halo    |               at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
halo    |               at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
halo    |               at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
halo    |               at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
halo    |               at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]

附加信息

No response

ruibaby commented 1 year ago

Earth 主题目前还没有 categories 的模板,你可以先用其他主题试试。

/kind feature /area theme

f2c-ci-robot[bot] commented 8 months ago

@ruibaby: The label(s) area/theme cannot be applied, because the repository doesn't have them.

In response to [this](https://github.com/halo-dev/theme-earth/issues/121#issuecomment-1785252401): >Earth 主题目前还没有 categories 的模板,你可以先用其他主题试试。 > >/kind feature >/area theme Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
chenkuicn commented 1 month ago

希望后续可以增加该模板