You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 }
}
];
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;#'`
The text was updated successfully, but these errors were encountered: