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.

New Discussion is including an old comment?

edited June 2007 in Vanilla 1.0 Help
Every time I create a new discusssion, vanilla is adding a old comment to the discussion. Can anyone think of any reason why this may be happening? I have had to create various little extensions to add new functionality to vanilla for my client but this is the only thing that is holding me up from finishing the job. Thanks Kinsley

Comments

  • What kind of extensions have you developed?
  • Well so far, these are all client particular i.e. 1) Comment Posting Visibility based on trusted status (and admin side enable trust for comment) 2) Further tabs/with sections (i've seen that there is already one addon that does this to a degree) 3) Moderator online message 4) User comment history These are all pretty simple and it wouldnt surprise me if they have mostly been done elsewhere. Kinsley
  • Is this a new install or was it working at one time?
  • Also, is it always only adding ONE comment to each discussion? And can you locate that comment in the database and see if there's anything strange looking about the data of it?
  • yeah I believe it was working properly at one point. one thing to mention that might make a difference is that I had to import the comments/discussions from another forum (bespoke s/w that another company had done). So I imported the categories first. Then the discussions and then the comments. One of the other strange occurances is that on import into vanilla, the comment I choose for the first comment in a discussion (the header comment) also appears as a normal comment in the discussion and not just a title to the discussion. This of course may be causing the problem. I have populated the lum_comment table using the following script: insert into vanilla.lum_comment (CommentID, DiscussionID, AuthUserID, DateCreated, Body) select fp.post_id, topic_id, poster_id, FROM_UNIXTIME(post_time), fpt.post_text from forum_posts fp inner join forum_posts_text fpt on fp.post_id = fpt.post_id inner join clients c on fp.poster_id = c.id Am I supposed to be adding extra fields? Many Thanks
  • Well so far in all cases it adds just the one comment to the discussion (plus the one I've added obviously). And after looking at the data in the table I can't see anything untoward.
  • Well, I'm not really good at sql, but I do think your problem is with the import. You may want to look at some of the other import scripts to compare. A discussion is the first comment in the discussion (someone correct me if I'm wrong). It then links to the comments table by the discussion id with the comments as added keeping the discussion id so that the thread is complete. Do all your comments have this relationship to the discussion?
  • Yes thats how I thought it worked. All my discussions have a base comment that is used as the title of the discussion. I can only assume that I have missed a field that I need to populate or there is a another way that I am missing out on. Thanks again
  • When you say the base comment is used as the title of the discussion, I am confused. Can we see your site?
  • Check the discussion ID after making a new topic. It seems like you didn't do a proper export/import and the auto-indexing was reset to 1 and is probably overwriting while including old comment IDs associated to that thread ID. But if the forum previously had say, 100 threads and 400 comments and your new thread ID equals something like 10, then that's your problem right there.
This discussion has been closed.