Open konraplo opened 8 years ago
Now This Bus is also in Master Branch ;)
Updating custom action in 2013 indeed errors out. We've seen the same in our unit testing and actually skipped 2013 in this part of the testing. This seems to be related to a product bug, not an engine issue. More research is needed
I have following scenario: Provisioning Template with 2 custom actions: CustomAction Name="GlobalNavScriptLink" Location="ScriptLink" Sequence="1000" Rights="" ScriptSrc="~sitecollection/SiteAssets/GlobalNavScript.js" RegistrationType="None"
CustomAction Name="JQueryScriptLink" Location="ScriptLink" Sequence="100" Rights="" ScriptSrc="~sitecollection/SiteAssets/jquery-2.1.4.js" RegistrationType="None"
After first provision it is all ok but if I try to provision it second time on the same Web - exception comes. The problem is in ObjectCustomAction->UpdateCustomAction Method. In this method it is something like this: // Otherwise we update it if (customAction.CommandUIExtension != null) { if (existingCustomAction.CommandUIExtension != parser.ParseString(customAction.CommandUIExtension.ToString())) { scope.LogPropertyUpdate("CommandUIExtension"); existingCustomAction.CommandUIExtension = parser.ParseString(customAction.CommandUIExtension.ToString()); isDirty = true; } } else { // Required to allow for a delta action to blank out the CommandUIExtension attribute existingCustomAction.CommandUIExtension = null; }
Actually existingCustomAction.CommandUIExtension = null make the existingCustomAction Object "dirty" so should by something like this: // Required to allow for a delta action to blank out the CommandUIExtension attribute if(existingCustomAction.CommandUIExtension !=null) { existingCustomAction.CommandUIExtension = null; isDirty = true; }
Which PnP repository to report the issue?
Category
[ x] Bug [ ] Enhancement
Environment
[ ] Office 365 / SharePoint Online [ ] SharePoint 2016 [x ] SharePoint 2013
Expected or Desired Behavior
It is possible to provision the same template multiple time on the same target web.
Observed Behavior
If custom action section contains min 2 actions, by second provision the same template throw exception
Steps to Reproduce
Provision the same template with min 2 custom action multiple time on the same target web.