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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Strange Error when logging in...
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

CirruZZ
Starting Member

Sweden
20 Posts

Posted - 05 September 2005 :  08:32:31  Show Profile
I have been doing some own modding on our forum and over the night something must have messed up.

The only thing I have change is in login.asp, I have removed the possibility to check “Remember password” and manually removed some links for registration and questions.

I start to log in, and it seems fine. I get the confirmation message that I’m logged in and it the, after a second, redirects me to the forum. Here comes the error….in inc_header.asp I get the following error

Microsoft VBScript runtime error '800a000d' 
Type mismatch 
/forum/inc_header.asp, line 503

Here is the code section referred to in inc_header.asp, line 503 in red…

	' DEM --> Start of code added to show subscriptions if they exist
	if (strSubscription > 0) then
		if mLev = 4 and SubCount > 0 then
			Response.Write	"          |" & vbNewline & _
					"          <a href=""subscription_list.asp?MODE=all""" & dWStatus("See all current subscriptions") & " tabindex=""-1""><acronym title=""See all current subscriptions"">All Subscriptions</acronym></a>" & vbNewline
		end if
		if MySubCount > 0 then
			Response.Write	"          |" & vbNewline & _
					"          <a href=""subscription_list.asp""" & dWStatus("See all of your subscriptions") & " tabindex=""-1""><acronym title=""See all of your subscriptions"">My Subscriptions</acronym></a>" & vbNewline
		end if
	end if
	' DEM --> End of Code added to show subscriptions if they exist



I have done some checking and mLev is in my case 4 and SubCount 47. Anyone got a clue where to look for the error?

Edited by - ruirib on 05 September 2005 19:00:11

AnonJr
Moderator

United States
5768 Posts

Posted - 05 September 2005 :  08:45:13  Show Profile  Visit AnonJr's Homepage
Do you have a link to a txt copy of inc_header.asp? It sounds like you might have removed a little too much... though I can't be sure.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 05 September 2005 :  08:47:07  Show Profile
Not sure if this will solve it but find the following on line 458 of inc_header.asp:

SubCount = rsCount("SubCount")

And replace it with the following:

SubCount = clng(rsCount("SubCount"))


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

CirruZZ
Starting Member

Sweden
20 Posts

Posted - 05 September 2005 :  09:54:34  Show Profile
Hey guys....
I have done some more testing. I quoted away the hole section I mentioned before and then I got the following error…

Microsoft VBScript runtime error '800a000d' 
Type mismatch 
/forum/inc_moderation.asp, line 78

Code…

		set rsCheck = my_Conn.Execute(strSql)
		if not rsCheck.EOF then
			PostCount = rsCheck("PostCount")
		else
			PostCount = 0
		end if
		if PostCount = 0 then
			' If no unmoderated posts are found on the topic table, check the replies.....
			strSql = "Select Count(*) as PostCount"
			strSql = strSql & " FROM " & strTablePrefix & "REPLY R"
			if CType = "CAT" then
				strSql = strSql & " WHERE R.CAT_ID = " & CatID & " AND R.R_STATUS > 1 "
			elseif CType = "FORUM" then
				strSql = strSql & " WHERE R.FORUM_ID = " & ForumID & " AND R.R_STATUS > 1 "

PoustCount is 0 in my case.

Shaggy: Sorry, it did not make any change.

AnonJr: The thing is that I haven’t changed anything in inc_header.asp. I only did some changes in login.asp (line 132 and line 141-150).

I rely appreciate the help!

Edited by - CirruZZ on 05 September 2005 10:04:54
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 05 September 2005 :  10:08:29  Show Profile  Visit AnonJr's Homepage
Which version of VBScript are you running?
Go to Top of Page

CirruZZ
Starting Member

Sweden
20 Posts

Posted - 05 September 2005 :  10:13:25  Show Profile
quote:
Originally posted by AnonJr

Which version of VBScript are you running?


