Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Problem deleting Category from Dashboard

edited March 2011 in Vanilla 2.0 - 2.8
I get the following error when I tried to use the dashboard to delete an existing category.

"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'c from GDN_Comment c join GDN_Discussion d on c.DiscussionID = d.DiscussionID wh' at line 1|Gdn_Database|Query|delete GDN_Comment c from GDN_Comment c join GDN_Discussion d on c.DiscussionID = d.DiscussionID where d.CategoryID = :dCategoryID"

I am using the latest version Vanilla. There are no discussions in the category, so I unchecked the box to move them to another category. I also tried turning off special permissions so it uses the default roles and permissions. Is there another way to delete the category other than with brute force using phpmyadmin.

Comments

  • Options
    Mine will allow deletion only when that box to move them is checked. Otherwise it errors out. I have not tried it without any discussions but if it does not work with the box checked you might have to add a discussion delete/move to a different cat and then delete the temp discussion.
  • Options
    I left the box checked and it deleted correctly.
  • Options

    I have also same problem,
    If we unchecked the check box and delete the category then below error will be display.

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'c from GDN_Comment c join GDN_Discussion d on c.DiscussionID = d.DiscussionID wh' at line 1|Gdn_Database|Query|delete GDN_Comment c from GDN_Comment c join GDN_Discussion d on c.DiscussionID = d.DiscussionID where d.CategoryID = :dCategoryID

    Please advise me how to resolve it.
    many thanks in advance

  • Options
    hgtonighthgtonight ∞ · New Moderator
    edited May 2013

    This is a known issue. The category has to be empty to remove it.

    If you would like to remove multiple discussions at the same time, I would suggest enabling the Split/Merge plugin. I can confirm that this issue has been fixed in 2.1b1, but I don't suggest installing it in a production site.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.