U4-4146 - U7 - Add new property to a media type causes YSOD until Examine indexes cleared

Created by Jeavon Leopold 27 Jan 2014, 11:46:04 Updated by Sebastiaan Janssen 31 Jan 2014, 12:20:21

Duplicates: U4-4144

Relates to: U4-4129

If you add a new property to a media type and then try to render it, you get a YSOD. Checking HasProperty also causes the YSOD. If you stop the application and delete the Examine indexes the issue can be resolved, however publishing all items individually does not fix it! e.g: @{ var caseStudyImage = Umbraco.TypedMedia("1234"); if (caseStudyImage.HasProperty("somethingNew") && caseStudyImage.HasValue("somethingNew")) {

@caseStudyImage.GetPropertyValue("somethingNew")

}
} Exception: [ArgumentNullException: Value cannot be null. Parameter name: propertyType] Umbraco.Core.Models.PublishedContent.PublishedPropertyBase..ctor(PublishedPropertyType propertyType) +62 Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedProperty..ctor(PublishedPropertyType propertyType, Boolean isPreviewing) +18 Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedProperty..ctor(PublishedPropertyType propertyType, Boolean isPreviewing, String propertyData) +21 Umbraco.Web.PublishedCache.XmlPublishedCache.DictionaryPublishedContent..ctor(IDictionary2 valueDictionary, Func2 getParent, Func2 getChildren, Func3 getProperty, Boolean fromExamine) +2412 Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.ConvertFromXPathNavigator(XPathNavigator xpath) +920 Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache.GetProperty(DictionaryPublishedContent dd, String alias) +416 Umbraco.Web.PublishedCache.XmlPublishedCache.DictionaryPublishedContent.GetProperty(String alias) +16 Umbraco.Web.PublishedCache.XmlPublishedCache.DictionaryPublishedContent.GetProperty(String alias, Boolean recurse) +37 Umbraco.Web.PublishedContentExtensions.HasValue(IPublishedContent content, String alias) +10 ASP._Page_Views_MediaPicker_cshtml.b__b() in c:\Users\Jeavon\Documents\Visual Studio Projects\Umbraco7Docs\Umbraco7Docs\Views\MediaPicker.cshtml:23 System.Web.WebPages.<>c__DisplayClassb.b__9(TextWriter tw) +278 System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +10 System.Web.WebPages.WebPageBase.Write(HelperResult result) +71 ASP._Page_Views_PropertyEditorLayout_cshtml.Execute() in c:\Users\Jeavon\Documents\Visual Studio Projects\Umbraco7Docs\Umbraco7Docs\Views\PropertyEditorLayout.cshtml:28 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +103 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +88 System.Web.WebPages.<>c__DisplayClass7.b__6(TextWriter writer) +233 System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +10 System.Web.WebPages.WebPageBase.Write(HelperResult result) +71 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action1 body) +64 System.Web.WebPages.WebPageBase.PopContext() +246 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +95 System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +235 System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107 Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +93 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291 System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13 System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +23 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +245 System.Web.Mvc.<>c__DisplayClass1c.b__19() +22 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +245 System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +22 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +176 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +311 System.Web.Mvc.<>c__DisplayClass1d.b__19() +23 System.Web.Mvc.Async.<>c__DisplayClass1.b__0() +19 System.Web.Mvc.Async.<>c__DisplayClass81.<BeginSynchronous>b__7(IAsyncResult _) +10 System.Web.Mvc.Async.WrappedAsyncResult1.End() +55 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39 System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +23 System.Web.Mvc.Async.WrappedAsyncResult1.End() +55 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10 System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25 System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23 System.Web.Mvc.Async.WrappedAsyncResult1.End() +55 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9688704 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

Comments

Jeavon Leopold 27 Jan 2014, 11:46:51

Pretty sure these issues are related as exception is the same.


Jeavon Leopold 27 Jan 2014, 11:48:59

This issue can be seen in this screenr http://www.screenr.com/NV8N watch about 1:30 onwards


Shannon Deminick 27 Jan 2014, 21:55:08

This is def only 7.x ?


Jeavon Leopold 27 Jan 2014, 23:07:28

I've tested with v6.1.6 and neither this issue nor U4-4129 occur , however I've not tested with a v6.2 build.


Shannon Deminick 27 Jan 2014, 23:09:48

Thats fine, will have a look. Could very well be something with the new published content stuff. Will ping @Stephen about it too.


Stephan 29 Jan 2014, 18:28:58

When you add a property the media cache properly detects that Examine does not know about that property, and decides to reload the content... from the very legacy library code, which has its own issues... The result is that we have a value for a property that is not a valid property for the content. See U4-4144 for a more complete discussion.


Priority: Critical

Type: Bug

State: Duplicate

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.0.1, 7.0.2

Due in version:

Sprint:

Story Points:

Cycle: