Continuing Orphaned Items
Continuing Orphaned Items
Hello...
I'm again seeing items in my orphaned items list that have not been edited in any way. We have been adding new product to our catalog, but, existing items have not been edited at all. This is for a few different items... whether actual product, or components of a kit. There doesn't seem to be any consistent data across these items either. All showed either positive in stock levels, inv tracking disabled... The only thing that is consistent, is that for some reason, they lost the categories they were associated with.
Can someone please help me out with this? I have to check the orphaned items table every day to make sure nothing is in it again!
Thanks for the help.
Scott
I'm again seeing items in my orphaned items list that have not been edited in any way. We have been adding new product to our catalog, but, existing items have not been edited at all. This is for a few different items... whether actual product, or components of a kit. There doesn't seem to be any consistent data across these items either. All showed either positive in stock levels, inv tracking disabled... The only thing that is consistent, is that for some reason, they lost the categories they were associated with.
Can someone please help me out with this? I have to check the orphaned items table every day to make sure nothing is in it again!
Thanks for the help.
Scott
Re: Continuing Orphaned Items
Hello again... It seems that I have figured out why the problem is occurring, but, not how to fix it 
Here is an example:
Whenever we have a product where the ProductId is equal to a Category with the same CategoryId
(1439 Polaris Ball Bearing (ATV-380-360) PRODUCT 1439 Solar Pool Cover CATEGORY)
and we delete the Category, not only will all the Node associations for that category get deleted, but so will the ones for the Product. It seems that the NodeTypeId is not being checked during the delete process.
Any help on this???
Thanks again,
Scott

Here is an example:
Whenever we have a product where the ProductId is equal to a Category with the same CategoryId
(1439 Polaris Ball Bearing (ATV-380-360) PRODUCT 1439 Solar Pool Cover CATEGORY)
and we delete the Category, not only will all the Node associations for that category get deleted, but so will the ones for the Product. It seems that the NodeTypeId is not being checked during the delete process.
Any help on this???
Thanks again,
Scott
Re: Continuing Orphaned Items
I don't understand. Do you mean when you delete ProductId 482 and you have a category that also happens to have Id 482, the nodes for the whole category are getting deleted along with the one product?heinscott wrote:Whenever we have a product where the ProductId is equal to a Category with the same CategoryId...
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Re: Continuing Orphaned Items
Yes, that is exactly what I mean. Just to test, I ran the query "Select A.ProductId, A.Name, B.Name from ac_Products A INNER JOIN ac_Categories B ON A.ProductId = B.CategoryId", and got a list of all products/categories with matching ids. Then, I deleted one of the categories (that we didn't have products in yet), and sure enough... The product showed right up in the orphaned items list.
Re: Continuing Orphaned Items
Actually, I guess we're having the opposite problem from what you described... We delete the category, and the product loses it's categories.
Re: Continuing Orphaned Items
Your initial report sounded familiar...
http://bugs.ablecommerce.com/show_bug.cgi?id=7056
- now seems that things are still not quite right with deletion cascade in the CatalogNodes table.
http://bugs.ablecommerce.com/show_bug.cgi?id=7056
- now seems that things are still not quite right with deletion cascade in the CatalogNodes table.
Nick Cole
http://www.ethofy.com
http://www.ethofy.com
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Continuing Orphaned Items
A co-worker had that problem with a site he did and was never able to pinpoint the problem since the pages were heavily customized.
Draneb has reported the problem also.
This is the first clue as to why it is happening, which is good.
Draneb has reported the problem also.
This is the first clue as to why it is happening, which is good.
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: Continuing Orphaned Items
This is due to the following bug
http://bugs.ablecommerce.com/show_bug.cgi?id=7056
Currently this is fixed in AC7.1 but not yet fixed in AC7.0.
http://bugs.ablecommerce.com/show_bug.cgi?id=7056
Currently this is fixed in AC7.1 but not yet fixed in AC7.0.
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Continuing Orphaned Items
I know Able recommended waiting for 7.2 unless we needed new international stuff in 7.1. This is a pretty serious bug. Will it be fixed in 7.0? If not, then we should probably upgrade to 7.1?
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: Continuing Orphaned Items
If you people think that this fix is critical for AC7 then better some one from you should throw a ticket request.
Re: Continuing Orphaned Items
Either that, or would it be possible to get the code for the cascade category delete? I wouldn't mind, for the time being, creating a custom fixed method to handle the delete for me.
I'm sure I could come up with something, but would rather make sure that I'm catching all the related data.
Thanks Mazhar.
Scott
I'm sure I could come up with something, but would rather make sure that I'm catching all the related data.
Thanks Mazhar.
Scott
Re: Continuing Orphaned Items
It would be better to open a ticket.
Re: Continuing Orphaned Items
In case this helps anyone while waiting for the fix in 7.1, I've modified the delete method for a Category type CatalogNode to re-create any product types after the Category delete. This will take care of the orphaned products.
In the browse.aspx.cs file (Admin/Catalog), find the DoDelete method. Change the case CatalogNodeType.Category in the switch statement to:
Hope this is helpful.
Scott
In the browse.aspx.cs file (Admin/Catalog), find the DoDelete method. Change the case CatalogNodeType.Category in the switch statement to:
Code: Select all
case CatalogNodeType.Category:
List<int> Categories = new List<int>();
List<short> OrderByList = new List<short>();
Category category = CategoryDataSource.Load(catalogNodeId);
if (category != null)
{
CatalogNodeCollection cnc = CatalogNodeDataSource.LoadForCriteria("CatalogNodeId = " + catalogNodeId + " AND CatalogNodeTypeId = 1");
foreach (CatalogNode cn in cnc)
{
Categories.Add(cn.CategoryId);
OrderByList.Add(cn.OrderBy);
}
category.Delete();
for (int i = 0; i < Categories.Count; i++)
{
CatalogNode cn = new CatalogNode(Categories[i], catalogNodeId, CatalogNodeType.Product, OrderByList[i], true);
cn.Save();
}
}
break;
Scott