Travails of an ungeeker

Wednesday, May 10, 2006

Fix search problem in Articles module (for DotNetNuke) from Efficion Consulting

First of all a prefix is warrented: this is a great module and does basically everything that our client wanted for news publishing, including the requirement for adding a separate archive page. It does this without having lots of complicated to set up options. Best of all, it's Free. Thanks Efficon.

However there is a problem with Search (the normal site search) if you do not use the categories feature in that none of your entries are ever matched during a search. At first it seemed that the ISearchable interface was not implemented (to tell DotNetNuke how to index the entries), however it is implemented.

I was very impressed with their support. We had some emails and they even logged onto our application server to have a look. However in the end the problem was only solvable by looking on the SQL Server, by running a SQL profiler trace, one call looked interesting:

exec dbo.Articles_GetArticles @PortalID = 25, @ModuleID = 3101, @Categories = NULL, @MaxNumber = 500, @Age = -1, @ShowAuthOnly = 1, @Featured = 0, @IgnorePublishDate = 0, @IgnoreExpired = 0, @SortField = 'CreatedDate'


This returned no rows. Trying this in SQL Analyer with @Categories = 0 did. Therefore you can add the T-SQL code below to the stored procedure Articles_GetArticles to implement a workaround without having to recompile the source. I am blogging this because despite initial helpfulness, I have had no response to my request that they confirm my fix (seems to be good) and implement this or a better one into their code.
if (@Categories is null)
begin
set @Categories = 0
end

0 Comments:

Post a Comment

<< Home