[BLOSSOM-220] UuidRedirectView prefixes url with handle, ignores domain Created: 11/Aug/15  Updated: 25/Jul/16  Resolved: 13/Nov/15

Status: Closed
Project: Blossom
Component/s: None
Affects Version/s: 3.1
Fix Version/s: 3.1.1

Type: Bug Priority: Neutral
Reporter: Robert Mikoda Assignee: Tobias Mattsson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

UuidRedirectView uses method LinkUtil.convertUUIDtoURI(uuid, workspace). This method currently calls: LinkTransformerManager.getInstance().getAbsolute(false).transform(createLinkInstance(workspaceName, uuid))
returning /siteName/page.html
following works better:
LinkTransformerManager.getInstance().getAbsolute(true).transform(createLinkInstance(workspaceName, uuid)):
/page.html
where getAbsolute parameter is boolean addContextPath - this setting affects more than it's documented:

Creates instance of absolute link transformer that will optionally prepend the context path, but will always use URI2Repository mapping while constructing links and will localize the link if localization is set up.

Also UuidRedirectViewResolver creates UuidRedirectView directly. Wouldn't it be better to use Components.newInstance here?



 Comments   
Comment by Tobias Mattsson [ 14/Aug/15 ]

Changing it to LinkUtil.createLink(workspace, uuid) which will return correct links including domains from site definitions.

I'm not creating UuidRedirectView using Components.newInstance because it has two String parameters. Components.newInstance uses a dependency injection approach and will inject both parameters with the first String it finds given to it.

3.1.1-SNAPSHOT will be available shortly with this fix included, please verify that it solves your problem.

Comment by Jan Haderka [ 25/Jul/16 ]

Bulk close of all old resolved tickets.

Generated at Sun Feb 11 23:31:20 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.