Copied to clipboard

Flag this post as spam?

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


  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Jul 18, 2014 @ 19:46
    Nicholas Westby
    0

    uSync Writes Old def.config on Import

    On my local machine, I updated uSync\DocumentType\Containers\Articles\def.config, committed it, and pulled latest on my staging server. I confirmed that the file was updated.

    I then went into the uSync dashboard and clicked "Import".

    Once the import was done, uSync\DocumentType\Containers\Articles\def.config reverted to the old version. Also, the doctype wasn't updated like it should have been.

    Without looking at the code, here is what I'm guessing what happened. I'm thinking that on clicking "Import" uSync changed the doctype, which raised a "save" event, which uSync was listening to, which caused uSync to write the doctype to disk. However, I'm thinking the changes to the doctype weren't reflected yet in the Umbraco API, so uSync probably used the old version when writing it back to disk. Maybe then uSync read the def.config file in again and changed the doctype to its previous state. This is only a guess however; the underlying issue may be something else.

    I'm using Umbraco 7.1.4 and this version of uSync (currently the latest version): http://our.umbraco.org/projects/developer-tools/usync/usync/54160-Incorrect-Version-Number-(222-226)

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Jul 18, 2014 @ 20:02
    Nicholas Westby
    0

    The entries in UmbracoTraceLog.txt seem to support my theory. Here are a few lines:

    2014-07-18 17:35:34,550 [6] INFO jumps.umbraco.usync.SyncDocType - [Thread 11] updating DocType Articles 2014-07-18 17:35:34,941 [6] INFO Umbraco.Core.PluginManager - [Thread 11] Starting resolution types of umbraco.interfaces.ICacheRefresher 2014-07-18 17:35:34,956 [6] INFO Umbraco.Core.PluginManager - [Thread 11] Completed resolution of types of umbraco.interfaces.ICacheRefresher, found 21 (took 1ms) 2014-07-18 17:35:35,160 [6] INFO jumps.umbraco.usync.uSync - [Thread 11] Saving C:\website folder\uSync\DocumentType\Containers\Articles\def.config v2014-07-18 17:35:35,175 [6] INFO jumps.umbraco.usync.helpers.XmlDoc - [Thread 11] Archived [C:\website folder\uSync\DocumentType\Containers\Articles\def.config] to [C:\website folder\uSync.Archive\DocumentType\Containers\Articles\def180714173535.config] 2014-07-18 17:35:47,238 [6] INFO jumps.umbraco.usync.uSync - [Thread 11] Saving C:\website folder\uSync\DocumentType\Containers\Articles\def.config 2014-07-18 17:35:47,238 [6] INFO jumps.umbraco.usync.helpers.XmlDoc - [Thread 11] Archived [C:\website folder\uSync\DocumentType\Containers\Articles\def.config] to [C:\website folder\uSync.Archive\DocumentType\Containers\Articles\def180714173547.config]

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Jul 28, 2014 @ 13:44
    Kevin Jump
    0

    Yep - bug: need to turn off the attach code during an import (I thought i had).

    Just to add to the confusion it actually does update some of the settings, but importing a doctype is a two pass thing, so it imports things like names/descriptions. then because the OnSave triggers mid import the second part imports the old values back.

    in trying to optimize it I chose not to store the node object in memory between passes, - doh.

    I would as a matter of best practice turn on off attach in the config file (attach = "false") on a system you only intend to copy stuff to. or config files will be saved if anyone makes changed on the target box.

    I will apply a fix for this in the next version

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Jul 28, 2014 @ 15:31
    Kevin Jump
    100

    this is now fixed in latest release 2.3.0

    http://our.umbraco.org/FileDownload?id=12232

Please Sign in or register to post replies

Write your reply to:

Draft