Copied to clipboard

Flag this post as spam?

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


  • Lee 1130 posts 3088 karma points
    Jan 19, 2011 @ 09:54
    Lee
    0

    Can't Delete DocType

    I have been trying to remove a master doctype, firstly I removed the master reference from the children by setting masterContentType to 0 in the cmsContentType table - But now I can't delete the redundant master or any of its properties (I get the following FK error)

    The DELETE statement conflicted with the REFERENCE constraint "FK_cmsPropertyData_cmsPropertyType". The conflict occurred in database "nForum", table "dbo.cmsPropertyData", column 'propertytypeid'.
    The statement has been terminated.

    Been looking through and can't see what I need to delete now in the table to remove this constraint.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jan 19, 2011 @ 10:00
    Matt Brailsford
    2

    Sounds like you need to remove any saved property data from the cmsPropertyData table first before you can remove the properties themselves, and then the master page.

    Matt

  • Richard Soeteman 4047 posts 12900 karma points MVP 2x
    Jan 19, 2011 @ 10:02
    Richard Soeteman
    1

    HI Lee,

    Before you continue, do you have documents in your database depending on documenttype that uses this master, if so you will probably have a corrupted database once you deleted the master from db. That is also the errormessage you get, you have data based on this documenttype.

    Maybe the doctype extensions package from Matt will solve this for you?

    Cheers,

    Richard

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Jan 19, 2011 @ 10:04
    Thomas Höhler
    0

    Which umbraco version? Can't find an FK_cmsPropertyData_cmsPropertyType in the 4.5.2 DB

    Thomas

    
    
    

     

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jan 19, 2011 @ 10:05
    Matt Brailsford
    0

    @Richard, unfortunatley DTE doesn't work with 4.6 yet. I'm hoping to take a look at it this weekend.

    @Lee, Richard makes a good point about pages already using the doc type. You can take a look at the source for DTE though, as it is only a bunch of SQL statements, then try running them manually?

    Matt

  • Lee 1130 posts 3088 karma points
    Jan 19, 2011 @ 10:07
    Lee
    0

    @Matt - Ok cool I'll go through it

    @Richard - Thanks, I was hoping to use his package but it doesn't work on 4.6 which is what I'm working on :(

  • Lee 1130 posts 3088 karma points
    Jan 19, 2011 @ 10:11
    Lee
    0

    All sorted :)  Just went through all the data in the cmsPropertyData related to the master doctype that I wanted to delete and deleted it.

  • Richard Soeteman 4047 posts 12900 karma points MVP 2x
    Jan 19, 2011 @ 10:15
    Richard Soeteman
    0

    @Matt,

    Cool will you that release include my source also?

    Cheers,

    Richard

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jan 19, 2011 @ 10:18
    Matt Brailsford
    0

    @Richard, it will yes. I've just fallen behind on a few things latley.

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft