possible issue for events and actions, or autofac

Topics: Core, General, Writing modules
Dec 6, 2011 at 11:07 PM

Hi there,

Is there anyone run with issue like I have?

I build a module have events and actions for rule and it works. When I copy the same module to another Orchard project, I could not find all the events and actions in Rule. But the other functionality of this module still work. Occasionally, rebuild the whole solution and restart site helps, but not always. I know Autofac do the magic when the site loading. Is there a constant procedure to make sure these events and actions got picking up? I'm tired of trying crossing fingers.:)

Any possible solution will help. At the same time, I will investigate the issue as well.

Cheers,

Dec 6, 2011 at 11:23 PM

Did you remember to set dependencies in Module.txt? (i.e. dependencies on Rules and Actions)

Dec 7, 2011 at 12:05 AM
randompete wrote:

Did you remember to set dependencies in Module.txt? (i.e. dependencies on Rules and Actions)


Yes, I have set the dependenices to Orchard.Rules and I think Actions inside the Rules as well.

Dec 7, 2011 at 1:01 AM

I finally make a wired solution, copy the interface file to another file or change the namespace different with your module. After compile, it magically shows in the Action List in Rule module. Then you can either copy back your code or change back the namespace, it will continue work. I don't know whether it was cached somewhere, but I think if a recompile and restart site won't refresh the cache, that will be a bug. For me, it looks like a bug from Autofoc.

@sebastienros can you have a look of this? To replicate it, you can write events and actions in existed module which enabled before.