-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
refactor: head and footer tag injection to skip error pages #6709
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6709 +/- ##
============================================
+ Coverage 57.03% 57.05% +0.01%
- Complexity 3978 3985 +7
============================================
Files 713 714 +1
Lines 23992 24039 +47
Branches 1570 1575 +5
============================================
+ Hits 13685 13715 +30
- Misses 9696 9711 +15
- Partials 611 613 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue 描述的问题是:当因为 TemplateFooterElementTagProcessor 或者 GlobaleadInjectionProcessor 发生错误时,才忽略这些错误直接渲染。而不是发生错误渲染错误页面的时候就忽略这两个 Processor 了。
错误页面本身也就不需要注入,况且如果只是 GlobaleadInjectionProcessor 发生错误时如果要忽略那应该是扩展自己通过 onErrorResume 忽略,而不是由 GlobaleadInjectionProcessor 来忽略错误,参考 #6479 |
application/src/main/java/run/halo/app/theme/dialect/GlobalHeadInjectionProcessor.java
Outdated
Show resolved
Hide resolved
application/src/main/java/run/halo/app/theme/PageInjectionExcluderImpl.java
Outdated
Show resolved
Hide resolved
application/src/main/java/run/halo/app/theme/PageInjectionExcluderImpl.java
Outdated
Show resolved
Hide resolved
application/src/main/java/run/halo/app/theme/PageInjectionExcluderImpl.java
Outdated
Show resolved
Hide resolved
application/src/main/java/run/halo/app/theme/dialect/InjectionExcluderProcessor.java
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JohnNiang 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 |
What type of PR is this?
/kind improvement
/area core
/milestone 2.20.x
What this PR does / why we need it:
模板 head 和 footer 标签注入功能忽略错误页面避免当扩展发生错误时导致错误页面无法显示
Which issue(s) this PR fixes:
Fixes #6500
Fixes #6750
Does this PR introduce a user-facing change?