Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Closed)
 BUG+FIX (3.1sr4): Moving forums to other category
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

gor
Retired Admin

Netherlands
5511 Posts

Posted - 31 January 2001 :  04:35:39  Show Profile  Visit gor's Homepage
Bug
If you move a topic to a different category, the CAT_ID in the TOPICS and REPLY table doesn't get updated to the new CAT_ID.
This causes existing topics to no longer show up in Active.asp

Fix

In Post_info.asp change the code starting at around line 822 to:


if Err_Msg = "" then
'## Forum_SQL - Check if CAT_ID changed
strSql = "SELECT " & strTablePrefix & "FORUM.CAT_ID "
strSql = strSql & " FROM " & strTablePrefix & "FORUM "
strSql = strSql & " WHERE FORUM_ID = " & Request.Form("FORUM_ID")

set rsCatIDCheck = my_Conn.execute(strSql)

bolCatIDChanged = (rsCatIDCheck("CAT_ID") <> Request.Forum("Category"))

rsCatIDCheck.Close
set rsCatIDCheck = Nothing

'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "FORUM "
strSql = strSql & " SET CAT_ID = " & Request.Form("Category")
if strPrivateForums = "1" then
strSql = strSql & ", F_PRIVATEFORUMS = " & Request.Form("AuthType") & ""
strSql = strSql & ", F_PASSWORD_NEW = '" & ChkString(Request.Form("AuthPassword"),"password") & "'"
end if
strSql = strSql & ", F_SUBJECT = '" & txtSubject & "'"
strSql = strSql & ", F_DESCRIPTION = '" & txtMessage & "'"
strSql = strSql & " WHERE FORUM_ID = " & Request.Form("FORUM_ID")

my_Conn.Execute (strSql)

if bolCatIDChanged then

'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "TOPICS "
strSql = strSql & " SET CAT_ID = " & Request.Form("Category")
strSql = strSql & " WHERE FORUM_ID = " & Request.Form("FORUM_ID")

my_Conn.Execute (strSql)

'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strTablePrefix & "REPLY "
strSql = strSql & " SET CAT_ID = " & Request.Form("Category")
strSql = strSql & " WHERE FORUM_ID = " & Request.Form("FORUM_ID")

my_Conn.Execute (strSql)

end if



Note #1 I didn't have time to live-check this yet !!

Note #2 As far as the site here, I updated the CAT_ID for then MOD-forums so that should be fixed for now.

Note #3 Mike, I didn't change this in the code for the site yet.

Pierre

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 31 January 2001 :  12:29:56  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
cool... Officialy cracking code tonight...

Reinsnitz (Mike)
><)))'>
"The glory of young men is their strength, and the honor of old men is their gray hair." - Proverbs 20:29
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 17 February 2001 :  23:13:59  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
fixed in the source of sf2k_31sr5a6.zip

Reinsnitz (Mike)
><)))'>
"Therefore go and make disciples of all nations,..." Matthew 28:19a
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 19 February 2001 :  15:20:45  Show Profile
NOTE: this is fixed in the code above

4th line in the code that Gor provided needs to be changed from this:


strSql = strSql & " FROM & strTablePrefix & "FORUM "


to this:


strSql = strSql & " FROM " & strTablePrefix & "FORUM "


NOTE: this is fixed in the code above
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 19 February 2001 :  15:39:49  Show Profile  Visit gor's Homepage
That's what you get if you don't live test.

Pierre
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 19 February 2001 :  15:48:09  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
well... I think you guys jinxed me

your right gor... absolutely.

Reinsnitz (Mike)
><)))'>
"Therefore go and make disciples of all nations,..." Matthew 28:19a
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 19 February 2001 :  20:32:55  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
fixed in the source of sf2k_31sr5a7.zip

Reinsnitz (Mike)
><)))'>
"Therefore go and make disciples of all nations,..." Matthew 28:19a
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000 Version 3.4.07