PropertyList Beta Code - Unable to use

Vote:
 

I've just followed the blog post to enable a PropertyList. I know it's beta code but it appears to work for others. I'm having a bit of an issue when it comes to doing anything with it. In the images in the blogs I've seen there is a button with a plus sign below it to add a new Item to the List. This is what I'm seeing. Does anyone know what I've done wrong?

[EditorDescriptor(EditorDescriptorType = typeof (CollectionEditorDescriptor))]
public virtual IList Images { get; set; }

What I'm seeing 

#142788
Dec 23, 2015 19:30
Vote:
 

Hi,

It could be that you have some console errors in your browser. Could you check this?

And you could also check if you registered Property Definition Type:

[PropertyDefinitionTypePlugIn]public class ContactListProperty : PropertyListBase<SliderImage>{ }
#142791
Dec 24, 2015 0:30
Vote:
 

It appears that I am getting an error in the Console. Wish I'd checked that earlier. I do have the Property Definition Type Set Correctly.

"Unable to load /EPiServer/shell/Stores/metadata/gjcity16.Models.Properties.SliderImage?dojo.preventCache=1450969461665 status: 500"

response: Object
responseText: "<!DOCTYPE html> ↵<html> ↵ <head> ↵ <title>Object reference not set to an instance of an object.</title> ↵ <meta name="viewport" content="width=device-width" /> ↵ <style> ↵ body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} ↵ p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} ↵ b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} ↵ H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } ↵ H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } ↵ pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt} ↵ .marker {font-weight: bold; color: black;text-decoration: none;} ↵ .version {color: gray;} ↵ .error {margin-bottom: 10px;} ↵ .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } ↵ @media screen and (max-width: 639px) { ↵ pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; } ↵ } ↵ @media screen and (max-width: 479px) { ↵ pre { width: 280px; } ↵ } ↵ </style> ↵ </head> ↵ ↵ <body bgcolor="white"> ↵ ↵ <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1> ↵ ↵ <h2> <i>Object reference not set to an instance of an object.</i> </h2></span> ↵ ↵ <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> ↵ ↵ <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. ↵ ↵ <br><br> ↵ ↵ <b> Exception Details: </b>System.NullReferenceException: Object reference not set to an instance of an object.<br><br> ↵ ↵ <b>Source Error:</b> <br><br> ↵ ↵ <table width=100% bgcolor="#ffffcc"> ↵ <tr> ↵ <td> ↵ <code> ↵ ↵An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code> ↵ ↵ </td> ↵ </tr> ↵ </table> ↵ ↵ <br> ↵ ↵ <b>Stack Trace:</b> <br><br> ↵ ↵ <table width=100% bgcolor="#ffffcc"> ↵ <tr> ↵ <td> ↵ <code><pre> ↵ ↵[NullReferenceException: Object reference not set to an instance of an object.] ↵ EPiServer.Cms.Shell.Extensions.ExtendedMetadataExtensions.FindTopMostContentMetadata(ExtendedMetadata metadata, IList`1 fullPropertyName) +54 ↵ EPiServer.Cms.Shell.Extensions.ExtendedMetadataExtensions.FindTopMostContentMetadata(ExtendedMetadata metadata) +80 ↵ EPiServer.Cms.Shell.UI.ObjectEditing.EditorDescriptors.UrlEditorDescriptor.ModifyMetadata(ExtendedMetadata metadata, IEnumerable`1 attributes) +76 ↵ EPiServer.Shell.ObjectEditing.ExtensibleMetadataProvider.ApplyExtendersToMetadata(ExtendedMetadata metadata, IEnumerable`1 attributes, IEnumerable`1 metadataHandlers) +128 ↵ EPiServer.Shell.ObjectEditing.ExtensibleMetadataProvider.CreateMetadata(IEnumerable`1 attributes, Type containerType, Func`1 modelAccessor, Type modelType, String propertyName) +495 ↵ System.Web.Mvc.AssociatedMetadataProvider.GetMetadataForProperty(Func`1 modelAccessor, Type containerType, PropertyDescriptor propertyDescriptor) +215 ↵ System.Web.Mvc.AssociatedMetadataProvider.GetMetadataForProperties(Object container, Type containerType) +307 ↵ System.Web.Mvc.ModelMetadata.get_Properties() +109 ↵ EPiServer.Shell.ObjectEditing.ExtendedMetadata.get_Properties() +218 ↵ EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.ExtractMetadataFromProperties(ExtendedMetadata metadata, MetadataStoreModel MetadataStoreModel, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories) +143 ↵ EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.CreateFromModelMetadata(ExtendedMetadata metadata, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories, Boolean alwaysCreateChildProperties) +2026 ↵ EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.Create(ModelMetadata metadata) +81 ↵ EPiServer.Shell.UI.Rest.MetadataStore.Get(String id, String modelAccessor) +407 ↵ lambda_method(Closure , ControllerBase , Object[] ) +246 ↵ System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +59 ↵ System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +434 ↵ System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDe…dMetadataExtensions.FindTopMostContentMetadata(ExtendedMetadata metadata, IList`1 fullPropertyName) ↵ at EPiServer.Cms.Shell.Extensions.ExtendedMetadataExtensions.FindTopMostContentMetadata(ExtendedMetadata metadata) ↵ at EPiServer.Cms.Shell.UI.ObjectEditing.EditorDescriptors.UrlEditorDescriptor.ModifyMetadata(ExtendedMetadata metadata, IEnumerable`1 attributes) ↵ at EPiServer.Shell.ObjectEditing.ExtensibleMetadataProvider.ApplyExtendersToMetadata(ExtendedMetadata metadata, IEnumerable`1 attributes, IEnumerable`1 metadataHandlers) ↵ at EPiServer.Shell.ObjectEditing.ExtensibleMetadataProvider.CreateMetadata(IEnumerable`1 attributes, Type containerType, Func`1 modelAccessor, Type modelType, String propertyName) ↵ at System.Web.Mvc.AssociatedMetadataProvider.GetMetadataForProperty(Func`1 modelAccessor, Type containerType, PropertyDescriptor propertyDescriptor) ↵ at System.Web.Mvc.AssociatedMetadataProvider.GetMetadataForProperties(Object container, Type containerType) ↵ at System.Web.Mvc.ModelMetadata.get_Properties() ↵ at EPiServer.Shell.ObjectEditing.ExtendedMetadata.get_Properties() ↵ at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.ExtractMetadataFromProperties(ExtendedMetadata metadata, MetadataStoreModel MetadataStoreModel, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories) ↵ at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.CreateFromModelMetadata(ExtendedMetadata metadata, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories, Boolean alwaysCreateChildProperties) ↵ at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.Create(ModelMetadata metadata) ↵ at EPiServer.Shell.UI.Rest.MetadataStore.Get(String id, String modelAccessor) ↵ at lambda_method(Closure , ControllerBase , Object[] ) ↵ at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) ↵ at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) ↵ at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) ↵ at System.Web.Mvc.Async.AsyncControllerActionInvoker.ActionInvocation.InvokeSynchronousActionMethod() ↵ at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) ↵ at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) ↵ at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() ↵ at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag) ↵ at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) ↵ at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() ↵ at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() ↵ at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() ↵ at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) ↵ at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) ↵ at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() ↵ at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag) ↵ at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) ↵ at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() ↵ at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) ↵ at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) ↵ at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() ↵ at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag) ↵ at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) ↵ at EPiServer.Shell.Services.Rest.RestControllerBase.EndExecute(IAsyncResult asyncResult) ↵ at EPiServer.Shell.Services.Rest.RestHttpHandler.EndProcessRequest(IAsyncResult result) ↵ at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ↵ at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ↵-->"

#142796
Dec 24, 2015 16:10
Vote:
 

Alright, I figured it out. Turns out I was using an incompatable Content Type. I appreciate all of your help. As it turns out, you apparently can't use Url in a PropertyList.

#142797
Edited, Dec 24, 2015 16:30
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.