Web Forms For Marketer MVC – Blank Sitecore Tree When Displaying FormID in Presentation Details

So – a lovely short post this one. It seems there is a slight issue in templates in the first generation MVC release of Sitecore Web Forms For Marketers (2.4)

After installing WFFM for MVC 2.4, I noticed that the FormID rendering parameter on the MVC Form rendering is incorrectly pointing at the Sitecore Tree root. I was expecting this to point at a forms folder. I don’t know if this behaviour is displayed on other versions of Sitecore – I am on 7.2 update 1 at present.

On further investigation, it appears that there is a typo in the Data Source in the rendering parameters template declaration. To fix it on mine I simply needed to follow these steps.

  1. Navigate to the template => /sitecore/templates/Web Forms for Marketers/Renderings/Interpreter Properties (ID – {2816D841-7573-4080-9418-80BAC327A539})
  2. The data source was (on my instance at least) set to: Source={D81AC026-07B6-4929-9588-40ACBDC56435}
  3. Simply Change it to: DataSource={D81AC026-07B6-4929-9588-40ACBDC56435} or {D81AC026-07B6-4929-9588-40ACBDC56435}

(On my machine at least) VOILA, problem solved 😀

Glad it’s not just me that releases code with typo’s, it happens to the best of us 😉

Hope this helps.

Advertisements

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