fix: resolve pages requested with trailing slash #25264#35151
fix: resolve pages requested with trailing slash #25264#35151
Conversation
Strip trailing slash from CMS_FILTER_URI_OVERRIDE in CMSFilter and add early-exit for internal/backend URLs in CMSUrlUtil.resolveResourceType. Also improves null-safety checks using UtilMethods.isSet() and adds integration test verifying trailing-slash page resolution. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
These changes are local-only and should not be on this branch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @wezell's task in 2m 5s —— View job PR Review
Three issues worth fixing; the rest is fine. 1. Config property name mismatch (bug in docs / potential user confusion)The PR description says the feature can be disabled with // CMSUrlUtil.java:194
Config.getBooleanProperty("STRIP_TRAILING_SLASH_FROM_PAGES", true)dotCMS env-var overrides use the 2.
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
CMS_FILTER_URI_OVERRIDEinCMSFilterso page URIs like/about-us/index/resolve correctlyCMSUrlUtil.resolveResourceType()for internal/backend URLs to avoid unnecessary identifier lookupsUtilMethods.isSet()inresolvePageAssetSubtype()DOT_STRIP_TRAILING_SLASH_FROM_PAGES=falseTest plan
FiltersTest#shouldResolvePageWithTrailingSlash— verifies both/path/pageand/path/page/resolve to 200 with correct URI overrideFiltersTesttests still pass🤖 Generated with Claude Code
This PR fixes: #25264