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

HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...Error when editing any HTML moduleError when editing any HTML module
Previous
 
Next
New Post
4/28/2011 4:37 PM
 
Thanks for all the information William.
 
I was thinking it was an update to the database that didn't quite execute properly.
Let's see, in the SQLDataProvider folder there is only one non-empty file named 05.01.00.log.resources that has a series of ALTER TABLE database commands.
So apparently it's a problem to an upgrade I did before Monday's upgrade to 5.06.02. I just never needed to edit any content until this week when this error surfaced.
Do I need to find anything in particular in this log file?

Yes I do have backups to restore from.

And, yes,I do have SQL Server Management Studio and feel comfortable using it to make any changes. Just be very clear and as detailed as possible and I'll be fine.

I"m ready whenever you are.

Thank you.
Xavier
 
New Post
4/28/2011 8:46 PM
 
So, if the 05.02.00.log.resources file was empty and the 05.01.00.log.resources was the only log file showing an error, it's possible that the PortalSettings table is missing four columns that should have been added during the prior upgrade. These are CreatedByUserID, CreatedOnDate, LastModifiedByUserID and LastModifiedOnDate. The changes in 05.02.00 would have been to add a CultureCode column. In both upgrade scripts the related stored procedures GetPortalSetting, UpdatePortalSetting, etc. would have also been modified. I suspect that if you go to Admin --> Site Settings you will also get an error (either displayed or logged to the Event Viewer). Let's try this:

1.  Using SQL Server Management Studio, take a look at the PortalSettings table to see if all of the five columns mentioned above are present. If they are not this is a sign of more serious problems which will most likely mean a roll back to 04.09.05.
2.  Using SQL Server Management Studio, take a look at the following stored proceedures (easiest way is to right click over each stored procedure name in the object explorer pane then select "Script Stored Procedure As Drop and Create To File") - GetPortalSettings, GetPortalSetting, UpdatePortalSetting, DeletePortalSetting. Then, compare each to the drop/create script for the same named stored procedures in the file \Providers\DataProviders\SqlDataProvider\05.02.00.SqlDataProvider looking in particular at any differences in references to the above five columns. Note that the {objectQualifier} and {databaseOwner} tokens in the 05.02.00.SqlDataProvider script will have been replaced by the proper values (most likely a blank and dbo. respectively) for your installation. If one or more of the stored procedures is not correct, you'll then need to run the corresponding script (easiest in the Host-->SQL control with "Run as Script" checked as the {objectQualifier} and {databaseOwner} tokens will be automatically replaced. Otherwise if run in SQL Server Management Studio you'll need to manually replace the tokens with their proper values before executing the scripts.

Let me know what you find out and if you need further help.

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
4/28/2011 11:39 PM
Accepted Answer 
Hi William:
I'm following along and checking carefully. Here are the results:
1. In the PortalSettings table I have the following columns (in this order):
PortalID
SettingName
SettingValue
CreatedByUserID
CreatedOnDate 
LastModifiedByUserID 
LastModifiedOnDate

CultureCode
So this looks successful.

2. Under Programmability -> Stored Procedures I compared the entries in my database to the entries in the 05.02.00.SqlDataProvider file like you mentioned.
I noticed two discrepancies. First under GetPortalSettings. Under Parameters - the column entries are:
@PortalID
@CultureCode
Returns integer [end]

So if I'm understanding you correctly, then the columns: CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate are all missing.

Second under the UpdatePortalSetting - Parameters the column entries are:
@PortalID
@SettingName
@SettingValue
@UserID
Returns integer [end]

So apparently these columns are missing: CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate,CultureCode

The other 2 entries (GetPortalSetting and DeletePortalSetting) in the 05.02.00.SqlDataProvider file are a bit more involved ( with View creations, etc.) so I didn't investigate further.
So if I did this correctly I believe your synopsis is dead on: not all the columns were created in the upgrade process.
So if the solution is in fact to run the scripts you mention:
Could you please clarify exactly what scripts I need to run and point me to where they are located.
Also should these be run in any specific order?
Besides looking out for any error messages, can I verify if I was successful by any other way other than doing what I just did (a manual comparison)?

Thank you so much for your help so far and yes I would appreciate your help with the questions above.


 
New Post
4/29/2011 12:35 AM
 
Sorry William. Please overlook all that drivel in section 2 of my earlier post regarding parameters. I'm a bit tired and when I followed your instructions to 'script the stored procedure to file' all I kept getting was the following:

USE [C:\Dotnetnuke\App_Data\Database.mdf]

