From 0e9ea54d0acbe826aa630b78d552f17683aab2f2 Mon Sep 17 00:00:00 2001 From: Abderahman88 Date: Fri, 24 Dec 2021 23:55:25 +0100 Subject: [PATCH 1/2] Bugfix retrieving fields from SitePages --- samples/react-advanced-page-properties/README.md | 1 + .../config/package-solution.json | 2 +- .../advancedPageProperties/AdvancedPagePropertiesWebPart.ts | 2 +- .../components/AdvancedPageProperties.tsx | 6 +++--- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/samples/react-advanced-page-properties/README.md b/samples/react-advanced-page-properties/README.md index 5e68db31c..b5766a17d 100644 --- a/samples/react-advanced-page-properties/README.md +++ b/samples/react-advanced-page-properties/README.md @@ -49,6 +49,7 @@ Version|Date|Comments -------|----|-------- 1.0.0|March 30, 2021|Initial release 1.0.1|September 22, 2021|Added support for multi-language sites +1.0.2|December 24, 2021|Fix retrieving fields from SitePages ## Minimal Path to Awesome diff --git a/samples/react-advanced-page-properties/config/package-solution.json b/samples/react-advanced-page-properties/config/package-solution.json index b96b110d7..ff2c68032 100644 --- a/samples/react-advanced-page-properties/config/package-solution.json +++ b/samples/react-advanced-page-properties/config/package-solution.json @@ -3,7 +3,7 @@ "solution": { "name": "Advanced Page Properties", "id": "daae06a2-8599-445c-93c0-3bd739305f56", - "version": "1.0.1.0", + "version": "1.0.2.0", "includeClientSideAssets": true, "isDomainIsolated": false, "developer": { diff --git a/samples/react-advanced-page-properties/src/webparts/advancedPageProperties/AdvancedPagePropertiesWebPart.ts b/samples/react-advanced-page-properties/src/webparts/advancedPageProperties/AdvancedPagePropertiesWebPart.ts index ebe204a94..7413bf6a2 100644 --- a/samples/react-advanced-page-properties/src/webparts/advancedPageProperties/AdvancedPagePropertiesWebPart.ts +++ b/samples/react-advanced-page-properties/src/webparts/advancedPageProperties/AdvancedPagePropertiesWebPart.ts @@ -68,7 +68,7 @@ export default class AdvancedPagePropertiesWebPart extends BaseClientSideWebPart private async getPageProperties(): Promise { Log.Write("Getting Site Page fields..."); - const list = await sp.web.lists.ensureSiteAssetsLibrary(); + const list = await sp.web.lists.ensureSitePagesLibrary(); const fi = await list.fields(); this.availableProperties = []; diff --git a/samples/react-advanced-page-properties/src/webparts/advancedPageProperties/components/AdvancedPageProperties.tsx b/samples/react-advanced-page-properties/src/webparts/advancedPageProperties/components/AdvancedPageProperties.tsx index b7f82838a..e21f26dcd 100644 --- a/samples/react-advanced-page-properties/src/webparts/advancedPageProperties/components/AdvancedPageProperties.tsx +++ b/samples/react-advanced-page-properties/src/webparts/advancedPageProperties/components/AdvancedPageProperties.tsx @@ -42,9 +42,9 @@ const AdvancedPageProperties: React.FunctionComponent Date: Mon, 3 Jan 2022 01:45:22 -0500 Subject: [PATCH 2/2] Updated the sample json --- samples/react-advanced-page-properties/assets/sample.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/react-advanced-page-properties/assets/sample.json b/samples/react-advanced-page-properties/assets/sample.json index 5ed788e3a..b1f6cf00d 100644 --- a/samples/react-advanced-page-properties/assets/sample.json +++ b/samples/react-advanced-page-properties/assets/sample.json @@ -15,7 +15,7 @@ "- Improved support for dates" ], "creationDateTime": "2021-03-30", - "updateDateTime": "2021-09-22", + "updateDateTime": "2021-12-24", "products": [ "SharePoint" ],