| Summary: | [Sites] View on Site and Sites page does not work for remote sites services | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Szymon Brandys <Szymon.Brandys> |
| Component: | Client | Assignee: | Szymon Brandys <Szymon.Brandys> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | ken_walker, mamacdon |
| Version: | 1.0 | ||
| Target Milestone: | 2.0 M1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | integrations_sb | ||
| Bug Depends on: | |||
| Bug Blocks: | 395898, 395901 | ||
|
Description
Szymon Brandys
One place to start debugging would be orion/sites/siteClient.js -- the forFileLocation() code (lines 145-179 in particular) is responsible for finding a site service that can deal with a given file service. Perhaps this code is making an invalid assumption about the host page's domain matching the service's domain, or it's not resolving URLs correctly or something. (just an initial guess) I pushed a simple fix for 'View on Site' page. Now if you try to use 'View on Site' action for a remote fs, you will at least see the list of remote sites. However 'Add to site' still does not work :| I''l keep working on it. I found two more issues - I can see the list of all sites, but can start/stop just those local ones - in my case (I have remote fs and sites service plugged in) 'View on Site' action in the navigator is shown just for the remote files, but not for the local one :( "I can see the list of all sites, but can start/stop just those local ones" - this is fixed now. Mark, when I add a mapping, is there some magic happening with adding some access rights to mapped folders? "in my case (I have remote fs and sites service plugged in) 'View on Site' action in the navigator is shown just for the remote files, but not for the local one" - fixed too The only missing part is the problem with mapping. We'll try to investigate that too. The last problem was the workspace name used in
siteCommand.js#createSiteServiceCommands around line 44
See this code:
return fileService.loadWorkspaces().then(function(workspaces) {
return mSiteClient.forFileLocation(serviceRegistry, file.Location).mapOnSiteAndStart(site, file, workspaces[0].Id);
}).then(data.userData.addToCallback, data.userData.errorCallback);
If you dig deeper into the code, you will see that always the default workspace (the one connected to the default filesystem) is used.
So if I try to create a site using a remote filesystem, this will not work.
However the check against the workspace on the server side is not required. The one against the file is enough.
So I just removed the workspace check and left the file one. See HostedSiteServlet#serveOrionFile.
I will raise a separate bug the get rid of workspace name from the site js api.
|