If for some reason you have 2 templates with the same name (check Templates tree in Settings section) you need rename one of them before you can proceed.
I can't see a duplicated template name on the tree.
And
SELECT TOP (100) PERCENT dbo.umbracoNode.text, COUNT(dbo.cmsTemplate.pk) AS Expr1 FROM dbo.cmsTemplate INNER JOIN dbo.umbracoNode ON dbo.cmsTemplate.nodeId = dbo.umbracoNode.id GROUP BY dbo.umbracoNode.text ORDER BY Expr1 DESC
SELECT dbo.cmsTemplate.master, cmsTemplate_1.alias, cmsTemplate_1.nodeId FROM dbo.cmsTemplate INNER JOIN dbo.cmsTemplate AS cmsTemplate_1 ON dbo.cmsTemplate.pk = cmsTemplate_1.pk GROUP BY dbo.cmsTemplate.master, cmsTemplate_1.alias, cmsTemplate_1.nodeId
Shows that 37 of the 39 templates have a defined master page which does exist.The other two are top of the template tree with a master page of "None". and are listed with nulls in the "master" foreign key. I'd guess that means the masterpage references are all valid...?
There are 40 files in the masterpages folder. One for a "test1" template (which I deleted) How can I determin if any of the other 39 are all invalid...?
Carefully checking of the last Template saved before error occured, I found a syntax error in HTML.
Specifically, incorrectly nested <li></li> tags.
This error saved without an error message. But would not allow further edits to the templates. Resulting in the missleading error message. Since at no time were there "2 templates with the same alias".
Error in ver 4.5.2: "please make sure that you do not have 2 templates with the same alias"
I tried the select below to find the duplicated alias, but the count was only "1" for all 39 results.
SELECT TOP (100) PERCENT COUNT(pk) AS TemplateNodeID, alias AS TemplateAliasName
FROM dbo.cmsTemplate AS ct
GROUP BY alias
Any suggestions how I can find/fix this ?
If for some reason you have 2 templates with the same name (check Templates tree in Settings section) you need rename one of them before you can proceed.
I can't see a duplicated template name on the tree.
And
SELECT TOP (100) PERCENT dbo.umbracoNode.text, COUNT(dbo.cmsTemplate.pk) AS Expr1
FROM dbo.cmsTemplate INNER JOIN
dbo.umbracoNode ON dbo.cmsTemplate.nodeId = dbo.umbracoNode.id
GROUP BY dbo.umbracoNode.text
ORDER BY Expr1 DESC
shows count of "1" for all 39 entries.
Verify the masterpage references in the the templates.. make sure they are all valid.
I would also check the physical masterpage files in the masterpages folder.. make sure they are valid.
You call also backup the masterpages (important) folder, then wipe the templates (using the ui) and re-add them.. might clear up the glitch.
SELECT dbo.cmsTemplate.master, cmsTemplate_1.alias, cmsTemplate_1.nodeId
FROM dbo.cmsTemplate INNER JOIN
dbo.cmsTemplate AS cmsTemplate_1 ON dbo.cmsTemplate.pk = cmsTemplate_1.pk
GROUP BY dbo.cmsTemplate.master, cmsTemplate_1.alias, cmsTemplate_1.nodeId
Shows that 37 of the 39 templates have a defined master page which does exist.The other two are top of the template tree with a master page of "None". and are listed with nulls in the "master" foreign key. I'd guess that means the masterpage references are all valid...?
There are 40 files in the masterpages folder. One for a "test1" template (which I deleted) How can I determin if any of the other 39 are all invalid...?
I deleted the most rescently modified template and recreated that.
That fixed the error in saving templates. But resulted in the document type for that page having no assigned template.
So I recreated the entry in table cmsDocumentType, fortunately that only has 3 fields so I could guess all their values.
Anything else I might need to repair as a result of this...???
Reassign the template via the document type UI, not the database
Carefully checking of the last Template saved before error occured, I found a syntax error in HTML.
Specifically, incorrectly nested <li></li> tags.
This error saved without an error message. But would not allow further edits to the templates. Resulting in the missleading error message. Since at no time were there "2 templates with the same alias".
is working on a reply...