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

Remove route when single pages become unpublished #4318

Merged
merged 1 commit into from Jul 28, 2023

Conversation

JohnNiang
Copy link
Member

What type of PR is this?

/kind bug
/area core
/milestone 2.8.x

What this PR does / why we need it:

  • Remove route when single pages become unpublished
  • Add some unit tests against the change.

Which issue(s) this PR fixes:

Fixes #4309

Special notes for your reviewer:

  1. Create a single page with slug name about.html and publish it.
  2. Create a static file about.html into static folder${halo.work-dir}/static/.
  3. Try to request http://localhost:8090/about.html and check the result.
  4. Unpublish the single page and then do the step 3 again.

Does this PR introduce a user-facing change?

修复页面取消发布后访问仍然出现页面未找到错误。

@f2c-ci-robot f2c-ci-robot bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jul 27, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.8.x milestone Jul 27, 2023
@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. area/core Issues or PRs related to the Halo Core labels Jul 27, 2023
@f2c-ci-robot f2c-ci-robot bot requested review from minliacom and ruibaby July 27, 2023 09:43
@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #4318 (68bdd7e) into main (4f1537b) will increase coverage by 0.35%.
Report is 2 commits behind head on main.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #4318      +/-   ##
============================================
+ Coverage     60.61%   60.96%   +0.35%     
+ Complexity     2498     2490       -8     
============================================
  Files           370      368       -2     
  Lines         13048    12907     -141     
  Branches        936      923      -13     
============================================
- Hits           7909     7869      -40     
+ Misses         4679     4585      -94     
+ Partials        460      453       -7     
Files Changed Coverage Δ
...ava/run/halo/app/theme/router/SinglePageRoute.java 90.19% <100.00%> (+24.88%) ⬆️

... and 22 files with indirect coverage changes

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Jul 28, 2023
Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
meet expectation 🎉

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Jul 28, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guqing

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 54925ef into halo-dev:main Jul 28, 2023
4 checks passed
@JohnNiang JohnNiang modified the milestones: 2.8.x, 2.8.0 Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

静态资源名称与未发布的文章/页面别名相同时访问返回 404
3 participants