Events web part in a Team Site is broken when provisioned with PnP template

Copper Contributor

Description of the issue:

When provisioning a site page which contains an Events web part with a PnP provisioning template to Team site (not Communication site), the Events web part is broken.




We tried exporting an existing Team site page with an unconfigured Events web part and using the generated code in our PnP provisioning template.


It seems that the web part is looking for the list ID, but the Events list is not initially created on a Team site. Adding an Events web part manually to a page works fine, even if an Events list does not exist on the Team site; this error only happens when the Events web part is provisioned to a page.



What we expect:

We would expect that the Events web part would be added to the page as if you were adding one manually, without it being broken.


Steps to reproduce:

  1. On a Team site, add the Events web part to a page
  2. Run a PnP.PowerShell script to export the page contents to a PnP provisioning template:
    1. Connect to your site:
      Connect-PnPOnline -url https://your-team-site-url -Interactive
    2. Export the page:
      Export-PnPPage -Identity pagename.aspx -Out C:\path-to-your-file\nameOfExportedFile.xml
  3. Deploy the PnP provisioning template to a new Team site:
    1. Connect to the new site:
      Connect-PnPOnline -url https://your-new-team-site-url -Interactive
    2. Provision the template:
      Invoke-PnPSiteTemplate -Path C:\path-to-your-file\nameOfExportedFile.xml
  4. View the site page in a browser. The events web part will be broken.
0 Replies