Forum

The forum is a free service supported by community members. Please consider opening a support ticket if you need timely help.

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 02 Apr 2013 04:49 PM by  Steve L
SearchBoost and Revindex Task Scheduler possible incompatible
 8 Replies
Sort:
You are not authorized to post a reply.
Page 2 of 2 << < 12
Author Messages


New Member


Posts:
New Member


--
02 Apr 2013 09:53 AM

Hi Stephen

Bogdan added some debug code so that we could see where the error was occuring and he is convinced that it is happening within the RevindexTaskSchedulerController constructor.

Below is a copy of the code that he is executing and the error occurs, maybe you can see what is wrong because he says he is at a loss. One thing I have noted which Bogdan agrees with is that if your TS was not flagged as iSearchable then SB would not try to access the module and I guess the issue would then go away. I dont see any reason why SB needs to be iSearchable so could you make this change so we can test it out unless of course you can see something wrong in the SB code below. Thanks.

foreach (ModuleInfo objModule in arrModules) {

if (string.IsNullOrEmpty(objModule.DesktopModule.BusinessControllerClass))

continue;

if (!businessControllers.ContainsKey(objModule.DesktopModule.BusinessControllerClass)) {

try {

object objController = DotNetNuke.Framework.Reflection.CreateObject(objModule.DesktopModule.BusinessControllerClass, objModule.DesktopModule.BusinessControllerClass);

if (!(objController is ISearchable))

throw new Exception(string.Format("BusinessControllerClass {0} does not implement ISearchable", objModule.DesktopModule.BusinessControllerClass));

businessControllers[objModule.DesktopModule.BusinessControllerClass] = objController;

} catch (Exception ex) {

string strMessage = string.Format("Error Creating BusinessControllerClass '{0}' of module({1}) id=({2}) in tab({3}) and portal({4}) ", objModule.DesktopModule.BusinessControllerClass, objModule.DesktopModule.ModuleName, objModule.ModuleID, objModule.TabID, objModule.PortalID);

Exceptions.LogException(new Exception(strMessage, ex));

logger.Error(new Exception(strMessage, ex));

continue; // go to next module

}

}

}

0


Veteran Member


Posts:2937
Veteran Member


--
02 Apr 2013 03:58 PM

Hi Nathan,

The Task Scheduler doesn't implement ISearchable. The ISearchable is a piece of code that tells the DNN core system that this module can be searched on and will be clearly marked in the class declaration with the keyword "ISearchable". The class signature for the Task Scheduler is shown below and clearly it doesn't implement ISearchable:

public class RevindexTaskSchedulerController : IUpgradeable

I don't know where the error is coming from his module. I'm looking through a small keyhole of the entire code so it's hard to tell and I can't spend too much time on this either since it's clearly a SearchBoost issue.

Perhaps, you can suggest to them:

a) the code can be made to test for ISearchable first before instantiating the object or

b) it should check if the type can be instantiated first instead of letting it throw an error or

c) more elegantly deal with error that can occur during instantiating an unknown type or

d) follow the DNN source code and figure out how the core DNN core search is able to ignore Task Scheduler without throwing an error as it must know that it's not searchable.

Thanks,


0


New Member


Posts:
New Member


--
02 Apr 2013 04:23 PM

Ok well their is clearly an issue then because if you go to the Host/Extensions page and look at the definition for your TS you will see that it says iSearchable: True and iPluggable: True. I have checked your other modules e.g. Optimizer and Impersonator and these are both False whereas the Store is True which is as I would expect.I have attached a link to a screenshot.

http://www.dianamossop.com/aaa/ts1.jpg

Nathan

0


Veteran Member


Posts:2937
Veteran Member


--
02 Apr 2013 04:49 PM

It probably picked up the searchable from the manifest. It won't really matter because we're talking about ISearchable in the controller class and not about general searchability flag in the manifest.

In particular, we're referring to SearchBoost's line of code that checks for ISearchable in the DLL itself. The searchable flag in the manifest has no effect on it. DNN 6 core search also performs a DLL test for ISearchable and doesn't look at the manifest flag either.

if (!(objController is ISearchable))

Thanks,

0
You are not authorized to post a reply.
Page 2 of 2 << < 12