diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php
index <HASH>..<HASH> 100755
--- a/core/model/SiteTree.php
+++ b/core/model/SiteTree.php
@@ -1971,6 +1971,15 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
 		$this->Status = "Unpublished";
 		$this->write();
 		
+		// Unpublish all virtual pages that point here
+		// This coupling to the subsites module is frustrating, but difficult to avoid.
+		if(class_exists('Subsite')) {
+			$virtualPages = Subsite::get_from_all_subsites('VirtualPage', "CopyContentFromID = {$this->ID}");
+		} else {
+			$virtualPages = DataObject::get('VirtualPage', "CopyContentFromID = {$this->ID}");
+		}
+		if ($virtualPages) foreach($virtualPages as $vp) $vp->doUnpublish();
+		
 		$this->extend('onAfterUnpublish');
 	}
MINOR when a parent page is unpublished, unpublish all related virtual pages, includes test coverage (from r<I>)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/<I>@<I> <I>b<I>ca-7a2a-<I>-9d3b-<I>d<I>a<I>a9