Classification > Category Widget yields .Net Error

Posted by Community Admin on 04-Aug-2018 16:13

Classification > Category Widget yields .Net Error

All Replies

Posted by Community Admin on 20-Apr-2011 00:00

If I create a blank test page and attempt to drag/drop a classification > category widget onto the page I get the .net error below. I have tried deleting my browser cache, restarting the cassini webserver and even restarting my machine completely with no luck.

I have also tried deleting all the categories in sitefinity and recreating 2 test categories with no success. We have another site using Sitefinity version 4 and the category widget works fine there. I have no idea how the widget has been corrupted with this second site.

We are using Sitefinity version 4.0.1098.0.

Stack Trace:

[ItemNotFoundException: You are trying to access item that no longer exists. The most probable reason is that it has been deleted by another user.]
   Telerik.Sitefinity.Data.IOpenAccessExtensions.GetItemById(IObjectScope scope, String id) +282
   Telerik.Sitefinity.Taxonomies.Data.OpenAccessTaxonomyProvider.GetTaxon(Guid id) +182
   Telerik.Sitefinity.Taxonomies.TaxonomyManager.GetTaxon(Guid id) +73
   Telerik.Sitefinity.Web.UI.PublicControls.TaxonomyControl.GetTaxaItemsCountForTaxonomy() +2519
   Telerik.Sitefinity.Web.UI.PublicControls.TaxonomyControl.InitializeTaxaList() +283
   Telerik.Sitefinity.Web.UI.PublicControls.TaxonomyControl.InitializeControls(GenericContainer container) +120
   Telerik.Sitefinity.Web.UI.SimpleView.CreateChildControls() +89
   System.Web.UI.Control.EnsureChildControls() +102
   System.Web.UI.Control.PreRenderRecursiveInternal() +42
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225

Posted by Community Admin on 20-Apr-2011 00:00

I think I'm able to recreate this issue now. It turns out I can also no longer view/delete/edit any news item that was using the old categories that were deleted.

Follow these steps to recreate the issue:

1. Create a category
2. Create another category that is a subcategory of the first
3. Create a news item and assign it to the child category.
4. Delete the super-cat that you created in step #1 above (but do not check the child category).

The result is this:
1. Both the supercategory and the subcategory disappear from the categories module.
2. Any news item that was linked to the subcategory is now corrupted in the admin backend (you can no longer view/delete/edit that news item).
3. I believe this also caused my issue when dragging/dropping the category widget onto any page. The category widget itself appears to be corrupted.

I see on the sitefinity 4.1 discussion that a similar bug was fixed with the 4.1 upgrade:

Content & Classifications

    Fixed: Deleting category with associated images results in error in Image Administration

Is anyone able to follow the steps above (you may risk corrupting your categories) and tell me if this issue is fixed in sitefinity 4.1?

Thanks in advance for all your help,


Posted by Community Admin on 20-Apr-2011 00:00

Update to this issue: For anyone else that may have this issue in the future - I found the orphaned subcategories in the database in a table called sf_news_items_category. I had already deleted all my categories so I figured that table should be empty. I took a gamble and deleted all the rows in the table and I can now view/update/delete the news items that were previously corrupted and throwing the error about "You are trying to access item that no longer exists."

However, this has not solved my original problem that when I drag/drop the category widget onto a page it's still giving me the error: "You are trying to access item that no longer exists."

Posted by Community Admin on 22-Apr-2011 00:00

Hello Ben,

The status of the issue is Resolved. The fix should be available in Sitefinity 4.1 Release.
Please, send us the whole project (project files, database, backend credentials) to debug the issue locally, because it looks like the problem comes somewhere to the database and we need to look into it.

the Telerik team

Posted by Community Admin on 25-Apr-2011 00:00

Thanks for the reply. We ended up doing a complete reinstall of the sitefinity database which fixed the issue with the categories widget. I have not tried to replicate the issue with the orphaned subcategories since our reinstall. 

This thread is closed