Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 420443

Summary: URI page link service uriTemplate not resolving properly
Product: [ECD] Orion Reporter: Chris McGee <cbmcgee>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Chris McGee CLA 2013-10-26 22:04:15 EDT
When adding a page link using the service like this the browser is redirecting to an invalid URL:

    provider.registerServiceProvider("orion.page.link", {}, {
        name: "My Search",
        id: "my.search",
        uriTemplate: "{OrionHome}/my/search.html"
        });

When I invoke this page link from the editor page the browser is redirecting to a URL like this:

http://127.0.0.1:2022/edit/http:/127.0.0.1:2022/my/search.html#location=%2Ffile%2Fhello

In previous milestones of Orion the URL would redirect like this:

http:/127.0.0.1:2022/my/search.html#location=%2Ffile%2Fhello
Comment 1 Mark Macdonald CLA 2013-10-26 23:12:52 EDT
You can fix this by changing your uriTemplate to prefix the OrionHome variable with a +, eg.

>        uriTemplate: "{+OrionHome}/my/search.html"

The plus causes the OrionHome variable to be inserted without %-encoding. see bug 419627
Comment 2 Chris McGee CLA 2013-10-28 08:54:46 EDT
Thanks for the tip. Things are working again after using the + qualifier.
Comment 3 Mark Macdonald CLA 2013-10-28 11:40:39 EDT
Marking INVALID. 

This was a breaking change in Orion 4.0 for many extensions that supplied a URI template, but unfortunately it had to be done to fix encoding issues.