Open dadams39 opened 1 year ago
Discovered Beta libraries do not properly dereference 2 fields within models.TitleArea().GetAdditionalData()
.
authors Failed: []*jsonserialization.JsonParseNode
authorByline Failed: []*jsonserialization.JsonParseNode
and causes the following error:
invalidRequest [page] An unexpected 'StartObject' node was found for property named '' when reading from the JSON reader. A 'PrimitiveValue' node was expected.
Unfortunately, these two items cannot be skipped over as the absence of these in fields in additional data cascades into an error for the field
authorByline@odata.type PTR Value: #Collection(String)
Error Details: invalidRequest [page] A property 'authorByline' which only has property annotations in the payload but no property value is an open property.
In OData, open property must be represented as a property with value.
More troubleshooting is required to be able to identify which component is causing the
invalidRequest Invalid request
Error
Create / Publish works with Generic file.
{
"@odata.type": "#microsoft.graph.sitePage",
"name": "test.aspx",
"canvasLayout": {
"horizontalSections": [
{
"columns": [
{
"webparts": [],
"width": 8
},
{
"webparts": [],
"width": 4
}
],
"emphasis": "none",
"layout": "oneThirdRightColumn"
}
]
},
"pageLayout": "article",
"showComments": true,
"showRecommendedPages": false,
"title": "test",
"titleArea": {
"enableGradientEffect": true,
"imageWebUrl": "/_LAYOUTS/IMAGES/VISUALTEMPLATETITLEIMAGE.JPG",
"layout": "colorBlock",
"showAuthor": true,
"showPublishedDate": false,
"showTextBlockAboveTitle": false,
"textAboveTitle": "TEXTABOVETITLE",
"textAlignment": "left",
"title": "sample1",
"hasTitleBeenCommitted": false,
"imageSourceType": 2,
"imgWidth": 3015,
"imgHeight": 2013
},
"webParts": []
{
"@odata.type": "#microsoft.graph.sitePage",
"name": "testFile.aspx",
"parentReference": {
"siteId": "<SiteID>"
},
"canvasLayout": {
"horizontalSections": [
{
"columns": [
{
"webparts": [
{
"@odata.type": "#microsoft.graph.standardWebPart",
"data": {
"audiences": [],
"dataVersion": "1.0",
"description": "Add a clickable button with a custom label and link.",
"properties": {
"alignment": "Left"
},
"serverProcessedContent": {
"htmlStrings": [],
"imageSources": [],
"links": [
{
"key": "linkUrl",
"value": "/sites/HealthandWellness"
}
],
"searchablePlainTexts": [
{
"key": "label",
"value": "Home"
}
]
},
"title": "Button"
},
"webPartType": "0f087d7f-520e-42b7-89c0-496aaf979d58"
},
{
"@odata.type": "#microsoft.graph.standardWebPart",
"data": {
"audiences": [],
"dataVersion": "1.1",
"description": "Add a line to divide areas on your page.",
"properties": {
"length": 100,
"weight": 1
},
"serverProcessedContent": {
"htmlStrings": [],
"imageSources": [],
"links": [],
"searchablePlainTexts": []
},
"title": "Divider"
},
"webPartType": "2161a1c6-db61-4731-b97c-3cdb303f7cbb"
},
{
"@odata.type": "#microsoft.graph.standardWebPart",
"data": {
"audiences": [],
"dataVersion": "1.0",
"description": "Show a document library from this site.",
"properties": {
"selectedListUrl": "/sites/HealthandWellness/Shared Documents",
"webRelativeListUrl": "/Shared Documents",
"webpartHeightKey": 4,
"selectedViewId": "d3d77d92-a8a7-4093-ba3f-3efd9c011e4d",
"isDocumentLibrary": true,
"selectedListId": "30fde749-0b81-4fb3-9b9d-ef794058e137"
},
"serverProcessedContent": {
"htmlStrings": [],
"imageSources": [],
"links": [],
"searchablePlainTexts": [
{
"key": "listTitle",
"value": "Documents"
}
]
},
"title": "Document library"
},
"webPartType": "f92bf067-bc19-489e-a556-7fe95f508720"
}
],
"width": 12
}
],
"emphasis": "none",
"layout": "oneColumn"
}
]
},
"contentType": {
"name": "Site Page"
},
"pageLayout": "article",
"promotionKind": "newsPost",
"reactions": {},
"showComments": true,
"showRecommendedPages": false,
"thumbnailWebUrl": "https://cdn.hubblecontent.osi.office.net/m365content/publish/0079276a-86a3-468b-9ef7-a9c703736236/thumbnails/large.jpg?file=640274128.jpg",
"title": "Self Care",
"titleArea": {
"enableGradientEffect": true,
"imageWebUrl": "https://cdn.hubblecontent.osi.office.net/m365content/publish/0079276a-86a3-468b-9ef7-a9c703736236/640274128.jpg",
"layout": "imageAndTitle",
"serverProcessedContent": {
"customMetadata": [
{
"key": "imageSource",
"value": {
"width": 3015,
"height": 2013
}
}
],
"htmlStrings": [],
"imageSources": [
{
"key": "imageSource",
"value": "https://cdn.hubblecontent.osi.office.net/m365content/publish/0079276a-86a3-468b-9ef7-a9c703736236/640274128.jpg"
}
],
"links": [],
"searchablePlainTexts": []
},
"showAuthor": true,
"showPublishedDate": false,
"showTextBlockAboveTitle": false,
"textAboveTitle": "",
"textAlignment": "left",
"imgWidth": 3015,
"imgHeight": 2013,
"title": "Self Care",
"hasTitleBeenCommitted": false,
"imageSourceType": 2
},
"webParts": []
}
CanvasLayout
, and WebParts
as these have separate APIs for uploading as well. service.Client().SitesById(siteID).Pages().ToPostRequestInformation(ctx, newPage, nil)
defined here. This gives all the information to make the same call in Postman, the request fails here as well. There has been movement in regard to this ticket. As of today, the described object can be created. There are failures during publishing. The issue has been escalated to the Q&A forums.
The error on publishing does not prevent the object from being published and the page is visible following the failed command.
Zehui Yao_MSFT • Follow 3,431 Reputation points• Microsoft Employee Jan 31, 2023, 3:11 AM Hi @totally_gizmo we are currently doing research on this issue and will let you know as soon as possible.
Adding tracking for text area serialization error:
Restore Complication
Create API fails to restore live
Site Page
due to absolute paths present within the@odata.Context
of nested components.Hydration of objects does not fail with these paths.
Area of failure concerns components horizontal and vertical sections
Related to #2224