Im trying to fix a bug in with the templates on a website ive been given to work on. basically the cmsTemplate has gotten screwed up by someone creating a a template then creating a doc type for the template with the same name, this meant there was two templates with the same name. when one of them was deleted its caused an inconsistency with in the table so when you couldnt save template changes through the cms you had to do them through visual studio.
Ive tried to fix this bug by changing the 'master' column value to something different but that doesnt seem to make any difference. What do i need to do? C2KMater is the masterpage all templates need to use.
thanks for the reply rich, yes did fix the issue of the layout in the cms, before most of the templates were not listed under the master now they are. but i still cant save. i get the error 'Please make sure that you do not have 2 templates with the same alias' now ive looked through the table and theres defintly no duplicate 'alias' fields. the ones that were duplicated ive renamed
EDIT:
Ive just noticed that even though ive renamed them in the database the names havent updated in cms?
Hi Rich, just tried renaming the aliases, still no luck. I was wrong about the cms aliases not reflecting the db ones, looks like they do i was looking at the template names. doh.
I cant seem to delete template fields either because of their dependency on other tables like the document and node table. I cant delete them in the cms either. when i click delete on a template in the cms the icon turns into a little loader gif and doesnt disapear. when i reload the nodes its still there. no error is displayed, it just wont delete!
If you delete them directly via the database then you'll get the error about why, it's because the tables are related so there's obviously missing indexes hence the delete failing which would make sense based on your first post.
FIXED!!!!!! there was two aliases that were the same but were at opposite ends of the table, noticed after ordering the table by alias. Whoop! thanks rich
fixing cmsTemplate table
Im trying to fix a bug in with the templates on a website ive been given to work on. basically the cmsTemplate has gotten screwed up by someone creating a a template then creating a doc type for the template with the same name, this meant there was two templates with the same name. when one of them was deleted its caused an inconsistency with in the table so when you couldnt save template changes through the cms you had to do them through visual studio.
Ive tried to fix this bug by changing the 'master' column value to something different but that doesnt seem to make any difference. What do i need to do? C2KMater is the masterpage all templates need to use.
Can no one help me with this? Its driving me insane.
Change all the 'master' values to 1047 except C2KMaster?
thanks for the reply rich, yes did fix the issue of the layout in the cms, before most of the templates were not listed under the master now they are. but i still cant save. i get the error 'Please make sure that you do not have 2 templates with the same alias' now ive looked through the table and theres defintly no duplicate 'alias' fields. the ones that were duplicated ive renamed
EDIT:
Ive just noticed that even though ive renamed them in the database the names havent updated in cms?
Hey Phil,
Not sure,you could back up the database and start deleting templates to find out which ones are causing issues?
Also the guidence on aliases is not to include spaces, might be worth removing these.
Rich
Hi Rich, just tried renaming the aliases, still no luck. I was wrong about the cms aliases not reflecting the db ones, looks like they do i was looking at the template names. doh.
I cant seem to delete template fields either because of their dependency on other tables like the document and node table. I cant delete them in the cms either. when i click delete on a template in the cms the icon turns into a little loader gif and doesnt disapear. when i reload the nodes its still there. no error is displayed, it just wont delete!
hey Phil,
If you delete them directly via the database then you'll get the error about why, it's because the tables are related so there's obviously missing indexes hence the delete failing which would make sense based on your first post.
Rich
FIXED!!!!!! there was two aliases that were the same but were at opposite ends of the table, noticed after ordering the table by alias. Whoop! thanks rich
is working on a reply...