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 (Open)
 bug in pop_mail.asp 3.4.07
 New Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 3

AnonJr
Moderator

United States
5765 Posts

Posted - 16 July 2009 :  09:33:43  Show Profile  Visit AnonJr's Homepage
quote:
Originally posted by modifichicci

I think the problem is not the inizialization I am afraid, as in a new install there is not the problem.
It is in an update that the field isn't filled With a value (0 or 1) in previous members.

That is exactly the problem. New installs get set up properly, I just forgot to add to the upgrade script some code to properly set existing members.
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 16 July 2009 :  09:42:29  Show Profile  Visit modifichicci's Homepage
My fix work properly, if you would give a look.

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

AnonJr
Moderator

United States
5765 Posts

Posted - 16 July 2009 :  11:58:30  Show Profile  Visit AnonJr's Homepage
I've been meaning to get back to it... this is the busiest time of the year for us at work so it probably won't be for a while... sorry.
Go to Top of Page

mkelley
Junior Member

112 Posts

Posted - 26 July 2009 :  08:56:22  Show Profile
I'm getting this even on a brand new install -- so it's definitely some kind of error in the basic forum code.

I'll try ONE of the fixes noted above, even though it's not particularly clear to me which one to use.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20579 Posts

Posted - 26 July 2009 :  10:00:12  Show Profile  Visit HuwR's Homepage
you seem to be the only instance of it affecting new installs, which would seem a bit strange.
Go to Top of Page

ZkilfinG
Starting Member

10 Posts

Posted - 30 July 2009 :  09:49:38  Show Profile
quote:
Originally posted by Carefree

In lieu of a DBS script, you could save this as "allowem.asp" and run it. That way it would remain a one-time use file.

[...]



Thanks for the fix. It didn't work for me, but I just had to change it a bit. M_ALLOWEMAIL <> 0 didn't resolve any hits, I'm not sure if they're null or empty strings for me, and what the correct code to resolve it would be (using access for the forum, but not used to working with it). Since I had no special users allowed I just removed the WHERE entirely. And since I didn't want everybody allowed I changed the value to 0 also. Ie this:

<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header_short.asp"-->
<%
if mLev > 2 then
	strSql="UPDATE " & strMemberTablePrefix & "MEMBERS SET M_ALLOWEMAIL = 0"
	set rs = Server.CreateObject("ADODB.Recordset")
	rs.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
	set rs=Nothing
else
	Response.Redirect "default.asp"
end if
WriteFooterShort
Response.Redirect "default.asp"
%>
Go to Top of Page

Gaisa
Starting Member

4 Posts

Posted - 10 September 2009 :  12:32:57  Show Profile
Cheers! that worked a charm!
quote:
Originally posted by modifichicci


Go to Top of Page

Saltydawg88
Starting Member

USA
1 Posts

Posted - 07 October 2009 :  10:43:06  Show Profile  Visit Saltydawg88's Homepage
Im sorry guys Maybe i'm jsut too new to this, but all of my furm was working properly and now it not. I have tried the fixes in the thread, but this is what I got:

I started out with the error:

Microsoft VBScript runtime error '800a005e'

Invalid use of Null: 'cInt'

/forum/pop_mail.asp, line 68

I then made the changes like it said:

quote:
Originally posted by modifichicci

tested on an access db and working

change
intAllowEmail = cInt(rs("M_ALLOWEMAIL"))

with

checkAllowedmail = rs("M_ALLOWEMAIL")

if isnull(checkAllowedmail) then

strSql="UPDATE " & strMemberTablePrefix & "MEMBERS SET M_ALLOWEMAIL = 0 WHERE MEMBER_ID = " & MemberID
set rsmail = Server.CreateObject("ADODB.Recordset")
rsmail.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
set rsmail=Nothing
strSql = "SELECT M_ALLOWEMAIL FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE MEMBER_ID = " & MemberID

set rs1 = my_Conn.Execute (strSql)
intAllowEmail = cInt(rs1("M_ALLOWEMAIL"))
rs1.close
else
intAllowEmail = cInt(rs("M_ALLOWEMAIL"))
end if



so if the value is null it updates field and then retrive the variable, if it is not null it charge the value.

So the routine is used only if necessary.



And now I get the error:

Microsoft VBScript compilation error '800a0409'

Unterminated string constant

/forum1/pop_mail.asp, line 72

strSql="UPDATE " & strMemberTablePrefix & "MEMBERS SET M_ALLOWEMAIL = 0 WHERE MEMBER_ID = " & MemberID"
-------------------------------------------------------------------------------------------------------^


What am I missing? Im sorry, but this is all greek to me, but Im trying to learn. If you need any more info please let me know.


Edited by - Saltydawg88 on 07 October 2009 11:17:24
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20579 Posts

Posted - 07 October 2009 :  11:18:11  Show Profile  Visit HuwR's Homepage
you didn't copy the fix correctly, there should not be a " after MemberID
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000 Version 3.4.07