U4-259 - Feature Request: Edit Master Document Type after creation

Created by Sebastiaan Janssen 16 Aug 2012, 06:59:48 Updated by Sebastiaan Janssen 22 Mar 2015, 12:27:36

When creating a new Document Type you have the option of selecting a Master Document Type (which is great!). However, once you have created the new Document Type you cannot then edit which Master it uses - this means you can't select a different Master or remove the Master. It also means if you create a Document Type without a Master and then decide in future that you want it to use a Master then you are stuck as you can't add one. This is particularly noticeable when importing packages - you cannot edit the Document Type in the package to use a common Master that all the other Documents in your site are utilising.

So, would it be possible to allow users to:

  1. Add a master document to documents that currently do not have one
  2. Change the master document for ones that already have one
  3. Remove the master document from ones that already have one

This is relevant to Umbraco 4.0 final. Thanks!

''Originally created on CodePlex by [Diplo|http://www.codeplex.com/site/users/view/Diplo]'' on 2/2/2009 4:33:56 PM [Codeplex ID: 20949 - Codeplex Votes: 75]

Imported comments

''Comment by [quixltd|http://www.codeplex.com/site/users/view/quixltd] on 2/2/2009 5:38:48 PM:'' I think you should also have the option to retain the master document type when duplicating a document type that already has a master document type.

''Comment by [hartvig|http://www.codeplex.com/site/users/view/hartvig] on 2/2/2009 10:05:38 PM:'' While #1 might be an option, #2 and #3 are no gos as they involve a complete change in datamodel thus potential unexpected data loss (if you remove or change a master doctype you remove all the previous properties associated, thus deleting all associated data with no undo (just like if you delete a column in a db. But when modifying one db it's much more obvious what you loose as you don't have inheritance).

''Comment by [Diplo|http://www.codeplex.com/site/users/view/Diplo] on 2/4/2009 12:39:36 PM:'' Hartvig - thanks for you response. Personally, though, I would expect (and hope) that removing a master document type would remove previous properties - I wouldn't see this as a problem. Obviously it would be prudent to display a confirm dialogue with a warning with an explanation, Wouldn't that be an option? Maybe it could be a setting in AppSettings that could be enabled by people who want it? Thanks.

''Comment by [northside|http://www.codeplex.com/site/users/view/northside] on 2/4/2009 12:44:23 PM:'' This would be incredibly handy if it could be at all implemented - maybe if it was something that only 'developer' user-types could do and had a huge warning next to the option, as wanting to change document inheritance generally happens during development where data-loss might not yet be a concern.

Failing that, the ability to ratain or select a new master when copying document types would be very useful too.

''Comment by [viglante|http://www.codeplex.com/site/users/view/viglante] on 2/4/2009 7:39:55 PM:'' I agree with Diplo. If you get a fair warning with an explanation when adding/changing/removing Master Types.

''Comment by [CRidge|http://www.codeplex.com/site/users/view/CRidge] on 2/18/2009 3:03:17 PM:'' Nothing is impossible. OK, so option #2 and #3 is not easily done, and there are side effects - but I still think this is an important change that should be available.

''Comment by [dconlisk|http://www.codeplex.com/site/users/view/dconlisk] on 3/27/2009 4:38:09 PM:'' Here's an example of where this would be great. You have a Basic Page document type that is the master for all pages on your site, and has a tab with mandatory SEO fields. Then you install blog4Umbraco, and you realise that none of the blog pages have this required SEO tab. Rather than creating one manually for each new doctype, you could just specify a master page for each one.

''Comment by [daveak2|http://www.codeplex.com/site/users/view/daveak2] on 7/14/2010 1:28:15 PM:'' Why would changing mean losing data? You set the values of any matching properties, for any that no longer exists create a tab called "Orphaned Properties" or something along those lines, and add those properties to the existing document type, or even just add them to the generic tab.

''Comment by [cuba|http://www.codeplex.com/site/users/view/cuba] on 8/9/2010 3:23:59 PM:'' Migration wizard, is the solution to that.

''Comment by [agrath|http://www.codeplex.com/site/users/view/agrath] on 1/29/2011 11:32:35 PM:'' daveaks solution is elegant and works around the problem described in Neil's post. It makes sense that you can change a doc type. The properties can be copied to orphaned properties tab. This usually only happens in development. When you're building a site and you realise you structured things wrong, it's a right pain to rebuild the tree from scratch. Of course, the orphaned properties (from parents) would be copied to the child, that means that if you wanted to move them back to the new parent, you'd still have to manually copy data..

Comments

Sebastiaan Janssen 22 Mar 2015, 12:27:36

This has been greatly improved since this issue was created by adding compositions. For any new problems please file a new issue.


Priority: Normal

Type: Feature (request)

State: Closed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:

Sprint:

Story Points:

Cycle: