Classification > Category Widget yields .Net Error
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:
|
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 AdministrationUpdate 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."
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.
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.