Welcome Guest Search | Active Topics | Log In | Register

Error while sending PM Options · View
soltys
#1 Posted : Friday, June 06, 2008 3:22:52 PM
Rank: Member




Joined: 6/5/2008
Posts: 21
Location: Warsaw, PL
I've noticed this error when i was sending private message

Cannot insert the value NULL into column 'IsRead', table 'ITMWB_Forum.dbo.yaf_UserPMessage'; column does not allow nulls. INSERT fails.
The statement has been terminated.

Code:
Line 324:                    messageFlags.IsBBCode = _editor.UsesBBCode;
Line 325:
Line 326:                    DB.pmessage_save( PageContext.PageUserID, recipientID [i], Subject.Text, body, messageFlags.BitValue );
Line 327:
Line 328:                    if ( PageContext.BoardSettings.AllowPMEmailNotification )
Jesterking
#2 Posted : Wednesday, June 18, 2008 5:51:57 PM

Rank: YAF Forumling


Joined: 6/3/2008
Posts: 2
I get the same error message when I allow PMs.
I have searched for the answer but have been unsuccessful.
Is there something that I'm missing?
soltys
#3 Posted : Friday, June 20, 2008 9:08:14 AM
Rank: Member




Joined: 6/5/2008
Posts: 21
Location: Warsaw, PL
I've solved it modyfying deafult values in db tables.

But another error is that when you send pm..and then another user recieves it..message is still unread..
soltys
#4 Posted : Wednesday, June 25, 2008 9:56:37 AM
Rank: Member




Joined: 6/5/2008
Posts: 21
Location: Warsaw, PL
Does any one have the same problem?
soltys
#5 Posted : Wednesday, June 25, 2008 11:59:10 AM
Rank: Member




Joined: 6/5/2008
Posts: 21
Location: Warsaw, PL
Nevermind Smile
I've made changes to procedure to update isread column.
billyboy
#6 Posted : Wednesday, June 25, 2008 12:38:16 PM
Rank: Member



Joined: 6/20/2008
Posts: 25
Location: NY
can y'all post your modifications or push a patch through svn, or,or...

Thanks,

soltys
#7 Posted : Thursday, June 26, 2008 9:14:15 AM
Rank: Member




Joined: 6/5/2008
Posts: 21
Location: Warsaw, PL
As a solution to null values in DB. I don't remember what tables shuold you modify...anyway check tables related with pmmessages and chcek wchich coulmns don't have default values..

For marking read messages:

modify "yaf_pmessage_markread" add " isread = 1" after update on flags.

For message archive:

modify "yaf_pmessage_archive" add " isarchived = 1" after update on flags.

That's all. Should work now Smile
Jaben
#8 Posted : Thursday, June 26, 2008 9:39:40 AM

Rank: YAF Head Dude



Joined: 10/10/2004
Posts: 2,949
Location: Honolulu, HI
Something didn't upgrade correctly here. IsRead is a calculated field in v1.9.3.

Run this sql:

Code:

update yaf_UserPMessage set Flags = IsRead where Flags IS NULL
update yaf_UserPMessage set Flags = 1 where Flags IS NULL
GO
alter table yaf_UserPMessage drop column IsRead
GO
alter table yaf_UserPMessage ADD [IsRead] AS (CONVERT([bit],sign([Flags]&(1)),(0)))
GO
"When you are grateful, fear disappears and abundance appears”."

soltys
#9 Posted : Thursday, June 26, 2008 9:52:06 AM
Rank: Member




Joined: 6/5/2008
Posts: 21
Location: Warsaw, PL
And same solution with archive pms?

Does my solution posted above has any sence? I mean..will it work in a long term :D
Jaben
#10 Posted : Thursday, June 26, 2008 11:23:47 AM

Rank: YAF Head Dude



Joined: 10/10/2004
Posts: 2,949
Location: Honolulu, HI
The problem is that your DB didn't convert properly. I'm not modifying the code because your version of the DB is incorrect.
"When you are grateful, fear disappears and abundance appears”."

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.3 RC2 | YAF © 2003-2008, Yet Another Forum.NET
This page was generated in 0.078 seconds.

SourceForge.net Logo Powered by ASP.NET v2.0 411ASP.NET