SpRestLib icon indicating copy to clipboard operation
SpRestLib copied to clipboard

SP.Folder does not return data related to current site

Open SDToews opened this issue 6 years ago • 0 comments
trafficstars

#site location of code: /sites/uat/vanilla

code:

 script.onload = function () {
       sprLib.folder("SiteAssets").info().then(objSiteInfo => console.log(objSiteInfo));
       }

results:

Created: "2018-09-05T16:25:54" FolderCount: 9 HasSubdirs: true HasUniqueRoleAssignments: false Hidden: false ItemCount: 13 ListGUID: "{CB79ACA3-9E86-4C55-8DCE-88E6CD0E14ED}" Modified: "2019-03-19T22:02:33" Name: "SiteAssets" ServerRelativeUrl: "/sites/UAT/SiteAssets" TotalSize: 4812042

alternate code:

script.onload = function () {
    sprLib.folder("/sites/uat/vanilla/SiteAssets").info().then(objSiteInfo => console.log(objSiteInfo));
    }

alternate results:

Uncaught (in promise) (404) List does not exist.

The page you selected contains a list that does not exist. It may have been deleted by another user.

URL used: ../_api/web/Lists(guid'5519F739-A6AB-4D49-ABF1-EC6348B314AD')/rootFolder/Folders?$select=ListItemAllFields/Id&$expand=ListItemAllFields

Notes:

may be related/similar to issue #27 GUID in alternate results is correct for the list requested.

SDToews avatar May 10 '19 17:05 SDToews