Copied to clipboard

Flag this post as spam?

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


  • Daniel 4 posts 24 karma points
    Mar 06, 2015 @ 02:38
    Daniel
    0

    Duplicate content items

    Our umbraco website which uses usync is getting lots of duplicate content items.

    The usync folder would contain a node for Home but in the CMS we'd see

     

    • Home
    • Home (1)
    • Home (2)

     

    They seem to be created on startup and don't appear in the usync files on disk.

    How can I prevent them from being created?

  • Kevin Jump 1673 posts 10586 karma points MVP 3x c-trib
    Mar 06, 2015 @ 11:35
    Kevin Jump
    0

    Hi,

    yes sounds like something is going wrong, without pulling though your files and logs it's hard to work out why, but in summary this is how uSync.Content decides to create the nodes. (code here - https://github.com/KevinJump/jumoo.usync/tree/master/jumoo.usync.content)

    The importer recusese through the folder looking for .content files, any in the root of /uSync/Content are likely to be in the root of your site.

    uSync uses a system of GUID mapping to workout if a piece of content has already been created - if this goes awol, then maybe you could end up with multiple content nodes.

    When content is created on a source site, the GUID of the content is sent as part of the .content file. any target sites, when importing the content will read this GUID and look for it in the map file which is in /appdata/temp/uSyncImport.xml (it is important that this file isn't copied between installations)

    if the GUID isn't in this file then uSync will treat it as a new piece of content and create it on the site, when it creates it , it will then write a GUID pair out to the _uSyncImport.xml file.

    next time it sees that piece of content, it looks up the source guid (from the .content file) and finds the GUID of the local piece of content - with this GUID it edits the existing content.

    when you are importing source -> source (so reimporting on the source system) the mapping just falls back - because if their is no GUID in the mapping file, it try's to locate the GUID from the source file.

    (all this is in the ImportContentItem method here - https://github.com/KevinJump/jumoo.usync/blob/master/jumoo.usync.content/ContentImporter.cs#L113)

    So uSync is possibly missing the GUID mapping, you need to have a look in /app_data/temp/ and see if the _uSyncImport.xml file exists and it's not getting wiped between imports?

    but without any files in /uSync/Content - the import process isn't going to run, so isn't going to create any nodes.

  • Daniel 4 posts 24 karma points
    Mar 09, 2015 @ 03:45
    Daniel
    0

    Hi Kevin,

    A missing _uSyncImport.xml seems like it could be the problem, we're using automated deployments that create a new directory for each release. Therefore all the old app_data files would be missing.

     

     

Please Sign in or register to post replies

Write your reply to:

Draft