GO
/****** Object:  StoredProcedure [dbo].[GetPortalSetting]    Script Date: 04/28/2011 22:18:59 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetPortalSetting]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[GetPortalSetting]

One for each of the 4 corresponding stored procedures (as I highlighted). Since I couldn't compare this to anything in the 05.02.00.SqlDataProvider file, I accidentally focused my attention on the entries in the Parameters folder. So sorry.
Anyway I decided to take another approach:
Correct me if I'm wrong but in my database, I decided to go to each of the 4 stored procedures you mentioned, right clicked and chose MODIFY to view them. Then I did the comparison of what was there to the corresponding section in 05.02.00.SqlDataProvider file.
Doing it this way I didn't see anything out of the ordinary. The entries were pretty much identical.
If you'd like I can copy and paste what is showing in each of the stored procedures in my database so you can view them and make sure.
For example, under UpdatePortalSetting my database shows this when I right-click and choose Modify:

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[UpdatePortalSetting]
@PortalID      int,
@SettingName   nvarchar(50),
@SettingValue  nvarchar(2000),
@UserID int

AS
IF (SELECT COUNT(*) FROM dbo.PortalSettings WHERE PortalID = @PortalID AND SettingName = @SettingName) > 0
--Update
UPDATE  dbo.PortalSettings
SET SettingValue = @SettingValue,
[LastModifiedByUserID]=@UserID,
[LastModifiedOnDate]=getdate()
WHERE PortalID = @PortalID
AND SettingName = @SettingName
ELSE
--Add
INSERT INTO dbo.PortalSettings ( PortalID, SettingName, SettingValue, CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate ) 
VALUES ( @PortalID, @SettingName, @SettingValue ,@UserID ,getdate() ,@UserID ,getdate())

I don't see anything different from what appears in the corresponding section 05.02.00.SqlDataProvider file for each of the SPs. (Or I'm just not seeing well)
So if this is the right way to do what you stipulated, then the problem may be something else.
Please let me know your thoughts.
Thanks again
Xavier

 
New Post
4/29/2011 7:24 AM
 
Xavier,

The right-click and Modify will work fine. For some reason when you scripted to file only the DROP and not the CREATE was showing. In regards to the differences between what you are seeing and what the correct stored procedures should be, here are the correct ones scripted from an install of DNN 5.6.2. Note that the below UpdatePortalSetting procedure includes the @CultureCode parameter while yours does not:

***************************************************************************

ALTER PROCEDURE [dbo].[UpdatePortalSetting]

@PortalID int,

@SettingName nvarchar(50),

@SettingValue nvarchar(2000),

@UserID int,

@CultureCode nvarchar(50)

AS

IF (SELECT COUNT(*) FROM dbo.PortalSettings WHERE PortalID = @PortalID AND SettingName = @SettingName) > 0

--Update

UPDATE dbo.PortalSettings

SET SettingValue = @SettingValue,

[LastModifiedByUserID]=@UserID,

[LastModifiedOnDate]=getdate()

WHERE PortalID = @PortalID

AND SettingName = @SettingName

 

ELSE

--Add

INSERT INTO dbo.PortalSettings ( PortalID, SettingName, SettingValue, CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate,CultureCode )

VALUES ( @PortalID, @SettingName, @SettingValue ,@UserID ,getdate() ,@UserID ,getdate(),@CultureCode)

GO

ALTER PROCEDURE [dbo].[GetPortalSetting]

@PortalID int,

@SettingName nvarchar(50),

@CultureCode nvarchar(50)

AS

SELECT

CASE WHEN LEFT(LOWER(dbo.PortalSettings.SettingValue), 6) = 'fileid'

THEN

(SELECT Folder + FileName

FROM dbo.Files

WHERE 'fileid=' + convert(varchar,dbo.Files.FileID) = dbo.PortalSettings.SettingValue

)

ELSE

dbo.PortalSettings.SettingValue

END

AS SettingValue

FROM dbo.PortalSettings

WHERE PortalID = @PortalID

AND SettingName = @SettingName

GO

ALTER PROCEDURE [dbo].[GetPortalSettings]

@PortalID int,

@CultureCode nvarchar(50)

AS

SELECT

SettingName,

CASE WHEN LEFT(LOWER(dbo.PortalSettings.SettingValue), 6) = 'fileid'

THEN

(SELECT Folder + FileName

FROM dbo.Files

WHERE 'fileid=' + convert(varchar,dbo.Files.FileID) = dbo.PortalSettings.SettingValue

)

ELSE

dbo.PortalSettings.SettingValue

END

AS SettingValue,

dbo.PortalSettings.CreatedByUserID,

dbo.PortalSettings.CreatedOnDate,

dbo.PortalSettings.LastModifiedByUserID,

dbo.PortalSettings.LastModifiedOnDate,

dbo.PortalSettings.CultureCode

FROM dbo.PortalSettings

WHERE PortalID = @PortalID

GO

ALTER PROCEDURE [dbo].[DeletePortalSetting]

@PortalID int,

@SettingName nvarchar(50),

@CultureCode nvarchar(50)

AS

DELETE FROM dbo.PortalSettings

WHERE PortalID = @PortalID

AND SettingName = @SettingName

GO

*********************************************************************

You should be able to copy all of the above ALTER PROCEDURE statements (between the ****************) , paste them into a new query window, and execute them to correct the outdated stored procedures.

I also noticed that your site is using the attached \App_Data\Database.mdf database file included with DotNetNuke and am assuming that to access it in SQL Server Management Studio you first attached to it. Are you sure that this is the database that your DotNetNuke installation is using? You can check the web.config connectionStrings section to confirm what database is in use. If you are, in fact, using Database.mdf, you may have already noticed that DotNetNuke can no longer access the database. Please see the following blog post from Shawn Mehaffie for the fix to this issue:

http://www.dotnetnuke.com/Community/B...


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...Error when editing any HTML moduleError when editing any HTML module


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