Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumCan not post after upgrading to 5.0.0Can not post after upgrading to 5.0.0
Previous
 
Next
New Post
12/5/2010 8:10 AM
 
I upgraded to V5.0.0 of the forum a few days ago but now have disscovered that you can no longer post to the forum. It was part of a number of upgrades I did so did not think to check this. When you post you get the following error.

Error: is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Cannot insert the value NULL into column 'Addressed', table 'db169059670.dbo169059670.Forum_Posts'; column does not allow nulls. INSERT fails. The statement has been terminated. ---> System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'Addressed', table 'db169059670.dbo169059670.Forum_Posts'; column does not allow nulls. INSERT fails. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Modules.Forum.SqlDataProvider.PostAdd(Int32 ParentPostID, Int32 ForumID, Int32 UserID, String RemoteAddr, String Subject, String Body, Boolean IsPinned, DateTime PinnedDate, Boolean IsClosed, Int32 PortalID, Int32 PollID, Boolean IsModerated, Int32 ParseInfo) at DotNetNuke.Modules.Forum.PostController.PostAdd(Int32 ParentPostID, Int32 ForumID, Int32 UserID, String RemoteAddr, String Subject, String Body, Boolean IsPinned, DateTime PinnedDate, Boolean IsClosed, Int32 PortalID, Int32 PollID, Boolean IsModerated, Int32 GroupID, Int32 ParentID, Int32 ParseInfo) at DotNetNuke.Modules.Forum.PostConnector.PostToDatabase(Int32 TabID, Int32 ModuleID, Configuration objConfig, Int32 PortalID, ForumUserInfo objForumUser, String PostSubject, String PostBody, ForumInfo objForum, Int32 ParentPostID, Int32 PostID, Boolean IsPinned, Boolean IsClosed, Boolean ReplyNotify, ThreadStatus Status, String lstAttachmentFileIDs, String RemoteAddress, Int32 PollID, Int32 ThreadID, PostAction objAction, Boolean IsModerated, List`1 Terms) at DotNetNuke.Modules.Forum.PostConnector.PostingValidation(Int32 TabID, Int32 ModuleID, Int32 PortalID, Int32 UserID, String PostSubject, String PostBody, Int32 ForumID, Int32 ParentPostID, Int32 PostID, Boolean IsPinned, Boolean IsClosed, Boolean ReplyNotify, ThreadStatus Status, String lstAttachmentFileIDs, String RemoteAddress, Int32 PollID, Boolean IsQuote, String Provider, Int32 ThreadID, List`1 Terms) at DotNetNuke.Modules.Forum.PostConnector.SubmitInternalPost(Int32 TabID, Int32 ModuleID, Int32 PortalID, Int32 UserID, String PostSubject, String PostBody, Int32 ForumID, Int32 ParentPostID, Int32 PostID, Boolean IsPinned, Boolean IsClosed, Boolean ReplyNotify, ThreadStatus Status, String AttachmentFileIDs, String RemoteAddress, Int32 PollID, Boolean IsQuote, Int32 ThreadID, List`1 Terms) at DotNetNuke.Modules.Forum.PostEdit.cmdSubmit_Click(Object sender, EventArgs e) --- End of inner exception stack trace ---

I would normally just roll back but unfortunately that would mean loosing 4 days of website activity which I can not do.

The only slightly unusual thing I did when installing was adding some missing {databaseOwner} tags to the 04.06.01.SqlDataProvider upgrade file however this is something I do often and have grown used to when upgrading anything with DNN.
 
New Post
12/5/2010 8:38 AM
 
have there been any issues running the upgrade scripts? Please compare "Fourms_Post_add Stored procedure with latest version to be found in the upgrade scripts.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
12/5/2010 10:12 AM
 
They are different, it looks like the scripts did not run correctly. I do not remember getting any errors once I had added the {databaseOwner} to that upgrade script. It said installed successfully or I would not have carried on.  Should I run the scripts again manually?

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO


ALTER PROCEDURE [dbo169059670].[Forum_Post_Add]
    @ParentPostID INT,
    @ForumID INT,
    @UserID INT,
    @RemoteAddr NVARCHAR(100),
    @Subject NVARCHAR(255),
    @Body NVARCHAR(MAX),
    @IsPinned BIT,
    @PinnedDate DATETIME,
    @IsClosed BIT,
    @PortalID INT,
    @PollID INT,
    @IsModerated BIT,
    @ParseInfo INT
AS
    DECLARE @PostID INT
    DECLARE @ThreadID INT
    DECLARE @CreatedDate DATETIME
    DECLARE @ModeratedForum BIT
    DECLARE @GroupID INT
    DECLARE @DateApproved DATETIME
    DECLARE @IsApproved BIT

    SELECT  @CreatedDate = GETDATE()
    
    IF @IsModerated = 0
        BEGIN
            SET @IsApproved = 1
            SET @DateApproved = GETDATE()
        END
    ELSE
        BEGIN
            SET @IsApproved = 0
        END
        
    IF @ParentPostID = 0 -- New Thread
        BEGIN     
            INSERT  dbo169059670.Forum_Posts
                    (
                      ParentPostID,
                      UserID,
                      RemoteAddr,
                      [Subject],
                      Body,
                      CreatedDate,
                      UpdatedDate,
                      IsApproved,
                      IsClosed,
                      DateApproved,
                      ParseInfo,
                      PostReported
                    )
            VALUES  (
                      @ParentPostID,
                      @UserID,
                      @RemoteAddr,
                      @Subject,
                      @Body,
                      @CreatedDate,
                      @CreatedDate,
                      @IsApproved,
                      @IsClosed,
                      @DateApproved,
                      @ParseInfo,
                      0
                    )
            SET @PostID = SCOPE_IDENTITY()
            SET @ThreadID = @PostID
            
            EXEC dbo169059670.Forum_Thread_Add @ThreadID, @ForumID, @IsPinned,
                @PinnedDate, @PollID

            UPDATE  dbo169059670.Forum_Posts
            SET     ThreadID = @ThreadID
            WHERE   PostID = @PostID       
            
            EXEC dbo169059670.Forum_UserThreadsAdd @UserID, @ThreadID, @CreatedDate   
        END
    ELSE -- Reply
        BEGIN
        
            SET @ThreadID = ( SELECT    ThreadID
                              FROM      dbo169059670.Forum_Posts
                              WHERE     PostID = @ParentPostID
                            )
            INSERT  dbo169059670.Forum_Posts
                    (
                      ParentPostID,
                      UserID,
                      RemoteAddr,
                      [Subject],
                      Body,
                      CreatedDate,
                      ThreadID,
                      UpdatedDate,
                      IsApproved,
                      IsClosed,
                      DateApproved,
                      ParseInfo,
                      PostReported
                    )
            VALUES  (
                      @ParentPostID,
                      @UserID,
                      @RemoteAddr,
                      @Subject,
                      @Body,
                      @CreatedDate,
                      @ThreadID,
                      @CreatedDate,
                      @IsApproved,
                      @IsClosed,
                      @DateApproved,
                      @ParseInfo,
                      0
                    )
            SELECT  @PostID = @@IDENTITY
            
            IF @IsModerated = 0
                BEGIN       
                    EXEC dbo169059670.Forum_AA_ThreadUpdate @ThreadID, @PostID,
                        @IsPinned, @PinnedDate, 'postadd', @PollID
                END   
        END   

    IF @IsModerated = 0
        BEGIN
            EXEC dbo169059670.Forum_AA_UserPostCountUpdate @UserID, @PortalID
            EXEC dbo169059670.Forum_Forum_PostAdded @ForumID, @ThreadID, @PostID,
                @UserID, 'add'
        END
    ELSE
        BEGIN
            EXEC dbo169059670.Forum_Forum_PostAdded @ForumID, @ThreadID, @PostID,
                @UserID, 'submit'
        END
    SELECT  @PostID
 
New Post
12/5/2010 1:04 PM
 
hm, usually DNN does not use ALTER Procedure, but DROP and re-CREATE it. You need to make sure, the proper stored procedures are in place.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
12/5/2010 6:03 PM
 
I think the ALTER is left over from about 4 years ago when I had the website hosted on a 1and1 server. Something went wrong with the server so they moved me to a new machine but the new database had a different owner. So I had to go through all the stored procedures and manually change all the owners.

The upgrde script for V5.0.0 does drop the stored procedure though so not sure why this did not happen. I will try running the scripts again, step by step and check the procedures are dropped.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumCan not post after upgrading to 5.0.0Can not post after upgrading to 5.0.0


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out