How do i check that? The forum is on a webb-hotel.
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 05 September 2005 :  10:21:56  Show Profile  Visit AnonJr's Homepage
create a page called "scriptversion.asp"

In it place:
Response.Write(ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion)


Upload it to your server and open the page in your browser. The scrip version will be displaid...

Or just place it at the top of an exsisting page and don't forget to do a "Response.End()" to stop further processing

It shouldn't matter, but who knows?
Go to Top of Page

CirruZZ
Starting Member

Sweden
20 Posts

Posted - 05 September 2005 :  11:14:39  Show Profile
VBScript 5.6
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 05 September 2005 :  11:23:37  Show Profile  Visit AnonJr's Homepage
Hmmm... I would have thought that Shaggy's suggestion would have worked...

what were the last few changes you made?
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 05 September 2005 :  12:00:52  Show Profile
Cirruzz, do you mean that you still received the same error after applying my change or that you now received the new, inc_moderation.asp error message? If the latter, make the same change 4 lines above the code you highlighted above.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

CirruZZ
Starting Member

Sweden
20 Posts

Posted - 05 September 2005 :  12:04:37  Show Profile
quote:
Originally posted by Shaggy

Cirruzz, do you mean that you still received the same error after applying my change or that you now received the new, inc_moderation.asp error message? If the latter, make the same change 4 lines above the code you highlighted above.




No, I did your sugestion sepretly but it didn't make any change, i still got the same error.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 05 September 2005 :  12:06:48  Show Profile
Immediately before the line that throws up the error message, can you try a response.write on the offending variable to make sure it has a value?


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

CirruZZ
Starting Member

Sweden
20 Posts

Posted - 05 September 2005 :  13:14:59  Show Profile
quote:
Originally posted by Shaggy

...can you try a response.write on the offending variable to make sure it has a value?




So i did...
	if (strSubscription > 0) then
		response.write "#" & mlev & "#" & subcount & "#"
		if mLev = 4 and SubCount > 0 then
			Response.Write	"          |" & vbNewline & _

Result : #4#47#

Same error...
Microsoft VBScript runtime  error '800a000d'
Type mismatch
/forum/inc_header.asp, line 504
Go to Top of Page

CirruZZ
Starting Member

Sweden
20 Posts

Posted - 05 September 2005 :  13:25:44  Show Profile
Hey guys I got some thing, check this out…

	if (strSubscription > 0) then
		response.write "#" &mlev & "#" & subcount & "#"
		if mLev = "4" and SubCount > "0"  then
			Response.Write	"          |" & vbNewline & _
					"          <a href=""subscription_list.asp?MODE=all""" & dWStatus("See all current subscriptions") & " tabindex=""-1""><acronym title=""See all current subscriptions"">All Subscriptions</acronym></a>" & vbNewline
		end if
		if MySubCount > 0 then
			Response.Write	"          |" & vbNewline & _
					"          <a href=""subscription_list.asp""" & dWStatus("See all of your subscriptions") & " tabindex=""-1""><acronym title=""See all of your subscriptions"">My Subscriptions</acronym></a>" & vbNewline
		end if
	end if

The error moved to the red line. Changes made in green.

Seems that it wants strings instead of numbers. Any idea why?
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 05 September 2005 :  13:31:34  Show Profile  Visit AnonJr's Homepage
I would find where mLev and SubCount are given their most recent values (before the problem comes up) and do a cInt() on them. It looks like it is expecting an integer, but contains a string...

So much fun for a "typeless" scripting language eh?

Incidentally, the W3Schools website is a wonderful reference.

Edited by - AnonJr on 05 September 2005 13:34:19
Go to Top of Page

CirruZZ
Starting Member

Sweden
20 Posts

Posted - 05 September 2005 :  13:41:35  Show Profile
The thing is that everything worked just fine when i went to bed last night, and now it dosent.

Is it possible that my server provider (webb hotel) have done someting to the server?

Edited by - CirruZZ on 05 September 2005 13:42:14
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07