Copied to clipboard

Flag this post as spam?

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


  • Jeff Subat 28 posts 159 karma points
    Jan 20, 2017 @ 17:12
    Jeff Subat
    0

    Template name change results in duplicates after push to Live

    I did the following in the back office on my local instance before pushing changes to Live in Umbraco Cloud:

    1. Changed the aliases of a few templates. I did not change their names, however.
    2. Changed the default template for my Home Page document type and removed the old template.
    3. Made the appropriate change to my home page, so that it pointed to the new template.

    The push said it was successful, but now I've got a mess. On Live:

    1. The templates whose aliases I changed are duplicated. I now have one template with the new and one with the old alias, but they have the same names. Since the backoffice only shows me the name of the template that a doc type or content item points to, not the alias, I can't tell whether they are pointing to the old or new templates.
    2. The Home Page document type and home page content item now have no template at all.
    3. The Home Page document type is now missing one of its child document types in Permissions. I never touched Permissions for the Home Page in this revision, and that child has been there over several previous pushes.

    There were other changes I made, not related to those described above, which were properly reflected.

    I am a newbie with Git, so the only solution I can think of is to make all the corrections on Live and then do a pull to local. It seems like that should bring the repositories back in synch, but I am a bit nervous about it. Any advice?

    Finally, I expected that, after pushing the changes I described above:

    1. Changed template aliases would not result in duplicates,
    2. A template that was removed in local would be removed in Live
    3. A change in a document type's default template would be reflected on Live
    4. A change in a document type's template should have no effect on its children listed in Permissions.

    Are any of my expectations incorrect?

    Thanks in advance for any help and advice!

  • Jeff Subat 28 posts 159 karma points
    Jan 20, 2017 @ 19:14
    Jeff Subat
    0

    Update: I found the old versions of the templates in the back office are empty in the Edit Template window.

    This leads me to believe that the .cshtml file with the old alias name is no longer there. If that is true, I suspect my git push did its job, but the database was not updated to reflect the removal of the files.

    Further evidence: I found a template in Live that I deleted several days ago. It, too, had an empty Edit Template window. Since that point, I've done a couple of pulls, and the old file has not come down to my local repository. Also, my local back office shows no sign of the old, deleted template. That's probably because the file doesn't exist on Live, and therefore there's been no trigger to update my local database.

Please Sign in or register to post replies

Write your reply to:

Draft