Forums

 
  Support Forum  Modules  Engage: Publish  Possible Issue with EP sql code
Previous Previous
 
Next Next
New Post 1/7/2010 9:55 AM
Informative
  Dan Wallace
21 posts
9th Level Poster


Possible Issue with EP sql code 

One of our developers replied with the following in response to my request to help troubleshoot an error I get on our site.

Scenario: (DNN 5.2, EP 5.5 and a variety of other modules)

  1. In DNN Click to Add a new page
  2. Input Page Name and Page Title
  3. Select a Parent Page
  4. Permissions: Check All Users
  5. (All other settings remain default as they appear)
  6. Copy Page
    1. Select a page that contains 2 instances of EP and no other modules (1 set as custom list / titles, 1 set as custom list/ category description[list hidden with css])
    2. 'Copy' radio buttons are selected for both instances of EP that exist on selected page

NOTE: I've successfully completed this task at least a hundred times in the past.  I don’t know if the problem is related to a recent upgrade of EP or DNN.  We are currently experiencing other problems on the site as well since the upgrades.  One of the problems is clicking in Admin > Pages to view some page but only seeing it for a quick second before a different page is displayed.  We will continue our troubleshooting but wanted to get this to you for your info.

 

[Error]

Nick, This is the error I mentioned in my voicemail –it displays when I try to create a new page by copying another page

 

This example:  New page > copy DNN page named /non-credit/baking  > set to ‘copy’ both instances of the EP module that exist on the Baking page

 

Error: is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Ambiguous column name 'ModuleTitle'. Could not use view or function 'dbo.Publish_vwModuleInfo' because of binding errors. ---> System.Data.SqlClient.SqlException: Ambiguous column name 'ModuleTitle'. Could not use view or function 'dbo.Publish_vwModuleInfo' because of binding errors. 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.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(SqlConnection connection, SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters, SqlConnectionOwnership connectionOwnership) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText) at Engage.Dnn.Publish.Data.SqlDataProvider.GetModuleInfo(Int32 moduleId) at Engage.Dnn.Publish.Portability.XmlTransporter..ctor(Int32 moduleId) at Engage.Dnn.Publish.Util.FeaturesController.ExportModule(Int32 moduleId) at DotNetNuke.Modules.Admin.Tabs.ManageTabs.SaveTabData(String strAction) at DotNetNuke.Modules.Admin.Tabs.ManageTabs.cmdUpdate_Click(Object Sender, EventArgs e) --- End of inner exception stack trace

 

 

[Developer Reply]

 

This is a bug in the one of the SQL views that is part of EP.

 

I fixed it by going into the database and modifying the view. I only needed to add a qualifer to the ModuleTitle column in the select statement because it was indeed an ambigous column name just as the error stated.

 

Here is the original broken view:

 

select t.Tabname, tm.ModuleId, dm.DesktopModuleId,  Version, FolderName, md.FriendlyName,

ModuleName, md.ModuleDefId, ModuleTitle, t.PortalId, t.TabId

From dbo.[desktopmodules] dm

join dbo.[moduleDefinitions] md on (md.DesktopmoduleId =  dm.DesktopmoduleId)

join dbo.[modules] m on (m.ModuleDefId = md.ModuledefId)

join dbo.[tabModules] tm on (tm.ModuleId = m.ModuleId)

join dbo.[tabs] t on (t.tabId = tm.Tabid)

 

Here is the modified working view:

 

select t.Tabname, tm.ModuleId, dm.DesktopModuleId,  Version, FolderName, md.FriendlyName,

ModuleName, md.ModuleDefId, m.ModuleTitle, t.PortalId, t.TabId

From dbo.[desktopmodules] dm

join dbo.[moduleDefinitions] md on (md.DesktopmoduleId =  dm.DesktopmoduleId)

join dbo.[modules] m on (m.ModuleDefId = md.ModuledefId)

join dbo.[tabModules] tm on (tm.ModuleId = m.ModuleId)

join dbo.[tabs] t on (t.tabId = tm.Tabid)

 

You may want to report this as a bug to Engage.

 

They were not fully qualifing some of the columns in the select statement and since ModuleTitle column was in two of the tables they were querying, the statement was terminated with that error.

 

 

If and when we upgrade Engage Publish this change could get overwritten.

 

 

 
New Post 1/7/2010 10:17 AM
  Chris Hammond
1110 posts
1st Level Poster


Re: Possible Issue with EP sql code 

We have a fix for this in Publish 5.5.2 that is just waiting for me to upload it so we can release it, I will try to get it done over the next few days as I am currently out of town.

It's actually a fairly minor change, but doesn't require a number of views to be dropped and recreated.


DotNetNuke Core Team Member
Engage Software
St. Louis, MO
314.966.4000



The leading provider of DotNetNuke support, training and custom development.
 
New Post 1/8/2010 9:51 AM
  Dan Wallace
21 posts
9th Level Poster


Re: Possible Issue with EP sql code 

ok - thanks, we'll be looking for it.

 
Previous Previous
 
Next Next
  Support Forum  Modules  Engage: Publish  Possible Issue with EP sql code

Purchase

Please click here to buy now.
Payment will be processed via credit card or PayPal.

Test Drive!

Want to find out how it works? Visit our demo site to see the modules in actions!

Subscribe

Sign up for our newsletter and get the latest product updates!

Online Support

Powered by DotNetNuke