Wednesday, February 17, 2016

Sitecore WFFM Error ReportDataProvider

On Sitecore 8/8.1 the following error appears when attempting to load a web form via a content delivery server:
Unable to cast object of type 'System.String' to type 'Sitecore.Analytics.Reporting.ReportDataProvider'

The following section in the config needs to be commented out to stop this error from occuring:
This is a known bug in Sitecore 8.1/update 1 (Sitecore bug #96933).

6 comments:

  1. Thanks Ryan, that's just saved me some time and heartache; I had the exact same issue.

    ReplyDelete
  2. Thanks Ryan. I found this setting under SwitchMasterToweb.config

    ReplyDelete
  3. This is really good - Thanks. One point to note is that for SC 8.1 U2 there are only two node collection and reporting. But the issue still exists!

    ReplyDelete
  4. Just to add, the issue occurs because the config above, generally in the SwitchMasterToWeb.config enabled on CD servers, is attempting to patch the param definitionDatabaseName from master to web, which is definied in the Sitecore.Analytics.Reporting.config file.

    The problem is, if you've correctly configured your CD server in terms of enabling and disabling the correct files, then Sitecore.Analytics.Reporting.config is disabled, meaning there isn't any "reporting" section to patch over, meaning the only "reporting" section patched in is that defined in the SwitchMasterToWeb.config.

    Because the config above doesn't define a type for reporting/dataProvider, the call to Factory in line CreateObject< ReportDataProviderBase >("reporting/dataProvider", assert) fails.

    ReplyDelete
    Replies
    1. Thanks for the comment Ryan, it saved my day.

      Delete
  5. Very helpful! Especially the explanation as to why it's happening. Cheers Ryan!

    ReplyDelete