Copied to clipboard

Flag this post as spam?

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


  • mark 9 posts 63 karma points
    Jan 06, 2014 @ 08:04
    mark
    0

    Contour fields disappearing after deployment

    I have this strainge problem where the fields in my contour forms will disappear after i deploy between environments.

    Why might this happen and what can i do to prevent it?

    My form is really simple and just captures name and email address.

    Thanks

  • Jeroen Wijdeven 31 posts 72 karma points MVP
    Jan 06, 2014 @ 13:04
    Jeroen Wijdeven
    0

    I also have this problem. When using Umbraco 7.0.1, Contour 3.0.18 and the code first approach. This is my code:

    [Form("Contact",
    Id = " 04d45299-3f11-43f1-8296-3743e024526d",
    DisableDefaultStylesheet = true,
    RequiredErrorMessage = "*", 
    InvalidErrorMessage = "*", 
    MessageOnSubmit = "Bedankt, wij nemen spoedig contact met u op")]
    public class Contact : FormBase {
    
    [Field("Contact", "Main", null, Mandatory = true)]
    public string Naam { get; set; } 
    
    [Field("Contact", "Main", null, Mandatory = true)]
    public string Bedrijfsnaam { get; set; }
    
    [Field("Contact", "Main", null, Mandatory = true, Regex = @"[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", Caption = "e-mailadres")]
    public string Emailadres { get; set; } 
    
    [Field("Contact", "Main", null, Mandatory = false)]
    public string Telefoonnummer { get; set; } //niet verplicht
    
    [Field("Contact", "Main", null, Mandatory = true, Type = typeof(Textarea))]
    public string Bericht { get; set; } }
    
  • Comment author was deleted

    Jan 07, 2014 @ 16:56

    So they aren't in the contour section anymore? @Chuhukon did you also deploy the assembly containing the code first forms?

  • Jeroen Wijdeven 31 posts 72 karma points MVP
    Jan 07, 2014 @ 20:27
    Jeroen Wijdeven
    0

    @Tim; The assembly is deployed. At my side this seems to be a problem with Umbraco 7, it occurs during deployment, but it can also occur on the development enviroment once in a while. I never had this problem in Umbraco v6. We have 2 main problems which may have the same cause:

    - The form is available in the Contour admin panel, but the fields are not. Removing the form and restart the webserver solves this problem most of the time. But I also had to generate a new guid for the form
    - When I insert the form into a richtext field the form is displayed in the WYSIWYG. But after republish the page the form is not rendered any more (most of the time) (although the html code reference to the form still contains when switching to the HTML view of the richtext editor).

    As you can see I can't currently give you a specific point of failure, but it feels like a v7 problem.

  • Comment author was deleted

    Jan 07, 2014 @ 21:06

    Ok will do some testing

  • Jeroen Wijdeven 31 posts 72 karma points MVP
    Jan 09, 2014 @ 09:50
    Jeroen Wijdeven
    0

    I got the next null reference today when I try to re-create (delete form and restart the webserver) the form via code-first: Error image Maybe this can help you to solve the problem

  • Jeroen Wijdeven 31 posts 72 karma points MVP
    Jan 10, 2014 @ 12:10
    Jeroen Wijdeven
    0

    The Problem

    • When I insert the form into a richtext field the form is displayed in the WYSIWYG. But after republish the page the form is not rendered any more (most of the time) (although the html code reference to the form still contains when switching to the HTML view of the richtext editor).

    is fixed by changing the alias name of the Countour Razor macro; from "umbracoContour.RazorRenderForm" to "umbracoContour_RazorRenderForm". The '.' is not allowed in some situations in an alias name, I also discoverd that the '-' isn't allowed either. When using these characters the richtext "insert macro" functionality and the macro container property don't behave normal.

    The other problem still exists.

  • Jeroen Wijdeven 31 posts 72 karma points MVP
    Feb 05, 2014 @ 11:54
    Jeroen Wijdeven
    0

    Is there any progress on this issue??

  • Comment author was deleted

    Feb 06, 2014 @ 09:41

    Hey,

     

    Could you try updating Umbraco to the latest stable, so v7.0.3 and see if it still happens, the rte issues should have been fixed

  • Jeroen Wijdeven 31 posts 72 karma points MVP
    Feb 07, 2014 @ 13:40
    Jeroen Wijdeven
    0

    I updated to the latest stable version v7.0.3 but the null reference still occurs... It's the same error as before, for all forms I create with code first (new, existing, it doesn't matter). For now I skip the whole code first approach, but hopefully it is going to be stable again in the future.

  • Lasse Stengaard Bisbjerg 2 posts 22 karma points
    Feb 18, 2014 @ 10:23
    Lasse Stengaard Bisbjerg
    0

    I also experience this problem in Umbraco 6.1.6 with Contour 3.0.18. I have two forms, both implemented as code first forms. After deployment, the forms consistently loose their fields. After an apppool recycle, the fields reappear on one form, but the other forms fields are still missing. After subsequent recycles, fields appear on one form, just to disappear from the other again.

Please Sign in or register to post replies

Write your reply to:

Draft