Copied to clipboard

Flag this post as spam?

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


  • Max Mumford 266 posts 293 karma points
    Mar 14, 2011 @ 14:37
    Max Mumford
    0

    SQL: Bulk change doctype and template depending on current doctype

    Hi all,

    I am upgrading our blog from the original release to the latest. I have installed the latest blog package and now need to run a SQL script to make all of the old blog nodes use the new doctypes and templates.

    I can change the doctypes it uses by changing the "contentType" column in the "cmsContent" table, but how do I go about changing the template too? Where and how is it stored in the database? Is there anything else I will need to update to get this working?

    Thanks,

    Max.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 14, 2011 @ 15:11
    Dirk De Grave
    0

    all of your blog posts should be in the published xml... i'd use that info and use cmsimport from Richard (find tool in project section) to import all of your blog posts again. it's that or writing your own import conversion tool (but i'd go with the first)

    Changing doc type through database sql queries is asking for trouble imo.

     

    Cheers,

    /Dirk

  • Max Mumford 266 posts 293 karma points
    Mar 14, 2011 @ 15:13
    Max Mumford
    0

    Hi,

    Thanks for your reply. I have found that the template id is saved in cmsDocument table and for now I will see if changing it manually in the DB works. If it is too buggy I will revert to my backup and try the cmsImport idea and post on here how i get on.

    Thanks,

    Max.

  • Max Mumford 266 posts 293 karma points
    Mar 14, 2011 @ 16:29
    Max Mumford
    0

    You were right, lots of strange things started happening once I modified the database manually. The problem with cmsImport is that it dosn't maintain the year/month/day folder structure when you import. How would you recommendI over come this problem?

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Mar 14, 2011 @ 21:36
    Richard Soeteman
    0

    Hi Max,

    I think when you map the date field against the post date property of Umbraco you are good, If not please let me know then I knwo a nasty work around.

    Cheers,

    Richard.

     

  • Max Mumford 266 posts 293 karma points
    Mar 17, 2011 @ 12:22
    Max Mumford
    0

    Unfortunately it didnt work, all the blog post nodes were put in the specified directory without date folders.

    What was your work around?

    Thanks.

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Mar 17, 2011 @ 14:05
    Richard Soeteman
    0

    Did you assign to the Post date property also?

     

  • Max Mumford 266 posts 293 karma points
    Mar 17, 2011 @ 14:23
    Max Mumford
    0

    Post date property as in "Publish At" in generic properties above?

  • Max Mumford 266 posts 293 karma points
    Mar 24, 2011 @ 18:16
    Max Mumford
    0

    No luck so far. Can I have your dirty work around please? :) 

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Mar 24, 2011 @ 23:50
    Richard Soeteman
    0

    Hmm weird, my dirty work around was to import the files in a different folder, NOT using Datefolders. Then move the files to the correct blog folder and publish them. In my case the datefolders were created and files were stored in the correct folder. i did get lot of exceptions though because of errors in the event handler

    Cheers,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft