XmlRpcHandlers Priority order

Topics: Core
Developer
Dec 12, 2011 at 4:24 PM

I have a problem when I edit a blog post via XmlRpc.

It seems that the order to load the implementations of IXmlRpcHandler in different modules is not correct :

The XmlRpcHandler in Orchard.Blogs should be the last to be executed because in the method MetaWeblogEditPost, it Processes all the drivers that have been added in XmlRpcHandler :

foreach (var driver in drivers)               

driver.Process(blogPost.Id);

Because of this, the associated tags are not updated.

In an other instance of Orchard, it works.

The difference seems to be that in App_Data\Dependencies, in dependencies.xml, it uses a loader 'DynamicExtensionLoader' instead of a 'PrecompiledExtensionLoader' :

<Dependency>   
<ModuleName>Orchard.Blogs</ModuleName>   
<VirtualPath>~/Modules/Orchard.Blogs/Orchard.Blogs.csproj</VirtualPath>   
<LoaderName>DynamicExtensionLoader</LoaderName>   
<References /> 
</Dependency>

If I use the sources (and I launch in Debug), it compiles all the projects and so, the Orchard.Blogs dependency is like that  :

  <Dependency>   
<ModuleName>Orchard.Blogs</ModuleName>   
<VirtualPath>~/Modules/Orchard.Blogs/bin/Orchard.Blogs.dll</VirtualPath>   
<LoaderName>PrecompiledExtensionLoader</LoaderName>   
<References /> 
   </Dependency>

In src\Orchard\Environment\Extensions\Loaders\ReferencedExtensionLoader.cs, there is this comment so I guess it should work if I set DynamicExtensionLoader manually in order to load the blog as last Handler :

// Higher priority because assemblies in ~/bin always take precedence

But it doesn't fix the problem.

I also tried to remove the bin folder in Orchard.Blogs, and the dependencies folder.

 

Any idea to correct this?

Some other modules seem to manage Priorities (i.e : FeedBuilder) to sort the implementations before to execute them.

Coordinator
Dec 12, 2011 at 8:27 PM

Please file a bug. Sébastien did some work recently on xmlrpc (in 1.x).