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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...DNN5.0.1 Module Definition/Module Install problemDNN5.0.1 Module Definition/Module Install problem
Previous
 
Next
New Post
5/21/2009 2:50 PM
 

I've been creating a new module following the book DotNetNuke Module Programming and I'm running into some problems that it doesn't seem to have listed at all. I've created this module as a Web Site Project first and it all worked relatively fine. Now I'm trying to create it as a WAP to make it more secure and I'm running into problems.

When it was a WSP I was able to install the module but then I had to manuall create the Module Definition stating the controls associated with it. This was a pain and I noticed that in the WAP project that it has a .sqldataprovider file that is supposed to do that automatically. Well that seems to be my one big hold up. It throws me this error during installation:

SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Error converting data type nvarchar to int. Cannot insert the value NULL into column 'DesktopModuleID', table 'devGPIntranet.dbo.dnn_ModuleDefinitions'; 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.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) /************************************************************/ /***** RegisterModule *****/ /***** *****/ /***** Use this script to register a module in the *****/ /***** database using Query Analyzer *****/ /***** *****/ /***** *****/ /***** Note: To manually execute this script you must *****/ /***** perform a search and replace operation *****/ /***** for dbo. and dnn_ *****/ /***** *****/ /************************************************************/ exec dbo.[dnn_AddDesktopModule] @PackageID = N'PackageID', @ModuleName = N'GPAwards', @FolderName = N'GPAwards', @FriendlyName = N'GPAwards', @Description = N'A GPAwards module', @Version = N'01.00.00', @IsPremium = 0, @IsAdmin = 0, @BusinessController = N'GP.Modules.GPAwards.GPAwardsController', @SupportedFeatures = 3 declare @DesktopModuleId int select @DesktopModuleId = [DesktopModuleId] from dbo.[dnn_DesktopModules] where ModuleName = 'GPAwards' exec dbo.[dnn_AddModuleDefinition] @DesktopModuleId, @FriendlyName = N'GPAwards', @DefaultCacheTime = 0 declare @ModuleDefID int select @ModuleDefID = [ModuleDefID] from dbo.[dnn_ModuleDefinitions] where FriendlyName = 'GPAwards' exec dbo.[dnn_AddModuleControl] @ModuleDefID, @ControlKey = NULL, @ControlTitle = NULL, @ControlSrc = N'DesktopModules/GPAwards/ViewGPAwards.ascx', @IconFile = NULL, @ControlType = 0, @ViewOrder = NULL, @HelpUrl = NULL, @SupportsPartialRendering = 1 exec dbo.[dnn_AddModuleControl] @ModuleDefID, @ControlKey = 'Edit', @ControlTitle = 'Edit Content', @ControlSrc = N'DesktopModules/GPAwards/EditGPAwards.ascx', @IconFile = NULL, @ControlType = 1, @ViewOrder = NULL, @HelpUrl = NULL, @SupportsPartialRendering = 1 exec dbo.[dnn_AddModuleControl] @ModuleDefID, @ControlKey = 'Settings', @ControlTitle = 'GPAwards Settings', @ControlSrc = N'DesktopModules/GPAwards/Settings.ascx', @IconFile = NULL, @ControlType = 1, @ViewOrder = NULL, @HelpUrl = NULL, @SupportsPartialRendering = 0

What I don't understand is where the data type varchar is coming from? Initially I hadn't changed anything about the file at all and it was throwing me this error. Then I put brackets around the table names thinking that it wasn't recognizing them as tables or something. That didn't work.

How can I get the Definition to be automatically installed instead of manually setting the definition?

 
New Post
5/22/2009 11:22 AM
 

So I think I may have found the issue. It seems that the Starter Kit for DNN 5.0.1 had not updated a lot of the scripts and manifest files to match the new structure with DNN 5.x. So I had to modify the script and add many variables to the script to match the new stored procedure. The PackageID attribute I initially entered was a string when it needed to be an int. I manually entered this value in because I did not know how the script is supposed to grab the correct packageID.

This may be something that really should be address in the very near future. Update the Starter Kits to match the current versions that you are distributing them for. Otherwise many many users are going to run into the same issue.

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...DNN5.0.1 Module Definition/Module Install problemDNN5.0.1 Module Definition/Module Install problem


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