7

I have a 8.0 site that just started having some problems whenever I try to edit the Renderings (both final and shared). I'm getting a yellow screen displaying as soon as I hit "Edit", as seen here: enter image description here

Upon checking the logs, I can't decipher anything too helpful:

7064 14:18:30 ERROR Application error. Exception: System.Web.HttpUnhandledException Message: Exception of type 'System.Web.HttpUnhandledException' was thrown. Source: System.Web at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.sitecore_shell_default_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Nested Exception Exception: System.Reflection.TargetInvocationException Message: Exception has been thrown by the target of an invocation. Source: mscorlib at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) at Sitecore.Reflection.ReflectionUtil.CallMethod(Type type, Object obj, String methodName, Boolean includeNonPublic, Boolean includeInherited, Boolean includeStatic, Object[] parameters) at Sitecore.Web.UI.Sheer.ClientPage.OnLoad(EventArgs e) at Sitecore.Shell.Web.UI.SecurePage.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Nested Exception Exception: System.ArgumentNullException Message: Value cannot be null. Parameter name: value Source: Sitecore.Kernel at Sitecore.Diagnostics.Assert.ArgumentNotNull(Object argument, String argumentName) at Sitecore.Web.WebUtil.SafeEncode(String value) at Sitecore.Shell.Applications.Layouts.DeviceEditor.DeviceEditorForm.RenderRenderings(DeviceDefinition deviceDefinition, Int32 selectedIndex, Int32 index) at Sitecore.Shell.Applications.Layouts.DeviceEditor.DeviceEditorForm.Refresh() at Sitecore.Shell.Applications.Layouts.DeviceEditor.DeviceEditorForm.OnLoad(EventArgs e)

This template has standard values for renderings that we aren't overriding, and I'm able to edit the renderings on the standard values just fine.

In case its helpful, here's the raw values of the Shared and Final renderings fields (sorry for the image, but the Stack Exchange editor didn't like the markup): enter image description here

Any ideas what could be causing this?

3
  • Did you overriden the Layout Details Modal? It is causing the above error because it cannot pass the Placeholder. Try remove the placeholder from the Standard Values in the final layout and then click on the edit from the item Commented Apr 5, 2017 at 18:38
  • Hey @HishaamNamooya, no, nothing in the modal is overridden
    – Evan
    Commented Apr 5, 2017 at 18:40
  • Please see answer below Commented Apr 5, 2017 at 19:16

3 Answers 3

8

I have been able to replicate the error you are having. The reason is because the placeholder are left blank.

For example, I have this xml for the Shared Layout:

<r xmlns:xsd="http://www.w3.org/2001/XMLSchema" ><d id="{FE5D7FDF-89C0-4D99-9AA3-B5FBD009C9F3}" l="{14030E9F-CE92-49C6-AD87-7D49B50E42EA}"><r id="{CE4ADCFB-7990-4980-83FB-A00C1E3673DB}" ph="test" uid="{52BDC987-3ED2-42DF-B69F-57B5B8C1EE1C}" /></d></r>

If I remove the ph="test", it will crash with the error you mentioned.

From the screenshot you provided as shown below, there are no placeholders in the entries. You will require to either update the XML manually by adding:

For Shared Layout

ph=""

Example:

<r id="{CE4ADCFB-7990-4980-83FB-A00C1E3673DB}" ph="" uid="{52BDC987-3ED2-42DF-B69F-57B5B8C1EE1C}" />

For Final Layout

s:ph""

Example:

<r uid="{F991D823-656C-44A2-B89C-B4AAFD172A5F}" s:ph="" />

This will at least help you to open the modal without errors. Note that, once you are able to open the modal, you need to set the appropriate placeholder value.

Or you can do it from the Standard Values. But I am pretty sure you will need to do it manually, that is, modifying the xml.

enter image description here

In your screenshot you provided, you already see that there is only 1 rendering that has a placeholder. The first one in the Final Layout, which is SecondarySidebar.

2
  • Thank you for your help. On the standard values presentation details raw values, I added s:ph"" to each of the final renderings, and that allowed me to go into the modal. There, I saw a bunch of renderings that shouldn't have been there - so I deleted them, and made sure everything had a placeholder. Now the pages themselves were fixed too.
    – Evan
    Commented Apr 7, 2017 at 20:48
  • In my experience, locate the offending rendering / layout, click and open, add a placeholder value, and then click the "edit" button. Works. Commented Nov 3, 2021 at 19:21
1

I recently ran into this as well (7.2) and since I didn't want to mess with the XML, I first went into all of the controls to verify they had a placeholder set, and if they did not, put in and then erased a space.

After pressing OK and saving the item I was able to go back into Presentation Details and Edit.

On a second item that this was happening I went into the control I thought was causing the issue (it has a default placeholder and the datasource points to an item now set to never publish) then pressed OK with no changes. I was then able to click Edit without touching any of the other controls.

Interestingly enough, the final XML from this item had only one ph set, with the others missing the parameter.

If you have a number of controls on the page adding ph="" might be faster, otherwise updating/viewing one of the controls might get Sitecore to update the Renderings XML.

3
  • Yep this did the trick. 1. Look for Controls inside the "Layout Details" area that have no "Placeholder"(name/key) value. 2. Add space, remove it, save. 3. Edit works! ----- In my case, I suspect a User removed the Placeholder key as a clunky way to stop it from displaying... Commented Feb 22, 2019 at 17:28
  • BUT the error did come back... UNTIL I edit the Placeholder under "Final Layout" section, and gave it a name (not just a blank/space). So indeed I think it does need some name/key value. Commented Feb 22, 2019 at 17:43
  • Not 100% I understand your last comment, but placeholders don't need a key/name to be set - you can set a default value on the control. However, this may be why it worked for me; I generally keep the default of "content" or set it to a more appropriate default. Commented Feb 25, 2019 at 0:10
0

That just happened to me with Sitecore.NET 8.2 (rev. 170407)

In my case it was actually the SHARED Renderings field that was messed up, still, the error was manifesting in Final Renderings (I guess it's when Sitecore tries to resolve layout differences against Shared).

Fixing Shared also fixes Final - we made it by restoring Shared values from default _Standard Values (Layout Restore on Shared Layouts).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.