Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ian 17 posts 57 karma points
    Aug 07, 2011 @ 22:56
    Ian
    0

    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

  • Nigel Wilson 945 posts 2077 karma points
    Aug 08, 2011 @ 02:49
    Nigel Wilson
    0

    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

     

     

  • Ian 17 posts 57 karma points
    Aug 08, 2011 @ 10:25
    Ian
    0

    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

     

  • Nigel Wilson 945 posts 2077 karma points
    Aug 08, 2011 @ 10:35
    Nigel Wilson
    0

    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

  • Ian 17 posts 57 karma points
    Aug 08, 2011 @ 23:41
    Ian
    0

    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?

  • Ian 17 posts 57 karma points
    Aug 09, 2011 @ 15:08
    Ian
    0

    Do any Umbraco admin users ever look at this forum? 

  • Ian 17 posts 57 karma points
    Aug 11, 2011 @ 15:17
    Ian
    0

    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

  • Ian 17 posts 57 karma points
    Aug 11, 2011 @ 19:24
    Ian
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft