Welcome Guest Search | Active Topics | Members | Log In | Register

YANet forum 1.9.1.8 problem with moderate board
webguru Offline
#1 Posted : Friday, July 11, 2008 3:17:31 AM(UTC)
Rank: YAF Forumling

Joined: 7/11/2008(UTC)
Posts: 8
Location: GA

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
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 Offline
#2 Posted : Saturday, July 12, 2008 5:23:00 AM(UTC)

Rank: YAF Head Dude

Medals: Medal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.Medal of Honor for the Support King: Given to a community member who tirelessly answers tons of support questions.

Joined: 10/9/2004(UTC)
Posts: 4,152
Location: Raleigh, NC

Thanks: 35 times
Was thanked: 94 time(s) in 49 post(s)
Try my solution here: http://forum.yetanotherf...ot-fix-this-problem.aspx
"I have a simple philosophy: Fill what's empty. Empty what's full. Scratch where it itches.”.

webguru Offline
#3 Posted : Tuesday, July 22, 2008 5:32:35 AM(UTC)
Rank: YAF Forumling

Joined: 7/11/2008(UTC)
Posts: 8
Location: GA

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
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 Offline
#4 Posted : Tuesday, July 22, 2008 5:40:07 AM(UTC)
Rank: YAF Forumling

Joined: 7/11/2008(UTC)
Posts: 8
Location: GA

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
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.4 RC4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.136 seconds.