Copied to clipboard

Flag this post as spam?

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


  • Marco Teodoro 73 posts 148 karma points c-trib
    Jun 16, 2018 @ 12:18
    Marco Teodoro
    0

    Clean Umbraco doctypes and templates

    Hi Guys!

    I've recently won a project where i need to clean an improve umbraco. It's the perfect representation of "how to make a wonderful cms look like shitt!"

    the only think i may have is that they did't know umbraco, but still, decided to do it without knowing how to... anyways. i was wondering if anyone has already found a plugin or sql script to identify obsolete doctypes, templates and maybe macros. by the look of this project i think that most of the code here isn't used anymore. so before i start i would like to make some house keeping :)

    Hope that someone has found something like this before.

    Kr, Marco

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 16, 2018 @ 21:06
    Jan Skovgaard
    1

    Hi Marco

    Something in the back of my mind tells me that someone made some kind of visualizer for this...But I can't seem to remember who it was or what the project was called. If it pops up I'll let you now if someone else have not already mentioned it in here by then :)

    EDIT: So I remembered the package - But it's not quite exactly what you're asking for, but perhaps it will prove useful to get an overview of how document types are attached to each other? If so here it is https://offroadcode.com/packages/back-office-visualization/ - It's done by Janae from Offroadcode btw :)

    But if it's all just imagination on my behalf then maybe this post from 2015 by Hendy could be useful https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/72814-creating-a-list-of-unused-doc-types#comment-233729

    And maybe even the approach mentioned in this old blogpost from 2012 http://www.herlitz.nu/2012/10/06/clean-up-your-umbraco-templates-and-document-types/ - But some of the API's might have changed since then. But maybe it could work as an inspiration for an approach?

    Don't know if the F.A.L.M package could also be handy for a general cleanup of log entries, unused media and stuff like that? https://our.umbraco.org/projects/backoffice-extensions/falm-housekeeping/

    Hope this helps.

    /Jan

  • Marco Teodoro 73 posts 148 karma points c-trib
    Jun 17, 2018 @ 11:20
    Marco Teodoro
    0

    Ji Jan! thanks a lot i will take a look at your links.

    Ok extending a little bit the link you sent! https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/72814-creating-a-list-of-unused-doc-types#comment-233729

    I think this will return also the associated templates. so good shout. thanks a lot!

    SELECT  A.nodeId as 'DocTypeId', 
            B.text AS 'Name',
            A.alias AS 'Alias',
            d.templateNodeId
    FROM    cmsContentType A 
            LEFT JOIN umbracoNode B ON A.nodeId = B.id
            LEFT JOIN cmsDocumentType d ON d.contentTypeNodeId = a.nodeId
    WHERE   A.nodeId NOT IN (SELECT contentType FROM cmsContent)
    order by d.templateNodeId desc
    
  • Nigel Wilson 945 posts 2077 karma points
    Jun 18, 2018 @ 17:18
    Nigel Wilson
    1

    Hi Marco

    Curious - how big is the site ?

    I ask as from experience it is sometimes easier to build a new house, than pull apart all the rooms to try and improve - too many rusty old nails holding things together...

    But in all seriousness, if the site isn't too big, rebuilding from the ground up on the latest version of Umbraco might be a better result for both you and the client.

    Just a thought...

    Cheers, Nigel

  • Marco Teodoro 73 posts 148 karma points c-trib
    Jun 18, 2018 @ 17:44
    Marco Teodoro
    0

    Hi Nigel. Yes that's basically my conclusion and what i'm trying to explain to the customer. I think he realized that now after my estimation. In the end of the day it's all about price and results.

    One off the reasons i was looking for a script or plugin was to show how bad the umbraco instance is and how cleaner can it be if we redo the website from the ground zero. But unfortunately it's a big website and they still want some improvements until they go for the new one.

    thanks a lot for your comment

    Cheers, Marco

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Jun 18, 2018 @ 18:40
    Dan Diplo
    3

    My package God Mode can help identify doctypes and data types that are not being used, as well as other useful stuff:

    https://our.umbraco.org/projects/developer-tools/diplo-god-mode/

  • Marco Teodoro 73 posts 148 karma points c-trib
    Jun 18, 2018 @ 19:03
    Marco Teodoro
    0

    Thanks Dan! this looks great will give it a try. thanks a lot

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jun 18, 2018 @ 19:05
    Jan Skovgaard
    0

    I really should have thought of mentioning that in my initial post but somehow it slipped my mind! How could I forget! Your package looks really awesome Dan :) #h5yr

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft