I get the following error when attempting to save templates after editing them in the
Dashboard » Templates » * section:
Code:
Fatal error: Invalid Template in e:\www\mysite.com\support\modules\core\admin_templates.php on line 643
These are the lines of code in admin_templates.php around line 643:
Code:
// Fetch the template
$_template = $dbCore->queryFetch("SELECT * FROM `". TABLE_PREFIX ."templates` AS templates LEFT JOIN `". TABLE_PREFIX ."templatedata` AS templatedata ON (templates.templateid = templatedata.templateid) WHERE templates.templateid = '". intval($_REQUEST["templateid"]) ."';");
// Verify its a valid template
if (empty($_template["templateid"]))
{
trigger_error($_SWIFT["language"]["invalidtemplate"], E_USER_ERROR);
}
// ======= PROCESS ACTIONS =======
I took a peak in the database and all of the templates have ID's. I even deleted the database and the entire support directory on the server and started from scratch. Still get the same results... don't have a clue.
I also get the same error when clicking on the restore button. If I manually delete all of the text in the box, then click restore, it works. Then I can edit the code in the box and click save and the setting are saved.
Really strange!
This does not happen with every template, but so far, with the index and footer templates.