This problem is caused by an error in the checks in post.asp and post_info.asp
The error doesn't show if there allready are topics in a forum so if you upgrade you probably didn't notice it.
Still it is better to fix it then also.
In post.asp
Starting line: 99
Replace this code: '## Forum_SQL - Find out if the Category/Forum/Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS, " & strTablePrefix & "FORUM.F_STATUS, "
strSql = strSql & strActivePrefix & "TOPICS.T_STATUS "
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY, " & strTablePrefix & "FORUM, " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & strRqCatID
' strSql = strSql & " AND " & strTablePrefix & "FORUM.FORUM_ID = " & strRqForumID
' strSql = strSql & " AND " & strTablePrefix & "FORUM.CAT_ID = " & strRqCatID
strSql = strSql & " AND " & strTablePrefix & "FORUM.FORUM_ID = " & strActivePrefix & "TOPICS.FORUM_ID "
strSql = strSql & " AND " & strTablePrefix & "FORUM.CAT_ID = " & strActivePrefix & "TOPICS.CAT_ID "
if strRqMethod <> "Topic" then
strSql = strSql & " AND " & strActivePrefix & "TOPICS.TOPIC_ID = " & strRqTopicID
' strSql = strSql & " AND " & strActivePrefix & "TOPICS.FORUM_ID = " & strRqForumID
' strSql = strSql & " AND " & strActivePrefix & "TOPICS.CAT_ID = " & strRqCatID
end if
set rsStatus = my_Conn.Execute(strSql)
if rsStatus.EOF or rsStatus.BOF then
Go_Result "Please don't attempt to edit the URL<br>to gain access to locked Forums/Categories."
else
blnCStatus = rsStatus("CAT_STATUS")
blnFStatus = rsStatus("F_STATUS")
blnTStatus = rsStatus("T_STATUS")
rsStatus.close
set rsStatus = nothing
end if
With:
if strRqMethod <> "Topic" then
'## Forum_SQL - Find out if the Category, Forum or Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS, " &_
strTablePrefix & "FORUM.F_STATUS, " &_
strActivePrefix & "TOPICS.T_STATUS " &_
" FROM " & strTablePrefix & "CATEGORY, " &_
strTablePrefix & "FORUM, " &_
strActivePrefix & "TOPICS " &_
" WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & strActivePrefix & "TOPICS.CAT_ID " &_
" AND " & strTablePrefix & "FORUM.FORUM_ID = " & strActivePrefix & "TOPICS.FORUM_ID " &_
" AND " & strActivePrefix & "TOPICS.TOPIC_ID = " & strRqTopicID & ""
else
'## Forum_SQL - Find out if the Category or Forum is Locked or Un-Locked and if it Exists
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS, " &_
strTablePrefix & "FORUM.F_STATUS " &_
" FROM " & strTablePrefix & "CATEGORY, " &_
strTablePrefix & "FORUM " &_
" WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & strTablePrefix & "FORUM.CAT_ID " &_
" AND " & strTablePrefix & "FORUM.FORUM_ID = " & strRqForumID & ""
end if
set rsStatus = my_Conn.Execute(strSql)
if rsStatus.EOF or rsStatus.BOF then
Go_Result "Please don't attempt to edit the URL<br>to gain access to locked Forums/Categories."
else
blnCStatus = rsStatus("CAT_STATUS")
blnFStatus = rsStatus("F_STATUS")
if strRqMethod <> "Topic" then
blnTStatus = rsStatus("T_STATUS")
else
blnTStatus = 1
end if
rsStatus.close
set rsStatus = nothing
end if
in post_info.asp
Starting line: 112
Replace:
'## Forum_SQL - Find out if the Category/Forum/Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS, " & strTablePrefix & "FORUM.F_STATUS, "
strSql = strSql & strActivePrefix & "TOPICS.T_STATUS, "& strActivePrefix & "TOPICS.T_AUTHOR "
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY, " & strTablePrefix & "FORUM, " & strActivePrefix & "TOPICS "
strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & Cat_ID
strSql = strSql & " AND " & strTablePrefix & "FORUM.FORUM_ID = " & Forum_ID
strSql = strSql & " AND " & strTablePrefix & "FORUM.CAT_ID = " & Cat_ID
if MethodType <> "Topic" then
strSql = strSql & " AND " & strActivePrefix & "TOPICS.TOPIC_ID = " & Topic_ID
strSql = strSql & " AND " & strActivePrefix & "TOPICS.FORUM_ID = " & Forum_ID
strSql = strSql & " AND " & strActivePrefix & "TOPICS.CAT_ID = " & Cat_ID
end if
set rsStatus = my_Conn.Execute(strSql)
if rsStatus.EOF or rsStatus.BOF then
Go_Result "Please don't attempt to edit the URL<br>to gain access to locked Forums/Categories.", 0
else
blnCStatus = rsStatus("CAT_STATUS")
blnFStatus = rsStatus("F_STATUS")
blnTStatus = rsStatus("T_STATUS")
strTopicAuthor = rsStatus("T_AUTHOR")
rsStatus.close
set rsStatus = nothing
end if
With:
if MethodType <> "Topic" then
'## Forum_SQL - Find out if the Category, Forum or Topic is Locked or Un-Locked and if it Exists
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS, " &_
strTablePrefix & "FORUM.F_STATUS, " &_
strActivePrefix & "TOPICS.T_STATUS, " &_
strActivePrefix & "TOPICS.T_AUTHOR " &_
" FROM " & strTablePrefix & "CATEGORY, " &_
strTablePrefix & "FORUM, " &_
strActivePrefix & "TOPICS " &_
" WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & strActivePrefix & "TOPICS.CAT_ID " &_
" AND " & strTablePrefix & "FORUM.FORUM_ID = " & strActivePrefix & "TOPICS.FORUM_ID " &_
" AND " & strActivePrefix & "TOPICS.TOPIC_ID = " & Topic_ID & ""
else
'## Forum_SQL - Find out if the Category or Forum is Locked or Un-Locked and if it Exists
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_STATUS, " &_
strTablePrefix & "FORUM.F_STATUS " &_
" FROM " & strTablePrefix & "CATEGORY, " &_
strTablePrefix & "FORUM " &_
" WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & strTablePrefix & "FORUM.CAT_ID " &_
" AND " & strTablePrefix & "FORUM.FORUM_ID = " & Forum_ID & ""
end if
set rsStatus = my_Conn.Execute(strSql)
if rsStatus.EOF or rsStatus.BOF then
Go_Result "Please don't attempt to edit the URL<br>to gain access to locked Forums/Categories."
else
blnCStatus = rsStatus("CAT_STATUS")
blnFStatus = rsStatus("F_STATUS")
if MethodType <> "Topic" then
blnTStatus = rsStatus("T_STATUS")
strTopicAuthor = rsStatus("T_AUTHOR")
else
blnTStatus = 1
end if
rsStatus.close
set rsStatus = nothing
end if
Note: After you've fixed this, you'll get another error...I'll post the link to the fix for that here asap.
Pierre
Join a Snitz Mailinglist