| Summary: | {OrionHome} is relative in plugins | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Malgorzata Janczarska <malgorzata.tomczyk> |
| Component: | Client | Assignee: | Project Inbox <orion.client-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | simon_kaegi |
| Version: | 3.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
Ah... ok in those cases should use orion/URL-shim to get us an absolute url.
e.g.
var url = new URL(require.toUrl("jazz/Extra/Project"), window.location.href).href;
(In reply to comment #1) > Ah... ok in those cases should use orion/URL-shim to get us an absolute url. OK |
When we create links in plugins using orion.page.link and orion.page.link.related we can use {OrionHome} variable. It used to be an absolute path, now it's relative. It's OK when we want to use it in the host part of the link, but the problem occurs when we want to use it to generate locations for the hash. Then we are adding relative paths to the hash, but the paths are not relative to the target page, but to the page on which the generated links are shown. Example link for orion server running on localhost:8080/cc/: http://localhost:8080/cc/jazzui/project.html#../jazz/Extra/Project?url=https://jazzdev02.torolab.ibm.com:9443/jazz02/&name=Perfect%20Storm&uuid=_78LbwHrPEeKwv5G_HYY8SA&user=mtomczyk instead of "../jazz/Extra" we should have "localhost:8080/cc/jazz/Extra".