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 ForumsReportsReportsReports module crash when rebuilding the search indexReports module crash when rebuilding the search index
Previous
 
Next
New Post
8/19/2008 9:31 AM
 

For some weeks null-reference exceptions have been logged in events by the scheduler. It was the search indexer that was causing the exception. I decided to clean the search-index tables and rebuild the index from scratch. When I try to rebuild the index I get the following exception:

Error: Search Admin is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Value cannot be null. Parameter name: format ---> System.ArgumentNullException: Value cannot be null. Parameter name: format at System.String.format(IformatProvider provider, String format, Object[] args) at System.String.format(String format, Object[] args) at DotNetNuke.Modules.Reports.Exceptions.ReportsModuleException.get_Message() at System.Exception.ToString() at DotNetNuke.Services.Log.EventLog.ExceptionLogController.AddLog(Exception objException, ExceptionLogType LogType) at DotNetNuke.Services.Exceptions.Exceptions.LogException(Exception exc) at DotNetNuke.Services.Search.ModuleIndexer.GetSearchIndexItems(Int32 PortalID) at DotNetNuke.Services.Search.SearchEngine.GetContent(IndexingProvider Indexer) at DotNetNuke.Services.Search.SearchEngine.IndexContent() at DotNetNuke.Modules.Admin.Search.SearchAdmin.cmdReIndex_Click(Object sender, EventArgs e) --- End of inner exception stack trace ---

 
New Post
8/21/2008 5:28 AM
 

I have done some more research on a clean source install of DotNetNuke 4.8.4 and the reports module version 5.0.0. Everything is fine until I add a reports module instance to the site where the SQL query uses a parameter (@TabId). If the report has no parameters the search indexer works as expected. Once I use a parameter the search indexer crash and the search function becomes unusable for the entire host. As long as the report is there, the searchindex for the host will not be updated.

I think this is a serious bug. How can a bug/flaw in the reportsmodule be allowed to block the search indexer from completing. Exceptions should be logged and the search indexer be allowed to continue to the next module or tab instance.

Why does the use of the built-in parameters in the reports module throw an exception when the site is being indexed by the search indexer?

 

 
New Post
8/22/2008 5:55 AM
 

Thanks to Fuji Nguyen excellent write up on how to compile and debug the Reports module source.

I have managed to track down the problem. Actually, it's two problems. One problem regarding the use of parameters in the reports module and another problem with exception logging.

When the search indexer calls the ReportsController.GetSearchItems()  the parameter collection that is passed down to the DotNetNukeDataSource instance will be empty. If the query requires one or more parameters (@TabId in my case) the SQL will fail because of the missing parameter. An exception will be thrown from line 50 in DotNetNukeDataSource.vb.

When the exception is being logged the Message property in ReportsModuleException.vb will fail yet again and obscure the original exception message:

        Public Overrides ReadOnly Property Message() As String
            Get
                Dim localized As String = String.Empty
                If Not String.IsNullOrEmpty(_resourceFile) Then
                    localized = Localization.GetString(_resourceKey, _resourceFile)
                Else
                    localized = Localization.GetString(_resourceKey)
                End If
                If _formatArgs IsNot Nothing AndAlso _formatArgs.Length > 0 Then
                             Return String.format(localized, _formatArgs) <-- localized Is Nothing!!
Else Return localized End If End Get End Property
Instance field values:
_resourceKey = "SqlError.Text"
_resourceFile = "/DataSources/DotNetNuke/App_LocalResources/DataSource.ascx.resx"
_formatArgs = {Length=2}
               {0} = "1"
               (1) = "Must declare the scalar variable "@TabId"."

 

The error reporting can't resolve the value for "SqlError.Text". Could it be the resource file name that is incorrect?

Can the missing parameters be added for the GetSearchItems() method also? I know @UserId must be set to Null, but the other parameters like @TabId, @PortalId and @ModuleId are known when the indexer is running.

 

 
New Post
8/25/2008 3:34 PM
 

I have created a new DataSource extension for the reports module that will fix this bug. This extension also supports the use of parameter values from the http request query string. I followed the Developing an RSS Data Source blog posting by Andrew Nurse and my data source works in my development environment. But now I have a problem with creating an install package for the data source. I don't know how to put a file into the App_Code\[MyModuleName] folder on the website.

I have tried using [app_code] as the value for path but I get an error message from the installer. Any ideas on how to fix this?

Thanks

 
New Post
8/26/2008 6:46 AM
 

Found the solution to my installation problem. Looks like it's not possible to get the source code file to install properly into the App_Code folder. But if I create a compiled assembly using the steps provided by the Packaging your DotNetNuke module tutorial the resulting assembly for my source code file can be added to the installation package. The data source extension will now install correctly. I will put it up for download within the next few days.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsReports module crash when rebuilding the search indexReports module crash when rebuilding the search index


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