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

Fix the problem with Template#getFragment() on quarkus 3.5+ #54

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ private void handlePage(RoutingContext rc) {
// It is possible to specify the fragment via query param, e.g. /item?frag=detail
String fragmentId = rc.request().getParam(FRAGMENT_PARAM);
if (fragmentId != null) {
Fragment fragment = template.getFragment(fragmentId);
// Note that we have to use the original instance to obtain the fragment
// because getFragment() invoked upon the injectable template returns an injectable fragment and never null
Fragment fragment = originalInstance.getTemplate().getFragment(fragmentId);
if (fragment == null) {
LOG.errorf("Fragment [%s] not found: %s", fragmentId, rc.request().path());
rc.response().setStatusCode(404).end();
Expand Down