|
|
|
Joined: 11/15/2005
Posts: 32
|
|
|
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.
|
|
|
|
| |
|
|
|
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.
|
|
|
|
| |
|
|
Joined: 11/15/2005
Posts: 32
|
|
|
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
|
|
|
|
| |
|
|
|
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.
|
|
|
|
| |
|
|
Joined: 11/15/2005
Posts: 32
|
|
|
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.
|
|
|
|
| |