This is a very well known problem and various fixes are starting to fail for my client...
Scenario. We took a database back-up from staging (after backing up LIVE first) to do a new re-skin of their system. Once the re-skin was completed, we switched the live site, to this newly re-skinned content database.
Everything worked fine, except publishing pages' page layout URLs which got messed up in the migration. Now I've read blog after blog and found various fixes for this, however, my clients database is currently sitting at nearly 100+ sub-sites and growing by the day. The best possible solution I could find was a guy's STSADM add-ons to fix the publish pages URLs with a command-line, after running these fixes on the site, we still seem to run into issues with sub sites, when new pages are created that the URLs are still not coming through correctly.
I've re-run these commands on these sub-sites nearly 10 times per day, and still the URLs are being screwed up somewhere.
I'm running out of ideas, the scripts don't seem to fix every single page and all new pages are bring messed up. If the client created 2 - 5 pages per day, running scripts manually to fix these would be feasible, but we're talking of pages in excess of 20+ per day.
Any ideas on how I can get the pages URLs fixed across the entire application, with a script or any other method, would really appreciate it.