-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect ~site token resolution for CSOM for the subwebs #863
Comments
SubPointSupport
changed the title
Incorrect ~site token resolution for CSOM
Incorrect ~site token resolution for CSOM for the subwebs
Aug 3, 2016
Added the following tests to ensure correct ~site token replacement.
SSOM passes. |
SubPointSupport
added a commit
that referenced
this issue
Aug 6, 2016
+ added tests * Can_Replace_Site_Token_On_RootWeb * Can_Replace_Site_Token_On_SubWeb * Can_Replace_Site_Token_On_SubSubWeb * CSOMTokenReplacementService_Should_Support_ClientContext * CSOMTokenReplacementService_Should_Support_SiteModelHost * CSOMTokenReplacementService_Should_Support_WebModelHost
SubPointSupport
added a commit
that referenced
this issue
Aug 6, 2016
+ Passed Can_Replace_Site_Token_On_RootWeb, Can_Replace_Site_Token_On_SubWeb and Can_Replace_Site_Token_On_SubSubWeb tests + CSOMTokenReplacementService has AllowClientContextAsTokenReplacementContext flag (false for regression testing, true for production) + CSOMTokenReplacementService and client context reengineering across CSOM model handlers, always pass CSOM model host instead of ClientContext + full CSOM regression testing
Added the following tests, all passed. CSOM re-engineering for all CSOM based model handler, full CSOM regression testing.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue
The following model would resolve the ~site token incorrectly, as the curretn sitecollection URL. In fact, all sub-webs' navigation would resolve ~site token as the web URL in the current, giving ClientContext.
Token resolution for CSOM uses the current ClientContext instead of the "host web", so that all ~site token would always be resolved to the ClientContext's web even for the sub-webs.
Workaround
As a workaround, create a separate model for the subweb, create a new ClientContext and deploy the sub-web with the new ClientContex. In that case, ClientContext would have correct web and the token would be resolved to that web.
Will be fixed in the further SPMeta2 releases.
The text was updated successfully, but these errors were encountered: