Provisioning issue after moving an IGS provisioned subsite

Solution

Content Governance for SharePoint

Product

Provisioning

Product Version

FA IGS 4.5 Provisioning

Issue

1. Moving an IGS-provisioned site collection that has an IGS-provisioned subsite by backing up the site collection, provisioning a new site collection and subsite at the destination URL, and deleting the new site collection/restoring in that URL will cause an error. 
2. Deleting the original provisioning requests for the site collection and subsite created the issue. After this, going to Site Settings throws an exception.

Root Cause

​The code in question is ($/IGS/IGS/Main/Provisioning.SP/SharePoint/Elements/HideCustomActions/HideCustomActionsControl.cs)
 
        private void Page_PreRenderComplete(object sender, EventArgs e)
        {
            var customActions = ProvisioningRepository.GetCustomActionsByWebID(SPContext.Current.Web.ID);
 
            if (customActions.Count > 0)
            {
                // Get a reference to the table
                var tbl = this.Page.Controls.Cast<System.Web.UI.Control>().Flatten(o => o is Table && o.ClientID.Contains("SettingLinks"), o => o.Controls.Cast<System.Web.UI.Control>()).FirstOrDefault();
 
                if (tbl != null)
                {
                    // Get all hyperlinks in the table
                    var allHlnks = tbl.Controls.Cast<System.Web.UI.Control>().Flatten(o => o is HyperLink, o => o.Controls.Cast<System.Web.UI.Control>());
 
                    foreach (var customAction in customActions)
                    {
                        var hlnk = allHlnks.FirstOrDefault(o => o.ClientID.EndsWith(string.Concat("RptControls_", customAction.CustomActionID)));
 
                        if (hlnk != null)
                        {
                            hlnk.Visible = false;
                        }
                    }
                }
            }
 
            this.Page.PreRenderComplete -= Page_PreRenderComplete;
        }
 
This is due to the fact that a custom actions reference for the web id does not exist in the database and therefore null is being returned.

Resolution

Deactivate the feature “Hide CustomAction Site Settings” (id 04c00486-ccc9-496c-8b9f-b7a9673aa587). This is a hidden feature, so you’ll have to disable it with stsadm. Also, the feature is web scoped so you’ll have to deactivate it on the root site and all subsites.  

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk