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)
 V33(.03) BUG+FIX: post_info.asp
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Nathan
Help Moderator

USA
7664 Posts

Posted - 16 January 2002 :  21:28:25  Show Profile  Visit Nathan's Homepage
Bug: Occurs when user is editing topic or reply and deletes all content of the post or subject.

Result:

Solution:

Replace all 13 instances of:
quote:
 %>
<p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">There Was A Problem With Your Details</font></p>

<table align=center border=0>
<tr>
<td><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<ul>
<% =Err_Msg %>
</ul>
</font></td>
</tr>
</table>

<p align=center><font face="<% =strDefaultFontFace %>" size=<% =strDefaultFontSize %>><a href="JavaScript:history.go(-1)">Go Back To Enter Data</a></font></p>
<%

With:
quote:
	Go_Result err_msg, 0
Response.End

And remove all 13 instances of both <li> and </li> from the file.

 Nathan Bales - Romans 15:13
---------------------------------

Snitz Exchange | Mod Resource

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 16 January 2002 :  21:50:21  Show Profile
Since the Go_Result sub is not setup to handle multiple errors, (try leaving both the Message and Subject Blank) we can do 1 of two things.

We could just add the following right before the end if in the 13 instances of the code you posted:

		WriteFooter
Response.End



Or, we could modify the Go_Result Sub to support multiple errors (and we would have to modify all places where Go_Result is called in the rest of the code).
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 16 January 2002 :  21:55:02  Show Profile
The second message was actually displaying because of the statement in red below.


set rs = nothing
Go_Result "", 1
response.end

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 16 January 2002 :  21:57:44  Show Profile
I was just going to post that.

Line #1386 & 1387:

Go_Result "", 1
response.end



should be changed to:

WriteFooter
Response.End
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 16 January 2002 :  22:10:23  Show Profile
When I was tweaking my post_info.asp I replaced all instances of the statement block pointed out by Nathan with Go_Result err_msg,0

Then here is how I Modified the sub Go_result



 
sub Go_Result(str_err_Msg, boolOk)
%><table border="0" width="100%">
<tr>
<td width="33%" align="left"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<img src="icons/icon_folder_open.gif" border="0" WIDTH="15" HEIGHT="15"> <a href="default.asp">All Forums</a><br>
<%if Request.form("Method_Type") = "Topic" or _
Request.form("Method_Type") = "TopicQuote" or _
Request.form("Method_Type") = "Reply" or _
Request.form("Method_Type") = "ReplyQuote" or _
Request.form("Method_Type") = "EditTopic" then
%> <img src="icons/icon_bar.gif" border="0" WIDTH="15" HEIGHT="15"><img src="icons/icon_folder_open.gif" border="0" WIDTH="15" HEIGHT="15"> <a href="link.asp?FORUM_ID=<% = Request.Form("FORUM_ID") %>"><% =ChkString(Request.Form("FORUM_Title"),"display") %></a><br>
<%end if
if Request.form("Method_Type") = "Reply" or _
Request.form("Method_Type") = "ReplyQuote" or _
Request.form("Method_Type") = "TopicQuote" or _
Request.form("Method_Type") = "EditTopic" then
%> <img src="icons/icon_blank.gif" border="0" WIDTH="15" HEIGHT="15"><img src="icons/icon_bar.gif" border="0" WIDTH="15" HEIGHT="15"><img src="icons/icon_folder_open_topic.gif" border="0" WIDTH="15" HEIGHT="15"> <a href="<% =Request.Form("refer") %>"><% =ChkString(Request.Form("Topic_Title"),"title") %></a>
<%end if
%> </font>
</td>
</tr>
</table>
<%if boolOk = 1 then
%> <p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">
<% select case Request.Form("Method_Type")
case "Edit"
Response.Write("Your Reply Was Changed Successfully!")
case "EditGroup"
Response.Write("Group Information Updated Successfully!")

