-
Notifications
You must be signed in to change notification settings - Fork 152
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
Additional changes for fix #498 #562
Conversation
The previously made changes for fix pnp#498 were missing changes required for provisioning the header information. Additional changes: * Removed case for "HeaderLayoutType.Standard" in "ExtractObjects", because "default" already handles this. * Removed "scope" variable, because it is not used. * Removed the "Emphasis" type reference from "Enum.TryParse", because the "out" variable already specifies the type. * "ProvisionObjects" now exits as soon as possible if no changes are required. This also moves a possible server call for loading the web URL to a state, were this information would be required. * Introduced some (single) blank lines to increase the readability of the code.
Hi ?? I was working on this issue and I also made same changes like you and then found this pull request. |
If we don't do the I was getting this issue and the w.Url is not used :) |
In some cases the "HeaderLayout" property will not be set and cause a "PropertyOrFieldNotInitializedException" when accessing it later on. Loading the existing value fixes this and will (in those cases) apply the already set value again. Loading the web URL is also not required, because "ExecutePostAsync" will ensure it again.
Even if "ExecutePostAsync" ensures the property itself, loading the web URL beforehand will save us an additional round trip to the server.
@PedroMordeP You are right. I also stumbled up on this exception during previous tests. A temporary fix is to load the web or specifically the Also loading
|
The previously made changes for fix #498 were missing changes required for provisioning the header information.
Additional changes:
HeaderLayoutType.Standard
inExtractObjects
, becausedefault
already handles this.scope
variable, because it is not used.Emphasis
type reference fromEnum.TryParse
, because theout
variable already specifies the type.ProvisionObjects
now exits as soon as possible if no changes are required.