URGENT: Property already exists

Vote:
 

Hi,

I have an enterprise solution where there is an error on the first page on 5 of the sites, but 2 is working. I've checked the database for the property that says is double, but the query returns only one item. I hope someone answers soon, because there are customers waiting to use it.

ERROR:

Server Error in '/' Application.

--------------------------------------------------------------------------------

PropertyData object with name "UIEditorCssPaths" already exists 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.ApplicationException: PropertyData object with name "UIEditorCssPaths" already exists Source Error: Line 27: base.OnLoad(e); Line 28: if (!IsPostBack) Line 29: this.DataBind(); Line 30: } Line 31: Source File: C:\EPiServer\Sites\internett.royken.kommune.standard\Default.aspx.cs Line: 29 Stack Trace: [ApplicationException: PropertyData object with name "UIEditorCssPaths" already exists] EPiServer.Core.PropertyDataCollection.Add(String name, PropertyData value) +130 EPiServer.Core.DynamicPropertyPage.Add(DynamicProperty property) +172 EPiServer.Core.DynamicPropertyTree.Add(PageReference pageLink, PageReference parentLink, DynamicProperty prop) +103 EPiServer.Core.DynamicPropertyTree.Initialize() +209 EPiServer.Core.DynamicPropertyTree.FindDynamicProperty(String name, PropertyDataCollection properties) +17 EPiServer.Core.PropertyGetHandler.DefaultPropertyHandler(String name, PropertyDataCollection properties) +210 EPiServer.Core.PropertyDataCollection.TryGetValue(String name, TProperty& value) +47 EPiServer.Web.WebControls.PageControlBase.SetupFields() +282 EPiServer.Web.WebControls.PageControlBase.PrepareData() +13 EPiServer.Web.WebControls.PageControlBase.GetPages() +10 EPiServer.Web.WebControls.PageList.CreateChildControls() +29 EPiServer.Web.WebControls.PageControlBase.DataBind() +286 System.Web.UI.Control.DataBindChildren() +211 System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102 System.Web.UI.Control.DataBind() +15 System.Web.UI.Control.DataBindChildren() +211 System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102 System.Web.UI.Control.DataBind() +15 System.Web.UI.Control.DataBindChildren() +211 System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102 System.Web.UI.Control.DataBind() +15 System.Web.UI.Control.DataBindChildren() +211 System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102 System.Web.UI.Control.DataBind() +15 System.Web.UI.Control.DataBindChildren() +211 System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102 System.Web.UI.Control.DataBind() +15 SSP.Standard.Kommuneportal247.Default.OnLoad(EventArgs e) in C:\EPiServer\Sites\internett.royken.kommune.standard\Default.aspx.cs:29 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

#45584
Nov 10, 2010 9:50
Vote:
 

Hi,

I'm asking around in the Dev Team here at EPi to see if anyone knows how this can happen.

/Paul.

#45613
Nov 10, 2010 17:21
Vote:
 

If you execute the stored procedure netDynamicPropertyTree you should see two or more rows with the same PageID and PropertyName. That is the only way that the stack trace above could happen.

In order to correct this, look in the tblProperty tbale, you can probably find the offenting rows by executing this query:

select P.* from tblProperty AS P
inner join tblPageDefinition AS PD
on P.fkPageDefinitionID = PD.pkID
where PD.Name = 'UIEditorCssPaths'

I hope that this helps!

#45620
Nov 11, 2010 2:58
Vote:
 

Is it even possible to create a property with the same name? It's not a duplicate attribute in web.config for the problem sites?

#45621
Nov 11, 2010 10:04
Vote:
 

For your information, this is sequential error due to the Dynamic Property system noe being able to initialize itself. The real problem is a dynamic property of type page reference that is set (somewhere) to point to a page which has a link type of none (under the Shortcut tab). When EPiServer loads all dynamic properties, it tries to get the url of that page, and chokes on it because the page has a link type of "No link, only text".

Now, this only happens in an enterprise environment, and only for sites outside the structure with the "offending" page. The site with the value does not have a problem with this, but other sites in the enterprise installation have. The real exception is this:

[InvalidOperationException: Can't set Host property on a UrlBuilder with a relative Path]
   EPiServer.Core.DynamicPropertyTree.Initialize() +535
   EPiServer.Core.DynamicPropertyTree.FindDynamicProperty(String name, PropertyDataCollection properties) +17
   EPiServer.Core.PropertyGetHandler.DefaultPropertyHandler(String name, PropertyDataCollection properties) +210
   EPiServer.Core.PropertyDataCollection.TryGetValue(String name, TProperty& value) +47
   EPiServer.Web.WebControls.PageControlBase.SetupFields() +282
   EPiServer.Web.WebControls.PageControlBase.PrepareData() +13
   EPiServer.Web.WebControls.PageControlBase.GetPages() +10
   EPiServer.Web.WebControls.PageList.CreateChildControls() +29
   EPiServer.Web.WebControls.PageControlBase.DataBind() +286
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   MySite.Default.OnLoad(EventArgs e) +80
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

#45627
Nov 11, 2010 10:34
Vote:
 

Note, the workaround is to not use "No link, only text" if you have dynamic properties of this type in an enterprise solution. Obviously a bug :-)

#45628
Nov 11, 2010 10:38
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.