Replies: 4 comments
|
日志里面似乎没有 504 状态,并且 504 一般代表 Gateway Timeout,Halo 没有这样的异常状态。 |
0 replies
我通过前端调试 halo web 版的 console 请求,发现这个问题出现在创建快照 注释掉的是旧的 sepc 字段,也是现在 openapi 的类型,能成功返回,但无法实际创建快照; 下面的是 console 后台的请求实际类型,是能成功创建的: // spec: {
// allowComment: true,
// baseSnapshot: "", // 去掉
// categories: categoryDisplayName
// ? [this.getCategoryNameByDisplayName(categoryDisplayName)]
// : [],
// cover: "",
// deleted: false,
// excerpt: {
// autoGenerate: true,
// raw: "",
// },
// headSnapshot: "", // 去掉
// htmlMetas: [],
// owner: "", // 去掉
// pinned: false,
// priority: 0,
// publish: false,
// publishTime: ctime ? new Date(ctime) : undefined, // 去掉
// releaseSnapshot: "",
// slug: generateShortUUID(),
// tags: tagDisplayNames
// ? this.getTagNamesByDisplayName(tagDisplayNames)
// : [],
// template: "",
// title: editorTFile.basename,
// visible: editorTFileFrontmatter?.visible || "PRIVATE",
// },
spec: {
allowComment: true,
categories: categoryDisplayName
? [this.getCategoryNameByDisplayName(categoryDisplayName)]
: [],
cover: "",
deleted: false,
excerpt: {
autoGenerate: true,
raw: "",
},
htmlMetas: [],
pinned: false,
priority: 0,
publish: false,
slug: generateShortUUID(),
tags: tagDisplayNames
? this.getTagNamesByDisplayName(tagDisplayNames)
: [],
template: "",
title: editorTFile.basename,
visible: editorTFileFrontmatter?.visible || "PRIVATE",
}, |
0 replies
|
解决了嘛?怎么回事创建不文章 |
0 replies
太长时间有点忘了,好像是对比实际请求,去掉了几个请求参数 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
前置条件
系统信息
使用的哪种方式运行?
Docker
发生了什么?
版本定位:更新 2.24.0 才出现的问题,但没注意之前是哪个版本,应该 22.x.
问题描述:
之前用 api 创建并发布一篇新文章的流程是,先通过
/apis/api.console.halo.run/v1alpha1/posts创建 draftpost,再使用/apis/api.console.halo.run/v1alpha1/posts/{name}/publish发布。更新版本后,第一个 draftPost 请求没问题,但是第二个 publishPost 的 PUT 请求返回 504。
同时,还有以下表现:第一,上述操作未在后台 console 里看到创建的快照,当然也没有发布的文章。第二,对于之前已经存在的旧文章,这个 publishPost 的 PUT 请求表现正常。
请求异常时的后端日志在附件末尾处。
halo-20260421121042.log
复现步骤
No response
相关日志输出
附加信息
No response
All reactions