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

uploading a Page Layout to MasterPage Gallery #11

Open
sfarq opened this issue Sep 13, 2016 · 1 comment
Open

uploading a Page Layout to MasterPage Gallery #11

sfarq opened this issue Sep 13, 2016 · 1 comment

Comments

@sfarq
Copy link

sfarq commented Sep 13, 2016

Loving the tool a lot.
However I have an issue. I am trying to use this method to upload some new publishing page layouts, with correct meta data. it all works great until i try to set the PublishingAssociatedContentType property. It fails with "Unable to update metadata of the file".

I believe that the problem is the PublishingAssociatedContentType field name. However, this is the correct internal field name for updating it in CSOM. So i have also tried different values / different combinations of values (including valid CSOM values) to no avail... (see below for the different ones i tried)

Any thoughts?
Thanks Simon

Here is the gulpfile.js (note when i take OUT the PublishingAssociatedContentType it all works but does not set the necessasy associated content type field value...)

Removed top part of GULPFILE.JS
` "verbose": true,
"update_metadata": true,
"files_metadata": fileMetadata
})).
pipe(gulp.dest('build'));
});

var fileMetadata = [
{
name: 'SimonsPL.aspx',
metadata: {
"__metadata": { type: "SP.Data.OData__x005f_catalogs_x002f_masterpageItem" },
Title: 'Simons Page Layout',
MasterPageDescription: 'This is a page layout for me',
ContentTypeId: '0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811',
PublishingAssociatedContentType: "0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064 }
}
];

//PublishingAssociatedContentType: ';#Welcome Page;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D4;#',
DEA0F50FC8C147B0B6EA0636C4A7D4"

// PublishingAssociatedContentType: ';#Welcome Page;0x010100c568db52d9d0a14d9b2fdcc96666e9f2007948130ec3db064584e219954237af390064dea0f50fc8c147b0b6ea0636c4a7d4;#'`

@madenorth
Copy link

Hi @sfarq

Did you manage to get this working?

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

No branches or pull requests

1 participant