Question

I have a completely new EPi7 mvc4(Razor) solution. When I try to add a simple page type the DB is not getting updated. And there are no page types available

The page type looks like this:

[ContentType(DisplayName = "TestPage", GUID = "00e90ef5-cc85-487c-9aed-c28e6046cb2b", Description = "")]
public class TestPage : PageData
{
    [CultureSpecific]
    [Editable(true)]
    [Display(
        Name = "Main body",
        Description = "The main body will be shown in the main content area of the page, using the XHTML-editor you can insert for example text, images and tables.",
        GroupName = SystemTabNames.Content,
        Order = 1)]
    public virtual XhtmlString MainBody { get; set; }
}

Is there maybe some kind of switch like in previous versions to turn off sync? I'm aware of the fact the this is not a PageTypeBulder anymore but still.

Was it helpful?

Solution 2

I found a solution. This problem had it's source in badly named web project (xxx.Web.Mvc). When I removed the '.Mvc' part it started working. It's very strange. I didn't know that naming can break Epi7.

OTHER TIPS

Yes there is an option to turn off synchronization like in previous version of EPiServer.

You can disable the commit phase by setting enableModelSyncCommit to false on the siteSettings element in episerver.config.

This can be useful if there are many developers working on a shared database and you want to avoid a newly added property to be removed from another piece of the code.

You can read more on blog about synchronization of typed models

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top