Created site using PnP provisioning, but when published the template from based site, all the images references for Hero webpart removed.

Nikhil 6 Reputation points
2021-08-25T17:01:26.9+00:00

Hi,

Created site using PnP provisioning, using below link,

https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-pnp-provisioning

but when we published the template page from based site, all the thumbnail images removed for Hero webpart,
images are present under the siteAssets, still unable to find the reference.

on console, we are getting the error,

{SPURL}/_api/v2.1/sites/{URL},{Uid data}/lists/{Uid}/items/{UID}/driveItem/thumbnails/0/{UID}/content?preferNoRedirect=true&prefer=extendCacheMaxAge&clientType=modernWebPart

{"error":{"code":"itemNotFound","message":"Item not found"}}

Can you please help us to resolved the query.

Thanks

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2021-08-26T08:46:42.687+00:00

    Hi @Nikhil ,
    Could you please check the steps in the following link. These steps to build and provision the solution.
    https://github.com/pnp/sp-dev-fx-extensions/tree/main/samples/react-application-regions-footer
    https://github.com/pnp/sp-dev-fx-extensions/blob/main/samples/react-application-regions-footer/README.md


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2021-08-30T06:50:23.597+00:00

    Hi @Nikhil ,
    This is a little hard to debug without knowing what code you are using. Can you share the PnP Code you are using to set the hero web part?


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Nikhil 6 Reputation points
    2021-08-30T07:19:29.463+00:00

    Hi RaytheonXie-MSFT,

    Please find the below information,

    1) We have created the base template site.
    2) Extract the site using the PnP command and applied on test site:

    Connect-PnPOnline -URL "BaseTemplateSiteURL"
    Get-PnPSiteTemplate -Out "D:\templateCustom.xml" -Handlers "Lists" -ExcludeHandlers "SiteSecurity,TermGroups,Fields,ContentTypes,Navigation" -PersistBrandingFiles -IncludeAllPages -Force

    Connect-PnPOnline -URL "CustomTemplateAppliedSiteURL"
    Invoke-PnPSiteTemplate -Path "C:\templateCustom.xml" -ResourceFolder "C:\"

    3) All Images and copied to SiteAssests.

    4) All Webpart Working fine, but When we have Published the page from base template site, Hero WebPart thumbnail nt visible to us in all the sites(based site and the sites where the template is applied).

    5) Please find the below screenshot:
    127410-image.png

    6) Will Share the extracted xml if required.

    7) We found the related link for the issue.
    https://techcommunity.microsoft.com/t5/sharepoint/hero-web-parts-that-were-pnp-provisioned-images-are-flickering/m-p/325817

    Thanks,
    Nikhil


  4. Nikhil 6 Reputation points
    2021-09-06T08:02:52.137+00:00

    Hi,
    Issue for Hero WebPart fixed automatically, images looks fine for based template and sites where the custom template applied.

    Can you please confirm if its Microsoft issue, or fixed by Microsoft in background.

    Thanks,
    Nikhil

    0 comments No comments

  5. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.