Copied to clipboard

Flag this post as spam?

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


  • evangelos 12 posts 82 karma points
    Aug 02, 2022 @ 10:14
    evangelos
    0

    Export Umbraco 7.1.8 pages and Metadata

    Hi,

    We have a very unstable Umbraco 7.1.8 version intranet which we are looking to move away from however I would like the following: * All site pages * A csv / XML document that contains metadata relating to the site and pages.

    The problem is if we attempt to install any packages on our existing Umbraco set up it falls over.

    Does anyone know if there is a way to obtain this data through PowerShell or safer way through Umbraco or any other way.

    Kind Regards

  • Lucas Bisgaard 19 posts 128 karma points c-trib
    Aug 03, 2022 @ 06:42
    Lucas Bisgaard
    0

    Hello Evagelos,

    Doesn´t sound good at all!

    If it was me, that stood with this problem, I´ll maybe do it this way: I would create a new project. Create a new SQL User with only read access.

    So for the new project I´ll go direct to the SQL and read up the data.

    SELECT * from [dbo].[cmsDocument] 
        inner join [dbo].[cmsContentVersion]
        on [dbo].[cmsContentVersion].[versionId] = [dbo].[cmsDocument].[versionId]
        inner join [dbo].[cmsContent]
        on [dbo].[cmsContentVersion].[nodeId] = [dbo].[cmsContent].[nodeId]
        inner join [dbo].[umbracoNode]
        on [dbo].[cmsContentVersion].[nodeId] = [dbo].[umbracoNode].[id]
        where [dbo].[umbracoNode].[nodeObjectType] = 'C66BA18E-EAF3-4CFF-8A22-41B16D66A972' AND  [dbo].[cmsDocument] .[newest] = '1' // only select Content
    

    then now you can get the meta data

    SELECT * from [dbo].[cmsPropertyData]
    inner join [dbo].[cmsPropertyType]
    on [dbo].[cmsPropertyData].[propertyTypeId] = [dbo].[cmsPropertyType].[id]
    where [dbo].[cmsPropertyData].[versionId] = @0
    

    Not it just to cast it to model and save it into a CSV file.

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Aug 04, 2022 @ 17:07
    Chriztian Steinmeier
    0

    Hi evangelos,

    Are you able to create a new Template? If so, you could probably get away with handling it as an alternate template (i.e., going to /?alttemplate=templatename) and perform some code in that, which goes through all of the Content and writes XML or CSV instead of HTML... ?

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft