Question

Photo of Herb Parsons

0

Problem Deleting Sites

I'm new to Rock, and have been "experimenting". I've created a couple of different sites, but decided they were not what I was looking for, and am trying to delete them. I'll say up front, on both of these, I did not follow the recommended process (I'm still experimenting), and simply created a blank page, then assigned it to the new site. On both sites, when I try to delete, I get an error messages:

The DELETE statement conflicted with the REFERENCE constraint "FK_dbo.Site_dbo.Page_DefaultPageId". The conflict occurred in database "rock", table "dbo.Site", column 'DefaultPageId'. The statement has been terminated.

I got this when I initially tried to delete the sites. Then I set them to inactive, and still got the message. Then I removed the default page for one of them, and still get the message. I'd like to clean this up, but I don't want to just blow everything away and start over (I've updated to the latest version, and don't want to have to do that again).

I did not have this problem on test sites that where I allowed Rock to create the default page, so that may be related. Any suggestions?

  • Photo of Herb Parsons

    0

    OK, success. I added a blank page again, assigned it as default to the remaining site, then checked for assigned blocks on the page. Removed the two assigned blocks, and was able to delete the site.

    So, the whole process was make sure multiple sites aren't assigned to the same page(s). Make sure the pages are not assigned blocks at the site level.

  • Photo of Herb Parsons

    0

    I got one step closer. I discovered both of the two sites I was trying to delete were assigned to the same default page. So, created a new page, and assigned the second site to that page. That allowed me to delete the first site (and page). However, when I tried to delete the second site, it gave the error message "This Site is assigned to a Block". The system deletes the page, but not the site.

  • Photo of Lee Peterson

    0

    Nice job, Herb! Thanks so much for following up and posting your answer!