#### What type of PR is this?
/kind bug
/area core
/milestone 1.6.x
#### What this PR does / why we need it:
修复又拍云附件删除成功,但是管理页面的“internal server error” 报警
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2603
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
修复又拍云附件删除成功仍旧提示错误的问题
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
/kind bug
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
#### What this PR does / why we need it:
保存空白内容的草稿时,将 `null` 转换为无内容的字符串,防止读取相关实体的数据时发生空指针异常
#### Which issue(s) this PR fixes:
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes#2614
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
None
```
#### What type of PR is this?
/kind documentation
#### What this PR does / why we need it:
Add Changelog # 1.5.4
#### Does this PR introduce a user-facing change?
```release-note
NONE
```
#### What type of PR is this?
/kind bug
/area core
#### What this PR does / why we need it:
修改 PostCategoryServiceImpl.getPostBy() ,使其同时返回子分类文章。同时添加相关测试样例。
#### Which issue(s) this PR fixes:
Fixes#2368
#### Special notes for your reviewer:
```release-note
修复在单个分类所属文章页面页面变量中无法获取子分类中文章的问题
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
/kind bug
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
#### What this PR does / why we need it:
reply comments的评论审核通过时创建回复事件
添加了回复邮件发送的条件:当评论由管理员发布后回复邮件
#### Which issue(s) this PR fixes:
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes#2246
#### Special notes for your reviewer:
null
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
修复未审核评论回复会发送邮件提醒的问题
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
发现在七牛的 [QiniuOssFileHandler:145](f8bd4febb9/src/main/java/run/halo/app/handler/file/QiniuOssFileHandler.java (L145-L152)) 行中,如果文件不是图片类型的话就跳过了setThumbPath
但是在其他文件存储的handler中(如:本地 [LocalFileHandler:125](f8bd4febb9/src/main/java/run/halo/app/handler/file/LocalFileHandler.java (L125)), [TencentCosFileHandler:128](f8bd4febb9/src/main/java/run/halo/app/handler/file/TencentCosFileHandler.java (L128)))调用了handleImageMetadata default方法,该方法最后判断 thumbPath 为空时会将其设为 filePath
故在七牛云handler使用了handleImageMetadata 方法,使得其他类型文件也可以setThumbPath,并成功上传不会引发错误
#### Which issue(s) this PR fixes:
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes#2320
#### Special notes for your reviewer:
看到其他文件handler中[TencentCosFileHandler:130](f8bd4febb9/src/main/java/run/halo/app/handler/file/TencentCosFileHandler.java (L130))有一个 `uploadResult.setThumbPath(fullPath);` 好像是没有必要的,也在[HuaweiObsFileHandler](f8bd4febb9/src/main/java/run/halo/app/handler/file/HuaweiObsFileHandler.java (L116-L123))中不存在上述代码。
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
修复了七牛云做附件存储时附件无法上传非图片文件的问题
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
修复了在云端删除文件后,在Halo同时删除多个附件失败的bug。
Halo数据库里的附件并不会和云端文件实时同步,如果在云端删除文件多个后又在Halo删除,在删除第一个文件后则会抛出异常导致其它文件无法在halo的数据库中正常删除。这个PR通过删除在删除又拍云和七牛云的附件后判断返回状态和抛出异常的代码来解决这个问题。
#### Which issue(s) this PR fixes:
Fixes#2283
#### Special notes for your reviewer:
该bug只在七牛云和又拍云存在,其它云储存没有判断返回状态和抛出异常的代码,因此不存在这个问题。
#### Does this PR introduce a user-facing change?
```release-note
NONE
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
/kind bug
/area core
/milestone 1.5.x
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
#### What this PR does / why we need it:
修复文章内容查询问题导致 meta_description 内容生成为空
#### Which issue(s) this PR fixes:
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes#2281
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
修复文章内容查询问题导致的文章详情页 meta_description 为空
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
/kind improvement
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
#### What this PR does / why we need it:
访问后台管理时使用重定向,在有反向代理且配置不完善的情况下,会导致重定向的域名发生错误。
https://spring.io/guides/gs/serving-web-content/
#### Which issue(s) this PR fixes:
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes#2254
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
修改后台管理页面为直接渲染而不是重定向,以更好的兼容反向代理
```
* Issue-1790[feature] add pre handler for attachment files
* Issue-2121 remove exif from JPEG
* Issue-2121 add an 'enable' option in preHandler
* Issue-2121 add an 'enable' option in preHandler
* Issue-2121 remove useless code
* Issue-2121 ImageFileMultipartFile
* Issue-2121 change method name
* Issue-1720 remove useless annotation and add author on file
* Issue-1720
1. Modify for code review.
2. Keep 'Orientation' Exif tag for images.
* Issue-1720 for review
* Issue-1720 for review
* Issue-1720 remove all Exif
* Fixed the bug of not being able to query according to the content
The content table is associated at query time now.
* Update static file mappings on refresh
* feat:add more parameter in mail template
* Update CommentEventListener.java
* Update CommentEventListener.java
* Update CommentEventListener.java
* Deal with illegal character
* Update FilePathDescriptor.java
* 后端对链接进行encodeURI
* 删除之前无用的test
* Add some testcase for convertToDto
* checkstyle
* delete test
当前该测试用例貌似并不能在全平台上成功运行,所以废弃
* docs: update README.md and CHANGELOG.md for new version
Signed-off-by: Ryan Wang <i@ryanc.cc>
* Update CHANGELOG.md
Co-authored-by: guqing <38999863+guqing@users.noreply.github.com>
Co-authored-by: guqing <38999863+guqing@users.noreply.github.com>
* feat: word count optimization
Now it can accurately identify the number of words in English articles and mixed language articles with character fieds.
* checkstyle
* delete field charCount
* fix typo and add some complex unit test
* refine unit test
* uniform word count
* fix style
* Set transaction isolation to read_uncommitted due to @Async
Comment events handlers are executed asynchronously.
And default transaction isolation is read_committed,
so the handlers can not see the comments created by event dispatcher
Signed-off-by: johnniang <johnniang@fastmail.com>
* Use @TransactionalEventListener instead
Signed-off-by: johnniang <johnniang@fastmail.com>
* Fixed the bug of not being able to query according to the content
The content table is associated at query time now.
* Update static file mappings on refresh