Skip to content

fix: handle IllegalArgumentException for stale portlet URLs#2924

Merged
bjagg merged 2 commits into
uPortal-Project:masterfrom
bjagg:fix/stale-portlet-url-error-master
Mar 19, 2026
Merged

fix: handle IllegalArgumentException for stale portlet URLs#2924
bjagg merged 2 commits into
uPortal-Project:masterfrom
bjagg:fix/stale-portlet-url-error-master

Conversation

@bjagg

@bjagg bjagg commented Mar 19, 2026

Copy link
Copy Markdown
Member

Summary

  • Cherry-pick of fix: handle IllegalArgumentException for stale portlet URLs #2916 (targeting rel-5-17-patches) forward to master
  • Wrap getPortletWindowId() call in parsePortletParameterName() with try-catch for IllegalArgumentException, matching the existing pattern in parsePortletWindowIdSuffix() and the delegate mapping handler
  • Change two verbose log lines from info to debug in ClassicMaxInactiveStrategy and PersonalizerImpl

Context

Stale/bookmarked URLs referencing deleted portlet definitions (e.g. pCa=27_ctf9_142032 where portlet def 27 no longer exists) cause an unhandled IllegalArgumentException that propagates to ExceptionLoggingFilter and returns a 500 to the user. The fix catches this gracefully — logs a warning and continues rendering the page without the stale portlet reference.

Test plan

  • Existing UrlSyntaxProviderImplTest updated with test for stale portlet entity IDs
  • Verify stale portlet URLs no longer produce 500 errors in a running portal

🤖 Generated with Claude Code

bjagg and others added 2 commits March 19, 2026 09:45
…ortletParameterName

When a portlet is removed but a user still has a stale URL referencing it,
UrlSyntaxProviderImpl.parsePortletParameterName throws an unhandled
IllegalArgumentException from portletWindowRegistry.getPortletWindowId(),
resulting in a 500 error. This wraps the call in a try-catch to match the
existing pattern in parsePortletWindowIdSuffix, logging a warning and
gracefully ignoring the stale parameter.

Also re-enables UrlSyntaxProviderImplTest (was @ignore'd) and adds tests
covering both parsePortletParameterName and parsePortletWindowIdSuffix
with invalid portlet entities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bjagg bjagg merged commit af00697 into uPortal-Project:master Mar 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant