Try our conversational search powered by Generative AI!

Dynamic Property problem in EPiServer CMS10: Value cannot be null. Parameter name: collection

Found in

EPiServer.CMS.UI 10.0.2

Fixed in

EPiServer.CMS.UI 10.6.0

(Or a related package)

Created

Feb 02, 2017

Updated

Feb 21, 2017

Area

CMS UI

State

Closed, Fixed and tested


Description

Steps to reproduce
1. Create a clean AlloyTech MVC site with the EPiServer extension in Visual Studio.
2. Update all EpiServer packages to the latest via Nuget.
3. Update-epidatabase in the package manager console.
4. Add operationCompatibility="DynamicProperties" to <episerver><applicationSettings> to open “Dynamic Property”.
5. Open website by pressing Ctrl+F5.
6. Go to Admin -> Dynamic Properties to create a new dynamic property as type “Link Collection”.
7. Go to Edit, open any page.
8. “All properties” > Tools > “Dynamic properties”.

Expected
You can edit the Dynamic property

Actual
An error message is shown:

Value cannot be null.
Parameter name: collection

Description: 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.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: collection

Source Error:

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.

Stack Trace:

[ArgumentNullException: Value cannot be null.
Parameter name: collection]
System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection) +608
EPiServer.SpecializedProperties.LinkItemCollection.AddRange(LinkItemCollection linkCollection) +35
EPiServer.UI.Edit.PropertyLinkCollectionEditControl.get_NewLinkCollection() +364
EPiServer.UI.Edit.PropertyLinkCollectionEditControl.DataBindLinks() +98
EPiServer.UI.Edit.PropertyLinkCollectionEditControl.DataBind() +54
System.Web.UI.Control.DataBindChildren() +252
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +194
System.Web.UI.Control.DataBindChildren() +252
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +194
System.Web.UI.Control.DataBindChildren() +252
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +194
System.Web.UI.Control.DataBindChildren() +252
System.Web.UI.Control.DataBindChildren() +252
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +194
System.Web.UI.Control.DataBindChildren() +252
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +194
System.Web.UI.Control.DataBindChildren() +252
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +194
EPiServer.UI.Edit.EditDynProp.SetupForm() +143
EPiServer.UI.Edit.EditDynProp.OnInit(EventArgs e) +62
System.Web.UI.Control.InitRecursive(Control namingContainer) +166
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +464