Welcome Guest Search | Active Topics | Log In | Register

YANet forum 1.9.1.8 problem with moderate board Options · View
webguru
#1 Posted : Friday, July 11, 2008 8:17:31 PM

Rank: YAF Forumling


Joined: 7/11/2008
Posts: 8
Location: GA
I installed Yet Another Forum v1.9.1.8 on my server, then I created a board/forum with moderate turned on. Everything was fine but yesterday the front page could not be accessed with the following error log since:
Quote:

Thread information:
Thread ID: 1
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.DBNull.System.IConvertible.ToDateTime(IFormatProvider provider)
at System.Convert.ToDateTime(Object value)
at ASP.pages_forum_ascx.__DataBind__control10(Object sender, EventArgs e) in e:\WebDocs\Apps\Forum\pages\forum.ascx:line 76


According to the error log, I looked up the code of page/forum.ascx file and found the LastPosted Date caused this problem. That Last Posted Date was called from the Active Discussion topic section on the front page. I opened the database and found a new topic in the topic table with null value in the LastPosted column. When I added a date time in that column, my forum came back again.

Curiously I went to my forum, and created a new topic in the forum. I got a message said since this is a moderated forum, my post could not be seen till the moderator approves. And after a few, the forum crashed again. I am not sure why this happened, but I doubt there was a bug in the code during moderate mode. If I turn off the moderate, so far, not such crash thing happened. Please help, since we need the forum to be moderated at this moment.

By the way, right now we only have one forum/category setup. And I will give out the URL if anyone is interested on taking a look. Thanks
Jaben
#2 Posted : Saturday, July 12, 2008 10:23:00 PM

Rank: YAF Head Dude



Joined: 10/10/2004
Posts: 2,963
Location: Honolulu, HI
Try my solution here: http://forum.yetanotherf...ot-fix-this-problem.aspx
"When you are grateful, fear disappears and abundance appears”."

webguru
#3 Posted : Tuesday, July 22, 2008 10:32:35 PM

Rank: YAF Forumling


Joined: 7/11/2008
Posts: 8
Location: GA
I tried your suggestion (changed to
Code:
<%# FormatDateTimeTopic( Convert.ToDateTime( DataBinder.Eval( Container.DataItem, "LastPosted" ) ) )%>
in forum.asxc file) but it did not work.
webguru
#4 Posted : Tuesday, July 22, 2008 10:40:07 PM

Rank: YAF Forumling


Joined: 7/11/2008
Posts: 8
Location: GA
Smile Do not laught to yourself, but i just looked at your suggested code again and found it should be
Code:
<%# FormatDateTimeTopic( Convert.ToDateTime( DataBinder.Eval( Container.DataItem, "LastPosted" ) == DBNull.Value ? DateTime.Now : DataBinder.Eval( Container.DataItem, "LastPosted" ) ) )%>


After my change above, the moderated forum is working now. Thanks for the headsup and I posted here for your future reference (http://lichao.net/eblog/fix-a-bug-in-yetanotherforum-version-1918-200807158.html).
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.079 seconds.

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