case "EditCategory"
Response.Write("Category Information Updated Successfully!")
case "EditForum"
Response.Write("FORUM Information Updated Successfully!")
case "EditTopic"
Response.Write("Topic Changed Successfully!")
case "EditURL"
Response.Write("URL Information Updated Successfully!")
case "Reply"
Response.Write("New Reply Posted!")
DoPCount
DoUCount Request.Form("UserName")
DoULastPost Request.Form("UserName")
case "ReplyQuote"
Response.Write("New Reply Posted!")
DoPCount
DoUCount Request.Form("UserName")
DoULastPost Request.Form("UserName")
case "TopicQuote"
Response.Write("New Reply Posted!")
DoPCount
DoUCount Request.Form("UserName")
DoULastPost Request.Form("UserName")
case "Topic"
DoTCount
DoPCount
DoUCount Request.Form("UserName")
DoULastPost Request.Form("UserName")
Response.Write("New Topic Posted!")
case "Forum"
Response.Write("New Forum Created!")
case "URL"
Response.Write("New URL Created!")
case "Category"
Response.Write("New Category Created!")
case "Group"
Response.Write("New Group Created!")

case else
Response.Write("Complete!")
DoPCount
DoUCount Request.Form("UserName")
DoULastPost Request.Form("UserName")
end select
%> </font></p>
<meta http-equiv="Refresh" content="2; URL=<% =Request.Form("refer")%>">
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">
<% select case Request.Form("Method_Type")
case "Group"
Response.Write("Assign categories to this Group.")
case "EditGroup"
Response.Write("Thank you for your contribution!")
case "Category"
Response.Write("Remember to create at least one new forum in this category.")
case "EditCategory"
Response.Write("Thank you for your contribution!")
case "Forum"
Response.Write("The new forum is ready for users to begin posting!")
case "EditForum"
Response.Write("Thank you for your contribution!")
case "URL"
Response.Write("The new URL is in place!")
case "EditURL"
Response.Write("Cheers! Have a nice day!")
case "Topic"
Response.Write("Thank you for your contribution!")
case "TopicQuote"
Response.Write("Thank you for your contribution!")
case "EditTopic"
Response.Write("Thank you for your contribution!")
case "Reply"
Response.Write("Thank you for your contribution!")
case "ReplyQuote"
Response.Write("Thank you for your contribution!")
case "Edit"
Response.Write("Thank you for your contribution!")
case else
Response.Write("Have a nice day!")
end select
%> </font></p>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% =Request.Form("refer")%>">Back To Forum</font></a></p>
<%else
%> <p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">There has been a problem with the details!</font></p>
<p align="center"><font color="red" size="<% =strHeaderFontSize %>"><% =str_err_Msg %></font></p>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="JavaScript:history.go(-1)">Go back to correct the problem.</a></font></p>

<%end if
WriteFooter
Response.End
end sub



www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 17 January 2002 :  00:27:10  Show Profile  Visit Nathan's Homepage
Kinda off the topic of the bug. . .

but it shouldn't be really hard to make Go_Result fully self contained. Then it could be used throughout the forums. (For logon, for profiles, for admin panels, ect.)

The key would be to send success messages the same way as the error messages, and to add an additional argument to be a "forwarding path" for success messages. The bool would still be necissary to let the sub know wether it should look for a forward path or send the user back.

It wouldn't be hard to allow it to handle multiple error messages either.


if (This has a problem) then err_Msg = addGoErr("This has a problem")

function addGoErr(strErrMessage)
if err_Msg = "" then
addGoErr = strErrMessage
else
addGoErr = "<br><br>" & strErrMessage
end if
end function


Just my thoughts

 Nathan Bales - Romans 15:13
---------------------------------

Snitz Exchange | Mod Resource
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 17 January 2002 :  00:34:59  Show Profile
Well... Just doing the following fixes the bug:

quote:

I was just going to post that.

Line #1386 & 1387:

Go_Result "", 1
response.end



should be changed to:

WriteFooter
Response.End




It's been fixed here at this site and in v3.4
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.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07