Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Not able to change category of discussion as admin

edited November 2006 in Vanilla 1.0 Help
I have either found a bug in 1.0.1, or one of the million extensions I installed added a bug. The bug seems to be in the Vanilla.Control.DiscussionForm.php and Vanilla.Class.DiscussionManager.php though, because those are the only places setting and reading the FirstCommentID field in LUM_Discussion. I'm an Administrator, with every possible permission enabled for my role. A user created a new discussion, then I installed the FCKeditor extension. Then I edited that user's post. I didn't think to check if it said "Start a New Discussion" or "Edit your comments" that time. But, now when I attempt to edit it, I get "Edit your comments" with no way to change the category. I just tried this with a new user, I created a test discussion, edited it with my admin account, and it's letting me change the category as many times as I want. But I still can't change the category on the buggy discussion. As far as I can tell, FirstCommentID or LastUserID or something didn't get set to the right value when it should have. Here's what the database rows pertaining to this discussion look like: LUM_Comment: | CommentID | DiscussionID | AuthUserID | DateCreated | EditUserID | DateEdited | WhisperUserID | Body | FormatType | Deleted | DateDeleted | DeleteUserID | RemoteIp | | 2 | 2 | 3 | 2006-11-10 22:38:30 | NULL | | 0 | <object width="425" height="350"><param name="movie" value=""></param><param name="wmode" value="transparent"></param><embed src="" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object> | Text | 1 | 2006-11-10 22:38:53 | 3 | | | 3 | 2 | 3 | 2006-11-10 22:40:14 | 1 | 2006-11-10 23:22:02 | 0 | <embed width="425" height="350" type="application/x-shockwave-flash" id="VideoPlayback" quality="high" pluginspage="" src="" wmode="transparent"></embed> | FCKeditor | 0 | | 0 | | LUM_Discussion: | DiscussionID | AuthUserID | WhisperUserID | FirstCommentID | LastUserID | Active | Closed | Sticky | Sink | Name | DateCreated | DateLastActive | CountComments | CategoryID | WhisperToLastUserID | WhisperFromLastUserID | DateLastWhisper | TotalWhisperCount | | 2 | 3 | 0 | 2 | 3 | 1 | 0 | 0 | 0 | hoagies and grinders | 2006-11-10 22:38:30 | 2006-11-10 22:40:14 | 1 | 2 | NULL | NULL | | 0 | I've been pouring over the DiscussionForm and DiscussionManager code, but I really can't figure out what the issue is.


  • Options
    I just found another small issue... The ajax 'delete' link right beside edit... Why does it show up on the first post of a discussion? It let me delete that test discussion I just made's comment... it went from having 1 comment to 0, but it still shows up in the list of discussions for that category on the front page. When you open it, it shows the original discussion title but the content body is just the number 0. I can of course delete the whole discussion from the panel on the left, but I kind of assumed the ajax delete link would understand what context the user should be expecting. Can that delete link's behavior be easily changed from hiding a comment to hiding a discussion if it's in the context of the first comment of a discussion?
  • Options
    In regard to your second post, if you wish to actually remove the post/discussion from the database (not just hide it from view), the Comment Removal extension has the type of behaivor you talked about. I'm afraid I'm not really sure what would be causing your editing problem, though, that data seems to be perfectly valid. Assuming you didn't accidently switch off categories or remove a privilege or something, my only guess would be that some extension is causing it.
  • Options
    edited November 2006
    Right, I know about the difference between hiding/deleting. I mean, why does the interface even present you with an option to hide the "comment" in this case? It's the "original post", it's the "discussion", but it doesn't seem to be a comment in any real sense. It's not a bug, just an interface design issue in my opinion - if you click "delete" on the first post, shouldn't it hide the whole discussion? Thanks for looking at the database data, I thought it looked right too but I just started using Vanilla, so I don't quite comprehend how all the columns are related throughout the code. I'll chalk it up to FCKeditor, and fix it in the database manually in a few days if nobody has a explanation for the details of how it happened.
  • Options
    That delete link shouldnt really be there, he has a point.
This discussion has been closed.