YAFLogo

Dimi
  • Dimi
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
11 years ago
Here is the very latest version of the Forum. I created Category, then several forums. Each forum needs the same sub-forum called Overview. I created one - ok, when I tried to create the second one the app failed. The option to emable forums with the same names is ENABLED. Here is the error message:

Violation of UNIQUE KEY constraint 'IX_yaf_Forum'. Cannot insert duplicate key in object 'dbo.yaf_Forum'.

Cannot insert the value NULL into column 'ForumID', table 'EyePlusLensForum.dbo.yaf_ForumAccess'; column does not allow nulls. INSERT fails.

The statement has been terminated.

The statement has been terminated.

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.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'IX_yaf_Forum'. Cannot insert duplicate key in object 'dbo.yaf_Forum'.

Cannot insert the value NULL into column 'ForumID', table 'EyePlusLensForum.dbo.yaf_ForumAccess'; column does not allow nulls. INSERT fails.

The statement has been terminated.

The statement has been terminated.

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:

[SqlException (0x80131904): Violation of UNIQUE KEY constraint 'IX_yaf_Forum'. Cannot insert duplicate key in object 'dbo.yaf_Forum'.

Cannot insert the value NULL into column 'ForumID', table 'EyePlusLensForum.dbo.yaf_ForumAccess'; column does not allow nulls. INSERT fails.

The statement has been terminated.

The statement has been terminated.]

System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2030802

System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009584

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234

System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275

System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33

System.Data.SqlClient.SqlDataReader.get_MetaData() +86

System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +311

System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987

System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162

System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32

System.Data.SqlClient.SqlCommand.ExecuteScalar() +139

YAF.Classes.Data.MsSqlDbAccess.ExecuteScalar(IDbCommand cmd, Boolean transaction) +214

YAF.Types.Interfaces.IDbAccessExtensions.ExecuteScalar(IDbAccess dbAccess, IDbCommand cmd) +56

YAF.Classes.Data.LegacyDb.forum_save(Object forumID, Object categoryID, Object parentID, Object name, Object description, Object sortOrder, Object locked, Object hidden, Object isTest, Object moderated, Object accessMaskID, Object remoteURL, Object themeURL, Object imageURL, Object styles, Boolean dummy) +477

YAF.Pages.Admin.editforum.Save_Click(Object sender, EventArgs e) +2953

System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118

System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10

System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13

System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36

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


Dimi

UserPostedImage

Sponsor

Dimi
  • Dimi
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
11 years ago
One more issue. After complete restructuring of the entire forum I decided to delete the olf sub-forum and got this:

The page cannot be displayed because an internal server error has occurred.

After changing customErrors=Off the error disappeared, so I didn't get any details. And was able to finally delete the obsolete sub-forum with no problems. I think I will keep this option for some period of time to keep tracking this and other bugs.


Dimi

UserPostedImage

JP
  • JP
  • 100% (Exalted)
  • YAF Leader
11 years ago
In the admin host section -> Permissions there is an option (checkbox) to allow forums with the name name.

Have you tried this?


He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
Dimi
  • Dimi
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
11 years ago
Originally Posted by: JP 

In the admin host section -> Permissions there is an option (checkbox) to allow forums with the name name.

Have you tried this?

Did you read that in the original posting? "The option to emable forums with the same names is ENABLED"


Dimi

UserPostedImage

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
11 years ago
The bug confirmed. I've dropped the constraint It should not be a problem. It it will be a problem the same forum name possibility will be disabled forever. It's a pity because it's useful for me too:(
JP
  • JP
  • 100% (Exalted)
  • YAF Leader
11 years ago
Originally Posted by: Dimi 

Did you read that in the original posting? "The option to emable forums with the same names is ENABLED"

Must get glasses... Sorry...😊


He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]