File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JForum and the fly likes Deleting a Category Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Deleting a Category" Watch "Deleting a Category" New topic
Author

Deleting a Category

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I got the following error message :

[Cannot delete the category with the ID 2. Please check for forums associated with this category before deleting it., Cannot delete the category with the ID 1. Please check for forums associated with this category before deleting it.]


when I trying to delete a category, I have noticed it is calling the following function:


and the canDelete(int categoryID) method excuting the following SQL:



It make sense that before deleting a Category, all forums within it need to be deleted first.
but I HAVE deleted all the forums within it already.

After deleting the forums from Admin pannelm The forums is not showing in HTML anymore
but their record still in the database,

it this something to do with forum permission? Rafael any help plz?
[originally posted on jforum.net by shanyangqu]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I belive there is another logical error.

1> when admin create a category or forum, it can choose General or Admin to view and use them
2> if admin choose only the General Group to view them, then the Admin Group wouint be able to see them
3> only the admin group can use the Admin Panel, thus the only Group (General Group) can see the forum, cant control it
4> so any forum or category belonges to General, become an orphan forum. can never be deleted or operated

I guess by default the Admin group must have rights to view any admin any forum.

[originally posted on jforum.net by shanyangqu]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
"Admin" is just a regular group, the only diference is that it usually gets the "Administrator" role. Sure, we expect that "Admins" see everything, but you still have to set its roles as any other group.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
My point is by default, Admin should View and be able to operat on Any forum.
this provent the orphan categrory or forum to be made.
good software shouldnt encourage user making mistake
[originally posted on jforum.net by shanyangqu]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deleting a Category