Copied to clipboard

Flag this post as spam?

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


  • Phil Crowe 192 posts 256 karma points
    Jul 26, 2011 @ 18:23
    Phil Crowe
    0

    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.


     

     

     

     

     

     

     

  • Phil Crowe 192 posts 256 karma points
    Jul 26, 2011 @ 18:28
    Phil Crowe
    0
  • Phil Crowe 192 posts 256 karma points
    Jul 27, 2011 @ 17:00
    Phil Crowe
    0

    Can no one help me with this? Its driving me insane.

  • Rich Green 2246 posts 4008 karma points
    Jul 27, 2011 @ 17:03
    Rich Green
    0

    Change all the 'master' values to 1047 except C2KMaster?

  • Phil Crowe 192 posts 256 karma points
    Jul 27, 2011 @ 17:14
    Phil Crowe
    0

    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? 

     

     

  • Rich Green 2246 posts 4008 karma points
    Jul 27, 2011 @ 17:16
    Rich Green
    0

    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

  • Phil Crowe 192 posts 256 karma points
    Jul 27, 2011 @ 17:22
    Phil Crowe
    0

    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.

  • Phil Crowe 192 posts 256 karma points
    Jul 27, 2011 @ 17:25
    Phil Crowe
    0

    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!

  • Rich Green 2246 posts 4008 karma points
    Jul 27, 2011 @ 17:30
    Rich Green
    0

    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

  • Phil Crowe 192 posts 256 karma points
    Jul 27, 2011 @ 17:43
    Phil Crowe
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft