Errors when a contact submits a WFFM form twice


Description

The following symptoms may occur when a contact submits a particular web form created using the WFFM module two or more times.

This issue affects WFFM 2.5 - 8.0 versions.

Solution

The following solution runs an aggregation process for all data from the collection (MongoDB) database. It allows to restore missing data, and to fix the issue for future runs of the aggregation processes.

To implement this solution, rebuild the reporting database:

Important: before proceeding to the last step, perform the following actions: 
  1. Execute the "WFFM_Analytics.sql" script from the /Data folder on the reporting.secondary database; 
  2. If you have the EXM module installed, execute the "Sitecore.EmailExperienceManager" script from the /Data folder on the reporting.secondary database; 
  3. Execute the "WFFM.StoredProcesdure.AddFormStatisticsByContact" script on the reporting.secondary database; 
  4. Add the following lines in bold to the /App_Config/Include/Sitecore.Analytics.Processing.Aggregation.config file: 
    <!-- Facts -->            
    <SqlMappingEntity type="Sitecore.Analytics.Aggregation.SqlMappingEntity, Sitecore.Analytics.Sql">
      <Table>Fact_FormStatisticsByContact</Table>
      <Routine>Add_FormStatisticsByContact</Routine>
    </SqlMappingEntity>         
    <SqlMappingEntity type="Sitecore.Analytics.Aggregation.SqlMappingEntity, Sitecore.Analytics.Sql">
      <Table>Fact_Conversions</Table>
      <Routine>Add_Conversions</Routine>
    </SqlMappingEntity>
  5. Perform the last step in the guide - click the Start button.