YAFLogo

abcd
  • abcd
  • 64.2% (Friendly)
  • YAF Lover Topic Starter
12 years ago
After upgrading to 1.9.6 beta version successful, I have an error when I submit a new topic.

can you look at on this error. thanks

Server Error in '/' Application.

--------------------------------------------------------------------------------

Value was either too large or too small for an Int16.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.OverflowException: Value was either too large or too small for an Int16.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[OverflowException: Value was either too large or too small for an Int16.]

System.Int16.Parse(String s, NumberStyles style, NumberFormatInfo info) +6071964

System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) +12814262

System.Convert.ChangeType(Object value, Type conversionType) +133

YAF.Classes.Pattern.RegistryDictionary.GetValue(String name, T defaultValue) +206

YAF.Classes.Pattern.RegistryDictionaryOverride.GetValue(String name, T defaultValue, Boolean allowOverride) +191

YAF.Classes.YafBoardSettings.get_MaxPostSize() +58

YAF.Controls.MessagePostData.TruncateMessage(String message) +47

YAF.Controls.MessagePostData.RenderMessage(HtmlTextWriter writer) +534

YAF.Controls.MessagePost.Render(HtmlTextWriter writer) +154

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246

System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15

System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246

YAF.Core.ForumPage.Render(HtmlTextWriter writer) +31

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246

YAF.Forum.Render(HtmlTextWriter writer) +307

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246

System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +315

System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48

System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246

System.Web.UI.Page.Render(HtmlTextWriter writer) +40

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5290

--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
12 years ago
Its a known Bug and fixed in the final version. Please descrease the max post size value to 32767 to fix the issue.
abcd
  • abcd
  • 64.2% (Friendly)
  • YAF Lover Topic Starter
12 years ago

Its a known Bug and fixed in the final version. Please descrease the max post size value to 32767 to fix the issue.

Originally Posted by: tha_watcha 

thanks tha_watcha, how I do it to correct this error ?

I still get this error when go to Host Settings.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
12 years ago

Its a known Bug and fixed in the final version. Please descrease the max post size value to 32767 to fix the issue.

Originally Posted by: abcd 

thanks tha_watcha, how I do it to correct this error ?

I still get this error when go to Host Settings.

Originally Posted by: tha_watcha 

If possible you change the value directly in the Database or you change the code by replacing the line

return this._reg.GetValue("MaxPostSize", Int16.MaxValue);

with

return this._reg.GetValue("MaxPostSize", short.MaxValue);

in the File YafBoardSettings.cs

traelin
  • traelin
  • 51.2% (Neutral)
  • YAF Forumling
11 years ago
Just out of curiosity, but is this bug really fixed? I am trying to PM a user who reported a post using the "Reply to..." link on yaf_moderate_reportedposts.aspx, as defined in base control BaseReportedPosts.cs and I still get the above exception in v1.9.6.1.