I tried to delete a few nodes from the templates folder, and found I couldn't. It just sat there with DELETING..., but when I checked back they were still there. So, I went into the database and deleted the relevant 3 rows in the cmsTemplate table, but now when I click on the Templates folder, none of them load. I don't understand why that might have happened as the templates are still showing on the live site. Anyone know what might have happened?
I have noticed recently that you cannot delete a template if it is not associated with a document type via the allow templates setting. So to delete via the admin area, you must give a document type "permissions" to use a template and then you can delete the template.
Obviously by deleting the template record directly from the cmsTemplate table you will not have deleted the physical file within the site. I trust your query does not relate to this aspect.
Ah ok - that is good to know. I'll keep that in mind next time.
In the meantime, anyone know how I can repopulate the list of templates again? As Nigel said, the physical files are still there, so I just need to figure out how to display the list again.
I'd move the physical files out of the masterpages directory to somewhere "safe" and then try creating the templates again witihn the settings section.
Then you could copy / paste the html code, etc back into the new template files.
Don't forget you'll have to re-apply permissions to the templates for your document types.
I'd rather find a solution to the problem, rather than continue adding in templates. Can anyone explain to me why this has happened, as there could be a better way of solving this. I've tried re-adding the rows into the Templates table with the correct nodeId, but the templates folder still isn't showing.
What fields/tables are used when populating the templates list? Or even better, is there a query/stored proc that is used?
Apologies for just keeping on asking the same question, but I'm not sure what else to try. Thanks to my own stupidity, I can't add any more templates, as I'm getting an "object reference not set to an instance..." error, when I try and add a new one. I'm really reluctant to delete and start again because I've gone too far.
There must be a way that I can rectify this in the database - All I did was delete 3 rows from the cmsTemplates section. I have tried to put them back in using the same IDs, but nothing.
Does anyone know if there is a way this can be fixed?
Templates
Hi,
I tried to delete a few nodes from the templates folder, and found I couldn't. It just sat there with DELETING..., but when I checked back they were still there. So, I went into the database and deleted the relevant 3 rows in the cmsTemplate table, but now when I click on the Templates folder, none of them load. I don't understand why that might have happened as the templates are still showing on the live site. Anyone know what might have happened?
Thanks
Hi Ian
I have noticed recently that you cannot delete a template if it is not associated with a document type via the allow templates setting. So to delete via the admin area, you must give a document type "permissions" to use a template and then you can delete the template.
Obviously by deleting the template record directly from the cmsTemplate table you will not have deleted the physical file within the site. I trust your query does not relate to this aspect.
Hope this helps.
Nigel
Ah ok - that is good to know. I'll keep that in mind next time.
In the meantime, anyone know how I can repopulate the list of templates again? As Nigel said, the physical files are still there, so I just need to figure out how to display the list again.
Thanks
I'd move the physical files out of the masterpages directory to somewhere "safe" and then try creating the templates again witihn the settings section.
Then you could copy / paste the html code, etc back into the new template files.
Don't forget you'll have to re-apply permissions to the templates for your document types.
Cheers
Nigel
Ok, that's proving to be a bit of a nightmare.
I'd rather find a solution to the problem, rather than continue adding in templates. Can anyone explain to me why this has happened, as there could be a better way of solving this. I've tried re-adding the rows into the Templates table with the correct nodeId, but the templates folder still isn't showing.
What fields/tables are used when populating the templates list? Or even better, is there a query/stored proc that is used?
Do any Umbraco admin users ever look at this forum?
Apologies for just keeping on asking the same question, but I'm not sure what else to try. Thanks to my own stupidity, I can't add any more templates, as I'm getting an "object reference not set to an instance..." error, when I try and add a new one. I'm really reluctant to delete and start again because I've gone too far.
There must be a way that I can rectify this in the database - All I did was delete 3 rows from the cmsTemplates section. I have tried to put them back in using the same IDs, but nothing.
Does anyone know if there is a way this can be fixed?
Thank you
Ok - sorted. Turned out I had the wrong nodeID for one of the rows I'd added into the templates table.
Lesson learned anyway - no deleting stuff from the database.
is working on a reply...