Forum Discussion

labrunning's avatar
labrunning
Copper Contributor
Jul 19, 2021
Solved

Document Library greyed out on Image Gallery web part

I'm trying to add an Image gallery web part to a new SharePoint Online site (Team site template) with lots of images in a few document libraries. These are regular plain Document Libraries. However t...
  • ganeshsanap's avatar
    ganeshsanap
    Aug 04, 2021

    OpenBoxChris labrunning 

    I too have seen this behavior on my SharePoint site and I think this is a bug in SharePoint code (API call) which retrieves document libraries from current site to bind to the dropdown control.

     

    I noticed below error in developer console of browser when I selected Dynamically display images from a document library option in web part settings:

     

    The expression "Id,Title,RootFolder%2FServerRelativeUrl" is not valid.

     

    & the API call request causing this error is: 

     

    https://<tenant>.sharepoint.com/sites/<siteName>/_api/web/lists?%24select=Id%2CTitle%2CRootFolder%252FServerRelativeUrl&%24filter=BaseTemplate+eq+101&%24orderby=Title+asc&%24expand=RootFolder

     

     

    But, ideally it should be like: 

     

    https://<tenant>.sharepoint.com/sites/<siteName>/_api/web/lists?$select=Id,Title,RootFolder,ServerRelativeUrl&$filter=BaseTemplate eq 101&$orderby=Title asc&$expand=RootFolder

     

    Hope it will help you & Microsoft to troubleshoot this issue.

    CC: VesaJuvonen Mark-Kashman


    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Resources