I get the following error when navigating to Catalog/Browse:
Server Error in '/' Application.
Multiple controls with the same ID 'C34' were found. FindControl requires that controls have unique IDs.
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.Web.HttpException: Multiple controls with the same ID 'C34' were found. FindControl requires that controls have unique IDs.
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:
[HttpException (0x80004005): Multiple controls with the same ID 'C34' were found. FindControl requires that controls have unique IDs.]
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +220
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +280
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +280
System.Web.UI.Control.FillNamedControlsTable(Control namingContainer, ControlCollection controls) +280
System.Web.UI.Control.EnsureNamedControlsTable() +57
System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +106
System.Web.UI.Control.FindControl(String id) +9
System.Web.UI.WebControls.DataBoundControlHelper.FindControl(Control control, String controlID) +68
System.Web.UI.WebControls.DataBoundControl.GetDataSource() +1863793
System.Web.UI.WebControls.DataBoundControl.ConnectToDataSourceView() +34
System.Web.UI.WebControls.DataBoundControl.OnLoad(EventArgs e) +16
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
Build is 10125.
This AC database is a test front end for VisionCore and has a fair amount of data and activity. I connected it to a clean VC database and pushed a new category and a few new inventory items. That seems to have generated the error. I presume I ended up with a dupe keyfield somewhere. I've manually gone in to the AC tables and deleted the category and parts I had created in the new VC build, but I'm still getting the error.
Any suggestions on where I might look to resolve this error? I pray I haven't turned the data into swiss cheese.
Multiple controls with same ID error
Re: Multiple controls with same ID error
Well i am quite sure that this is due to manual edits in the database. I am posting a query you can run it and it will remove the faulty ones. But read the following note first
Please take your database backup first and then run the query.
Please take your database backup first and then run the query.
Code: Select all
DELETE FROM ac_CatalogNodes
WHERE (CAST(ac_CatalogNodes.CategoryId as varchar) + '/' +
CAST(ac_CatalogNodes.CatalogNodeId as varchar) + '/' +
CAST(ac_CatalogNodes.CatalogNodeTypeId as varchar))
IN ( SELECT (CAST(CN.CategoryId as varchar) + '/' +
CAST(CN.CatalogNodeId as varchar) + '/' +
CAST(CN.CatalogNodeTypeId as varchar)) as ID
FROM ac_CatalogNodes CN inner join ac_Categories C ON
CN.CatalogNodeId=C.CategoryId
WHERE CN.CatalogNodeTypeId=0 AND CN.CategoryID <> C.ParentID
)
Re: Multiple controls with same ID error
Hi Mazhar -mazhar wrote:Well i am quite sure that this is due to manual edits in the database. I am posting a query you can run it and it will remove the faulty ones. But read the following note first
Please take your database backup first and then run the query.
Code: Select all
DELETE FROM ac_CatalogNodes WHERE (CAST(ac_CatalogNodes.CategoryId as varchar) + '/' + CAST(ac_CatalogNodes.CatalogNodeId as varchar) + '/' + CAST(ac_CatalogNodes.CatalogNodeTypeId as varchar)) IN ( SELECT (CAST(CN.CategoryId as varchar) + '/' + CAST(CN.CatalogNodeId as varchar) + '/' + CAST(CN.CatalogNodeTypeId as varchar)) as ID FROM ac_CatalogNodes CN inner join ac_Categories C ON CN.CatalogNodeId=C.CategoryId WHERE CN.CatalogNodeTypeId=0 AND CN.CategoryID <> C.ParentID )
You're most likely right my changes did not help the error situation. I made backups and ran your query, but it came back with 'Invalid object name 'ac_CatalogNodes'. Addmittedly my SQL is limited, but I don't see anything wrong with the query structure.
Re: Multiple controls with same ID error
It seems that you tried to execute the query on some wrong database. Make sure that you have selected proper database to run the query. For this AbleCommerce database must be selected in the dropdown available in toolbar. Have a look at the image below
Re: Multiple controls with same ID error
Brilliant! Worked like a champ!
Mazhar (or other AbleCommerce staff), we'll have to grab a meal if you're ever in the greater Puget Sound area.
Thanks.
Mazhar (or other AbleCommerce staff), we'll have to grab a meal if you're ever in the greater Puget Sound area.
Thanks.