Archive Page can create strange exceptions

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.