Web Form for Marketers MVC – Hijacked my pipeline

So finally got around to installing Sitecore Web Forms For Marketers and bang, installation process was relatively straightforward, but immediately I got a YSOD complaining that the controller could not be instantiated. In this solution we are using an IoC container to return out the controller renderings, and as such have an entry in the pipeline. WFFM MVC also ships with an entry in this pipeline that patches in Sitecore.Forms.Mvc.Pipelines.GetFormControllerRenderer before the original GetControllerRenderer that ships with Sitecore. Unfortunately in our case, not only are we are patching in our own GetControllerRenderer, but as it’s now before our pipeline entry and in inherits and fires the entry we are replaceing Sitecore have actually stopped the original controller renderer from firing.

Pipeline entries are the normal Sitecore development approach, and in true Don’t Fight The Framework style (as Sitecore have themselves) I have embraced Sitecore’s default implementation of GetController Renderer and extended it to do something subtly different, unfortunately, in this instance, it seems that Sitecore have patched in an entry that prevents future entries from firing. Below is an initial solution (that seems to work) in order to allow your additional pipeline entries to fire.

Continue reading