Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Zac 223 posts 575 karma points
    Mar 26, 2015 @ 18:43
    Zac
    0

    Contour in Umbraco 7 - Exceptions and no Navigation pane?

    Has something gone wrong with our upgrade, or does Contour not work properly in Umbraco 7?

    We haven't got a left navigation Pane, which means you have to keep going back and forward in the browser.

    Also there seems to be an issue where we get a Null Reference Exception with Rendering the Macros and we never manage to get through to MvcRenderContourForm.cshtml

    Any tips?

    UPDATE: More detailed error information provided. Running 7.2.1 with Contour 3.0.25.

    Error seems to be in the umbraco.cms.businesslogic.marco.macroModel constructor?

    System.NullReferenceException: Object reference not set to an instance of an object.
    
    @Umbraco.RenderMacro("umbracoContour.RazorRenderForm", new { FormGuid = "my-form-guid" })
    
    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.cms.businesslogic.macro.MacroModel..ctor(Macro m) +465
       umbraco.macro..ctor(String alias) +301
       Umbraco.Web.UmbracoHelper.RenderMacro(String alias, IDictionary`2 parameters, page umbracoPage) +81
       ASP._Page_Views_FormContactUs_cshtml.<Execute>b__0() in c:\myproject\Website\Views\FormContactUs.cshtml:7
       System.Web.WebPages.<>c__DisplayClassb.<RenderSection>b__9(TextWriter tw) +288
       System.Web.WebPages.WebPageBase.Write(HelperResult result) +88
       ASP._Page_Views__ContourTemplate_cshtml.Execute() in c:\myproject\Website\Views\_ContourTemplate.cshtml:28
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +279
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +124
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +195
       System.Web.WebPages.WebPageBase.Write(HelperResult result) +88
       System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +232
       System.Web.WebPages.WebPageBase.PopContext() +286
       Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +139
       System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +379
       System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +32
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
       System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +240
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +28
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
    
  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 27, 2015 @ 17:03
    Jan Skovgaard
    0

    Hi Zac

    I think that's because with the release of Umbraco 7.2 you know need to use Umbraco Forms, which is the replacement for Contour. Unfortunately that's really messy at the moment :-(

    You can learn more about forms by reading some of the answers in this post https://our.umbraco.org/projects/developer-tools/umbraco-forms-migration/computer-says-no/59806-What-are-Umbraco-Forms-%28vs-Contour-Forms%29

    Hope this helps a bit.

    /Jan

  • Zac 223 posts 575 karma points
    Mar 29, 2015 @ 12:38
    Zac
    0

    Thanks Jan.

    Do you know if it's possible to get Contour working properly, on the front-end at least? We can probably put up with degraded back-office functionality if it's just visual stuff like the navigation pane.

    Migrating to a new forms system right now is probably out of scope for us and we have some very complicated forms with quite a few customisations so I doubt very much it would be a straightforward migration.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 29, 2015 @ 19:41
    Jan Skovgaard
    0

    Hi Zac

    Sorry, but I'm not sure that it's possible but have not yet tried myself so don't know the exact in's and out's :-/

    /Jan

  • Zac 223 posts 575 karma points
    Mar 29, 2015 @ 21:43
    Zac
    0

    I thought that might be the case :( Thanks Jan

    So I bit the bullet and went ahead with Tim's migration tool, which worked, only it seems the existing form submission data is breaking the system when we submit a form on the front-end? I posted in another thread about this topic, trying to find out what database changes I need to make or which tables might need truncating:

    https://our.umbraco.org/forum/umbraco-pro/contour/60633-Umbraco-forms-error-after-submitting#comment214606

  • Zac 223 posts 575 karma points
    Mar 31, 2015 @ 22:50
    Zac
    1

    Solution for the above problem as I posted in another thread:

    You need to remove the UFRecordXXX tables in the database, and only those tables. You can either rename them and their keys, or drop them. I chose to rename them in the hope that someone might write a migration script or plugin. Once they are removed you can run the script to install the new Umbraco Forms records schema.

    Here's the SQL:

    Rename the Contour records tables:

    EXEC sp_rename UFRecordDataBit, ContourUFRecordDataBit
    EXEC sp_rename UFRecordDataDateTime, ContourUFRecordDataDateTime
    EXEC sp_rename UFRecordDataInteger, ContourUFRecordDataInteger
    EXEC sp_rename UFRecordDataLongString, ContourUFRecordDataLongString
    EXEC sp_rename UFRecordDataString, ContourUFRecordDataString
    EXEC sp_rename UFRecordFields, ContourUFRecordFields
    EXEC sp_rename UFRecords, ContourUFRecords
    EXEC sp_rename UFRecordsXml, ContourUFRecordsXml
    EXEC sp_rename 'FK_UFRecordDataBit_UFRecordFields', 'FK_ContourUFRecordDataBit_UFRecordFields', 'OBJECT';
    EXEC sp_rename 'FK_UFRecordDataDateTime_UFRecordFields', 'FK_ContourUFRecordDataDateTime_UFRecordFields', 'OBJECT';
    EXEC sp_rename 'FK_UFRecordDataInteger_UFRecordFields', 'FK_ContourUFRecordDataInteger_UFRecordFields', 'OBJECT';
    EXEC sp_rename 'FK_UFRecordDataLongString_UFRecordFields', 'FK_ContourUFRecordDataLongString_UFRecordFields', 'OBJECT';
    EXEC sp_rename 'FK_UFRecordDataString_UFRecordFields', 'FK_ContourUFRecordDataString_UFRecordFields', 'OBJECT';
    EXEC sp_rename 'PK_UFRecordFields', 'PK_ContourUFRecordFields', 'OBJECT';
    EXEC sp_rename 'FK_UFRecordFields_UFFields', 'FK_ContourUFRecordFields_UFFields', 'OBJECT';
    EXEC sp_rename 'FK_UFRecordFields_UFRecords', 'FK_ContourUFRecordFields_UFRecords', 'OBJECT';
    EXEC sp_rename 'PK_UFRecords', 'PK_ContourUFRecords', 'OBJECT';
    EXEC sp_rename 'FK_UFRecords_UFForms', 'FK_ContourUFRecords_UFForms', 'OBJECT';
    EXEC sp_rename 'PK_UFRecordsXml', 'PK_ContourUFRecordsXml', 'OBJECT';
    EXEC sp_rename 'FK_UFRecordsXml_UFForms', 'FK_ContourUFRecordsXml_UFForms', 'OBJECT';
    

    Drop the Contour records tables (for those braver than myself):

    DROP TABLE UFRecordDataBit
    DROP TABLE UFRecordDataDateTime
    DROP TABLE UFRecordDataInteger
    DROP TABLE UFRecordDataLongString
    DROP TABLE UFRecordDataString
    DROP TABLE UFRecordFields
    DROP TABLE UFRecords
    DROP TABLE UFRecordsXml
    

    Once those are out of the way you can run Tim Geyssens' script which will create the new tables.

    The SQL to generate the new Umbraco Forms UFRecords tables (as posted by Tim): http://pastebin.com/sW4CeTCn

Please Sign in or register to post replies

Write your reply to:

Draft