I just feel the need to mention I'm not a rookie. I code my own "lean and mean" templates, and know my way around PHP. That said, today I had a problem. I have a page... "foo", to which I applied a custom template. The page would not use it! In fact it decided to use front-page.php. Of course this page, "foo", was not the statically assigned home page.
On a whim, I tried page-[id].php - nope, even page.php (which I did not have or need) was not picked up.
Even the generated code was strange! The body tags indicated "page-template-template_foo" but still it was loading "front-page.php".
Naturally (after flushing permalinks - de rigueur) I swapped out the template for default at this point, to troubleshoot. It was fine. Great! A functions.php problem right? But when I swapped back to my template all was fine!
My question: What mechanism could possibly have alleviated this problem via a template deactivation and reactivation?