pnp / PnP-Sites-Core

Microsoft 365 Dev PnP Core component (.NET) targeted for increasing developer productivity with CSOM based solutions.
Other
415 stars 642 forks source link

Apply-PnPProvisioningTemplate WebParts - Toolbar etc #1089

Open LateNightDBA opened 7 years ago

LateNightDBA commented 7 years ago

Thank you for reporting an issue or suggesting an enhancement. We appreciate your feedback - to help the team to understand your needs, please complete the below template to ensure we have the necessary details to assist you. If you have a actual question, we would ask you to use SharePoint Developer Group at Microsoft Tech Community. Thanks!

Which PnP repository should you use to report the issue?

Please navigate to the appropriate repository by clicking on the link below and create your issue there. You can delete this section after you have navigated to the correct repository.

Category

[# ] Bug [ ] Enhancement

Environment

[# ] Office 365 / SharePoint Online [ ] SharePoint 2016 [ ] SharePoint 2013

If SharePoint on-premises, what's exact CU version:

Expected or Desired Behavior

If you are reporting a bug, please describe the expected behavior. If you are suggesting an enhancement please describe thoroughly the enhancement, how it can be achieved, and expected benefit. BUG: Provisioning using Apply-PnPProvisioningTemplate majority of web parts default without desired view, full toolbar and search available.

Observed Behavior

If you are reporting a bug, please describe the behavior you expected to occur when performing the action. If you are making a suggestion, you can delete this section. Source site has a number of web parts on home page, standard type parts, Announcements, lists etc. when applying template these web parts all default with full toolbar and search available.

Steps to Reproduce

If you are reporting a bug please describe the steps to reproduce the bug in sufficient detail to allow testing. Only way to fix things properly, is to have sufficient details to reproduce it. If you are making a suggestion, you can delete this section. Create home page with desired web parts and views, toolbar, Chrome, search options applied. Execute following Powershell to create template. Excluding workflows as I can not also get this to provision well. Get-PnPProvisioningTemplate -Out ZZZ-DEV-template.pnp -PersistMultiLanguageResources -ResourceFilePrefix MyResources -ExcludeHandlers Workflows -Web 'ZZZ'

Now apply template to another site (within same collection) another issue when crossing collection with content types etc. Apply-PnPProvisioningTemplate -Path ZZZ-DEV-template.pnp -ClearNavigation -Web 'DestinationWeb';

Apply: Successful, though a number of web parts now default with FULL TOOLBAR and search & Chrome options now on. NOT as defined in Source web site.

Note: I have similar problwm when deploying webparts individually using Add-PnPWebPartToWebPartPage and unable to simple change these options.

Thanks for your contribution! Sharing is caring.

jansenbe commented 7 years ago

@LateNightDBA , thx for logging this. We'll need to investigate this.

jansenbe commented 7 years ago

Issue could be reproduced, so marking as bug.

Internal testing feedback. Followed the steps as mentioned by the user. Provisioned template into new site and subsite. Web parts toolbar property is defaulting to “Full toolbar” Source: Site Assests -> Toolbar Type="None" Announcement -> Toolbar Type="Freeform"

Destination template: Site Assests -> Toolbar Type="Standard" Announcement -> Toolbar Type="Standard"

MethodInTheMadness commented 7 years ago

Hello,

I've also replicated this behaviour. I am exporting and importing multiple v3 schema XsltListViewWebParts from a template site collection to a brand new one. All of these webparts do not seem to be exported with any properties pertaining to the toolbar in the xml.

Out of curiosity I tried throwing in a but it changed nothing.

allemaalvisjes commented 7 years ago

I concur: setting toolbar type in the template is ignored.

Bodewes commented 7 years ago

This also applies to toolbar settings in listviewpages (e.g. AllItems.aspx of a list).

pabak commented 7 years ago

When will this bug be solved? I'm having the same problem, views on webparts are not applied on target site.

imthecritic commented 6 years ago

Is there any update on this bug?

kannan-balasubramanian commented 6 years ago

Is there any update on this?

Even if I modify the template xml file and set Toolbar Type="None", still that is not applied to the specific web-part.

NicCarlos commented 5 years ago

I have tried any possible way and I still can't get it to work, so I do not think this is fixed yet.