Copied to clipboard

Flag this post as spam?

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


  • charlie black 33 posts 106 karma points
    Apr 01, 2014 @ 23:30
    charlie black
    0

    umbraco backend Settings Templates question

    upgrading an existing umbraco from 4.7.2 to 4.11.10. Everything seems to be working fine except for this little hiccup. In the backend when I look at the existing templates they all show (on the right hand side Edit template panel) as before. Most just contained 3 lines:

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %><asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"></asp:Content>

     

    But a few now seem to have "lost" this content. Any explanation as to why the Edit template panel would no longer display it//

    If I go back an open up the original 4.7.2 installation, and go into the back end and look at the exact same template, I can see those 3 lines; but if I switch over to the upgraded web site and log into umbraco back end the same template (Edit template panel) shows blank except for 1 line number. Otherwise blank???

    Anybody have any idea?

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 02, 2014 @ 09:00
    Jan Skovgaard
    0

    Hi Charlie

    What steps did you take in order to upgrade? And is the upgrade done on the same server or have it been migrated from the existing solution to a new solution? Perhaps something in the process has been overlooked - but please share how you did it as it will be easier to figure out what might have gone wrong.

    But if the official upgrade path has been followed the templates should be fine.

    /Jan

  • charlie black 33 posts 106 karma points
    Apr 02, 2014 @ 19:29
    charlie black
    0

    We have a visual studio 2013 solution containing an MVC4 web app project  'side-by-side' with umbraco. We were using umbraco 4.7.2. It all works quite fine. To call out what I am asking about-when I am running our MVC web app and I choose to login to umbraco backoffice, I can go to settings section (in the umbraco backoffice) and open templates (we have 38) and see the same 3 lines in the Edit template pane:

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>

    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
     
    </asp:Content>

    6 of the 38 have the above 3 lines plus some more.

     

     

    To upgrade we use Nuget: Install-Package UmbracoCms -Version 4.11.10

    And the Nuget package: Install-Package Microsoft.AspNet.Web.Optimization

    We were using the UmbraMVCo project so we removed that from the solution.

    We deleted the Umbraco 4 folder.

    We had some MVC controllers that were descended from UmbraMVCo.RenderMvcController. We changed that to Umbraco.Web.Mvc.RenderMvcController. The UmbraMVCo controller(s) use UmbraMVCo.RenderModel-we replaced that with Umbraco.Web.Models.RenderModel.

     

    We had a few cshtml pages in the solution that had @inherits from UmbraMVCo.RenderViewPage. We changed this to Umbraco.Web.Mvc.UmbracoTemplatePage.

    In our global.asax we changed our public class MvcApplication : HttpApplication to

    MvcApplication : Umbraco.Web.UmbracoApplication. We added public override OnApplicationStarted() and call base.OnApplicationStarted

    We removed  "default" route that was going to the UmbraMVCo controller.

    We made changes to root web config and to the web.config in the views folder.

    We took a backup of an existing umbraco db and pointed our solution at it. When we launch the web app, umbraco install takes over and take you through upgrade. (ask for connection string) This all goes very fast.

    After upgrade finishes everything sees to be fine.

    I can use the Visual Studio sql data compare to compare the upgraded umbraco db to original and except for the [dbo].[umbracoLog] table it says all records are identical. The schema compare shows a very slight difference on one table where a foreign key was removed from the table.

    Now back to what I am asking about: After upgrading, when I log into the back office and go to settings and start looking at templates I see that whereas before I usually see the same 3 lines: (see above)  now more than 20 don't show any lines. Before upgrading, (in umbraco backoffice) all the templates showed at least 3 lines. After upgrade, at least 20 don't show anything (in the Edit template) pane.  I am curous why only because any difference in bahavior that I don't understand is my responsibility to explain to my team.

    I am guessing those 3 lines that show up are some kind of default content because I can look at the the umbraco db, cmsTemplate table and see the templates but there is a design column and for most this column is blank. Yet in umbraco backoffice when I look at the template I can see those 3 lines. So they must be coming from someplace else in umbraco.

     

     

     

     

     

     

     

     

  • charlie black 33 posts 106 karma points
    Apr 03, 2014 @ 19:55
    charlie black
    0

    OK. I think I see what is happening.This has to do with using Visual Studio and TFS and umbraco. As you use umbraco backoffice it will create file(s) that need to added to your source control system - 

    To do our upgrade, we created a separate branch and it looks like we did not have all the umbraco artifacts it should have had - specifically in this case, we did have a folder in our Visual Studio solution named masterpages and it did contain some 'masterpage' files but not all. Some users who had in the past created addtional templates forgot that creating templates will create files in the masterpages folder - and that those files need to be added to the Visual Studio solution so that they would make it into source control.

    Can anyone else give me a complete list of files that umbraco backoffice creates during normal operations, like when creating document types, editing templates, creating/editing content etc.????

     

    Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft