Copied to clipboard

Flag this post as spam?

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


  • Rich Lee 26 posts 116 karma points
    Sep 04, 2013 @ 12:56
    Rich Lee
    0

    Basic usage Q

    Hi,

    probably being thick here, so thx in advance.

    I have uSync installed back of an MVC4 solution.

    When I set usync config to read="true" write="false", make a change to web.config and run then uSync captures Umbraco structure to disk. Cool.

    Now I want to have uSync drive that structure back into the database - I deleted a document type in the back office to see if it works. So my doc type is in the uSync xml, but not the database. I spin up my site with read="false" write="true", but the doc type isn't pushed into the db. What am I missing?

    Thx

    Rich

  • Rich Lee 26 posts 116 karma points
    Sep 04, 2013 @ 13:03
    Rich Lee
    0

    Um... Umbraco 6.1.3

  • Kevin Jump 2200 posts 14080 karma points MVP 6x c-trib
    Sep 04, 2013 @ 13:10
    Kevin Jump
    0

    don't worry you're not being think - the naming of the config is a bit backwards - i was going to change it.

    read = read the disk and put it into umbraco write = write the umbraco db to disk attach = attach to the save/delete events so when you

    On first run (When the uSync folder is missing) - uSync will do a one time write (hence it looks like it write works first time even when it's set to false. (it just checks for a uSync folder so you can create one and it will do nothing)

  • Rich Lee 26 posts 116 karma points
    Sep 04, 2013 @ 13:49
    Rich Lee
    0

    Thanks Kevin,

    So I did understand :)

    I still have a problem with 'read' though: using 

    <usync read="true" write="false" attach="true" folder="~/uSync/" archive="~/uSync.Archive" versions="true" preserve="false">

    I have a doc type in the xml which I've subsequently deleted from the db and expect to be pushed back in. I made a small change to web.config to trigger, and restarted my site, but the doc type wasn't put back in. I also tried killing the IIS Express host.

    Is there anything ese I need to do?

    TIA

    Rich Lee

  • Rich Lee 26 posts 116 karma points
    Sep 04, 2013 @ 14:14
    Rich Lee
    100

    Ah, looks like my usage of attach may be the cause of my problem:

    With attach="true" uSynch tracks both creation **and deletion** of doc type etc. However on delete the uSync folder doesn't get deleted, just the def.config file.

     

    So when I deleted an item attach ensured uSync err... kept the xml in sync. :) 

     

    Thanks Kevin.

Please Sign in or register to post replies

Write your reply to:

Draft