Skip to content

Commit

Permalink
Merge pull request #949 from SubPointSolutions/dev
Browse files Browse the repository at this point in the history
SPMeta2 v1.2.100, Febuary 2017
  • Loading branch information
SubPointSupport authored Feb 9, 2017
2 parents c114214 + 799a8b1 commit b62321d
Show file tree
Hide file tree
Showing 54 changed files with 4,125 additions and 3,225 deletions.
2 changes: 1 addition & 1 deletion SPMeta2/SPMeta2.Build/m2.buildbaseline.xml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion SPMeta2/SPMeta2.CSOM.Standard/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.2.16305.1232")]
[assembly: AssemblyFileVersion("1.2.17040.0900")]
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using SPMeta2.Definitions;
using SPMeta2.Enumerations;
using SPMeta2.Utils;
using SPMeta2.Services;

namespace SPMeta2.CSOM.ModelHandlers.Base
{
Expand Down Expand Up @@ -146,20 +147,35 @@ public override void DeployModel(object modelHost, DefinitionBase model)
context.Load(newFileItem);
context.ExecuteQueryWithTrace();
var site = folderModelHost.HostSite;
var currentPageLayoutItem = FindPageLayoutItem(site, definition.FileName);
//var site = folderModelHost.HostSite;
//var currentPageLayoutItem = FindPageLayoutItem(site, definition.FileName);
//var currentPageLayoutItemContext = currentPageLayoutItem.Context;
//var publishingFile = currentPageLayoutItem.File;
var currentPageLayoutItemContext = currentPageLayoutItem.Context;
var publishingFile = currentPageLayoutItem.File;
//currentPageLayoutItemContext.Load(currentPageLayoutItem);
//currentPageLayoutItemContext.Load(currentPageLayoutItem, i => i.DisplayName);
//currentPageLayoutItemContext.Load(publishingFile);
currentPageLayoutItemContext.Load(currentPageLayoutItem);
currentPageLayoutItemContext.Load(currentPageLayoutItem, i => i.DisplayName);
currentPageLayoutItemContext.Load(publishingFile);
//currentPageLayoutItemContext.ExecuteQueryWithTrace();
currentPageLayoutItemContext.ExecuteQueryWithTrace();
// ** SIC.. found with Problem with url in MasterPageSettings #936
// https://github.com/SubPointSolutions/spmeta2/issues/936
// * /_catalogs/masterpage - would have 'Title' field (and correct content types)
// * /my-sub-web/_catalogs/masterpage - would NOT have 'Title' fiels so that provision fails
// so performing Title update only for the root web
if (folderModelHost.HostSite.ServerRelativeUrl == folderModelHost.HostWeb.ServerRelativeUrl)
{
TraceService.VerboseFormat((int)LogEventId.ModelProvisionCoreCall, "Updating master page 'Title' on the root web.", null);
newFileItem[BuiltInInternalFieldNames.Title] = definition.Title;
}
else
{
TraceService.VerboseFormat((int)LogEventId.ModelProvisionCoreCall, "Skipping master page 'Title' update. Subweb is detcted.", null);
}
newFileItem[BuiltInInternalFieldNames.Title] = definition.Title;
newFileItem["MasterPageDescription"] = definition.Description;
newFileItem[BuiltInInternalFieldNames.ContentTypeId] = PageContentTypeId;
Expand Down
Loading

0 comments on commit b62321d

Please sign in to comment.