EPiServer 4

You are currently browsing articles tagged EPiServer 4.

image_thumb[10]It is a best practice to limit the number of Pages Types an editor can choose from when the editor creates a new page.

As you probably know this is configured in Admin Mode on each Page Type. What you probably don’t think about is that these settings can make it impossible to import and export pages.

“Available Page Types”-rules can break import

If your rules change over time or if you use Stop Publish and Archive Page so your pages moves around you can get in trouble with these rules.

In the current version (5.1.422.122 SP1) the import will stop with an error and it can be quite hard to figure out what is wrong.

I created a SQL-statement to help you figure out what is wrong. It will give you a list of all pages breaking the “Available Page Types”-rules. It lists the Parent and Child’s Page Id, Page Name and also Page Type.

image

This (messy) SQL statement for copy paste:

SELECT fkParentID AS ParentPageId, pkID AS ChildPageId, (SELECT Name FROM tblPage AS p2 WHERE (pkID = p.fkParentID)) AS ParentPageName, Name AS ChildPageName, (SELECT fkPageTypeID FROM tblPage AS p2 WHERE (pkID = p.fkParentID)) AS ParentPageTypeId, fkPageTypeID AS ChildPageTypeId FROM tblPage AS p WHERE (NOT EXISTS (SELECT fkPageTypeParentID, fkPageTypeChildID, Access FROM tblPageTypeToPageType AS tt WHERE (fkPageTypeParentID = (SELECT fkPageTypeID FROM tblPage AS p2 WHERE (pkID = p.fkParentID))) AND (fkPageTypeChildID = p.fkPageTypeID))) AND EXISTS (SELECT fkPageTypeParentID, fkPageTypeChildID, Access FROM tblPageTypeToPageType AS tt WHERE (fkPageTypeParentID = (SELECT fkPageTypeID FROM tblPage AS p2 WHERE (pkID = p.fkParentID))))

Tags: , , , , ,

If you export pages that have the Build-in property Archive Page set pointing to a page that is not included in your export package you will get an exception. At least if you are migrating from EPiServer 4 to 5.1.

Use the following script if you want to clear all the value of Archive page on all pages in your source database:

UPDATE tblPageTypeDefault
SET fkArchivePageID = NULL

Remember to do a iisreset to invalidate all cached information after you change in the database.

Tags: , , , , ,