Fix publishing pages with custom page layouts created from template
This article is a continuation of my previous article that explains how to save publishing sites as templates.
Per the feedback received some people was not able to access the sites created with the template, this happens with sites that include pages with custom page layouts.
Before getting into details about how to fix this please notice that the previous article is a hack to save the site as a template, save site as a template is disabled in all Publishing sites and other type of sites with publishing features active, this means that the hack may not work in all SharePoint scenarios.