Skip to content
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

Fixed bug with not correct PnPContext from ClientContext #676

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

danielpastoor
Copy link

When i use the "await PnPCoreSdk.Instance.GetPnPContextAsync" with a clientcontext with as example the following url: "https://cosmos.sharepoint.com/sites/cosmos". Then the function returns a PnPContext with the sharepoint admin url ("https://cosmos-admin.sharepoint.com/").

Steps to reproduce
Create a client context with a site url.
Use the clientcontext to create a pnpcontext with the following function: "await PnPCoreSdk.Instance.GetPnPContextAsync"
2: try it with clientcontext.Web.Context

Create a client context with a site url.
Use the clientcontext.Web.Context to create a pnpcontext with the following function: "await PnPCoreSdk.Instance.GetPnPContextAsync(web.Context as ClientContext)"
Expected behavior
Expected behavior is a copy of the clientcontext to pnpcontext.

Environment details (development & target environment)
pnp.core: 1.6.0

Additional info
I get this problem in pnp.Framework when I'm trying to get a site template then we can't find any pages because the pnp.core is target to the sharepoint admin url

I also created a issue for this but that can be closed if my fix is correct:
#671

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants