Multiple controls with same ID error
Multiple controls with same ID error
Hello,
When I'm browsing my catalog it gives me the following error:
Multiple controls with the same ID’C2’ were found. FindControl requires that controls have unique IDs.
I searched the messageboard and found the following so I backed up my database and tired this query:
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
)
but it said that 0 rows were affected. I haven’t been manually editing my database so I’m not sure what the problem is. BTW the version I am running is:
PLATFORM: ASP.NET
VERSION: 7.0.2
BUILD: 11659
Thanks in advanced for any help.
When I'm browsing my catalog it gives me the following error:
Multiple controls with the same ID’C2’ were found. FindControl requires that controls have unique IDs.
I searched the messageboard and found the following so I backed up my database and tired this query:
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
)
but it said that 0 rows were affected. I haven’t been manually editing my database so I’m not sure what the problem is. BTW the version I am running is:
PLATFORM: ASP.NET
VERSION: 7.0.2
BUILD: 11659
Thanks in advanced for any help.
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Multiple controls with same ID error
Have you customized the page and what page is it?
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Multiple controls with same ID error
The page isn't customized. The page is Admin/Catalog/Browse.aspx
Re: Multiple controls with same ID error
Does the error occur when you cause a postback or a callback (i.e. send something back to the server) or when you first load the page? If the former, when you view the page source with your browser, what 2 controls have the "C2" ID?
Re: Multiple controls with same ID error
Only on postback. It doesn't happen with all categories.
Re: Multiple controls with same ID error
When you view the page source with your browser, which two controls have the "C2" ID?
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Multiple controls with same ID error
Do any of you categories have apostrophes in the name? Sometimes that causes weird actions.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: Multiple controls with same ID error
The all look like they have unique id's
Also no commas
Code: Select all
<div class="treeNode"><img src="../../App_Themes/AbleCommerceAdmin/Images/plus.gif" border="0" align="absmiddle" /><a id="ctl00_MainContent_C1" href="javascript:__doPostBack('ctl00$MainContent$C1','')">PRESCHOOL LEVEL<br /> MONTESSORI MATERIALS & CURRICULUM</a></div>
<div class="treeNode"><img src="../../App_Themes/AbleCommerceAdmin/Images/plus.gif" border="0" align="absmiddle" /><a id="ctl00_MainContent_C2" href="javascript:__doPostBack('ctl00$MainContent$C2','')">JUNIOR ELEMENTARY<br /> MONTESSORI MATERIALS & CURRICULUM</a></div>
<div class="treeNode"><img src="../../App_Themes/AbleCommerceAdmin/Images/plus.gif" border="0" align="absmiddle" /><a id="ctl00_MainContent_C3" href="javascript:__doPostBack('ctl00$MainContent$C3','')">ADVANCED ELEMENTARY <br />MONTESSORI MATERIALS & CURRICULUM</a></div>
<div class="treeNode"><img src="../../App_Themes/AbleCommerceAdmin/Images/plus.gif" border="0" align="absmiddle" /><a id="ctl00_MainContent_C16" href="javascript:__doPostBack('ctl00$MainContent$C16','')">ACP TESTS FOR THE<br /> PRESCHOOL LEVELS</a></div>
<div class="treeNode"><img src="../../App_Themes/AbleCommerceAdmin/Images/plus.gif" border="0" align="absmiddle" /><a id="ctl00_MainContent_C17" href="javascript:__doPostBack('ctl00$MainContent$C17','')">ACP TESTS FOR THE <br />JUNIOR ELEMENTARY LEVELS</a></div>
<div class="treeNode"><img src="../../App_Themes/AbleCommerceAdmin/Images/plus.gif" border="0" align="absmiddle" /><a id="ctl00_MainContent_C18" href="javascript:__doPostBack('ctl00$MainContent$C18','')">ACP TESTS FOR THE <br />ADVANCED ELEMENTARY LEVELS</a></div>
<div class="treeNode"><img src="../../App_Themes/AbleCommerceAdmin/Images/plus.gif" border="0" align="absmiddle" /><a id="ctl00_MainContent_C19" href="javascript:__doPostBack('ctl00$MainContent$C19','')">ALBANESI CURRICULUM PROGRAMS</a></div>
<div class="treeNode"><img src="../../App_Themes/AbleCommerceAdmin/Images/plus.gif" border="0" align="absmiddle" /><a id="ctl00_MainContent_C23" href="javascript:__doPostBack('ctl00$MainContent$C23','')">Special Orders </a></div>
<div class="treeNode"><img src="../../App_Themes/AbleCommerceAdmin/Images/plus.gif" border="0" align="absmiddle" /><a id="ctl00_MainContent_C24" href="javascript:__doPostBack('ctl00$MainContent$C24','')">KB</a></div>
</div>
Re: Multiple controls with same ID error
I agree...no duplicates visible. Any chance there is an ID with "C2" in a part of the page you did not show us?
Does it happen with all browsers? For example, if you normally use Internet Explorer, does it happen with FireFox?
Does it happen with all browsers? For example, if you normally use Internet Explorer, does it happen with FireFox?
Re: Multiple controls with same ID error
No other parts that I can see, but I think some code is coming with the post back, you know when it expands the category tree.
Just checked IE, same errors on the same categories.
How are the ID's assigned?
Just checked IE, same errors on the same categories.
How are the ID's assigned?
Re: Multiple controls with same ID error
The ID's are created in layers: first AbleCommerce assigns the "C2" part and then ASP.NET prepends the "MainContent_" parts. When your browser causes a postback, it goes in reverse: ASP.NET uses the "MainContent_" part to figure out which panel the control belongs to and then uses the "C2" part to figure out which control. The error message means that ASP.NET see 2 controls named "C2" in the same panel.
Obviously it does not normally occur and I don't know what would cause it. If it were my site, I think I might start by making sure all critical Windows updates are installed and then use a tool like Fiddler to look at the postbacks.
Obviously it does not normally occur and I don't know what would cause it. If it were my site, I think I might start by making sure all critical Windows updates are installed and then use a tool like Fiddler to look at the postbacks.