9

Converting WFFM from 8.0 to 8.1, using MVC and came across an error after my build and deploy to my local environment. Error appearing is one of our Views has the below in lines 1 & 2 which causes errors.

@using Sitecore.Forms.Mvc.Data.Analytics
@using Sitecore.Forms.Mvc.Extensions

When running, receive this:

Server Error in '/' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0234: The type or namespace name 'Analytics' does not exist in the namespace 'Sitecore.Forms.Mvc.Data' (are you missing an assembly reference?)

Source Error:

Line 1: @using Sitecore.Forms.Mvc.Data.Analytics Line 2: @using Sitecore.Forms.Mvc.Extensions

I looked into the Release Notes for 8.1 and did not see any references to this namespace being broken.

I also opened up Sitecore.Forms.Mvc.dll file for 8.0 and compared with 8.1 in ILspy. I did not see the namespace Sitecore.Forms.Mvc.Data.Analytics in the 8.1 version as it was in the 8.0 dll file

Any help greatly appreciated to resolve this issue.

4
  • The default MVC WFFM Views do not include these references. Is the error in a custom field?
    – jammykam
    Commented Oct 10, 2016 at 19:38
  • The error is in a view in our project under Views / Form, file name Index.cshtml. I'm continuing to look into.
    – DanO
    Commented Oct 10, 2016 at 19:57
  • 2
    Those using statements are not in the default index.cshtml file. I would double check you have not made customizations.
    – jammykam
    Commented Oct 10, 2016 at 20:00
  • Thanks, you are correct. I looked @ the upgrade files and they were in fact different. The code was in our source control and have updated it, and published...
    – DanO
    Commented Oct 10, 2016 at 20:14

1 Answer 1

5

Thanks for the assistance of JammyKam I was able to figure out the issue. Basically we had some views in our source control (Views / Forms (also the EditorTemplate)) that were OLD and had references to:

  • Sitecore.Forms.Mvc.Data.Analytics
  • Sitecore.Forms.Mvc.Extensions

When publishing, the WFFM 8.1 views were overwritten with the WFFM 8.0 views that were in the solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.