Page templates don't stick (v. 2.5)

In the 2.5 or earlier versions, there is a bug in which a custom page template is not saved if an administrator who doesn't have template permissions tries to edit that page. To correct this, open the pages.php page in the /storeadmin/ folder, and find the lines:

if ($pgid) 
{ 
echo "";

and just *above* those lines, add:

if ($set_master_key == "no" AND $show_theme != "Yes")
echo "";

This will be corrected as of the 2.6 version.