Copied to clipboard

Flag this post as spam?

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


  • CraigFerguson 8 posts 98 karma points
    Feb 02, 2023 @ 11:00
    CraigFerguson
    0

    uSync 11 "ExportOnSave" setting

    I have installed uSync version 11.0.1 into umbraco 11.1.0 using nuGet.

    I can't find any combination of config that will allow me to export on save. Within the uSync "Settings" tab the "Export on startup" value is always "None", same if I "view appsettings".

    I have tried the example code found here which sets "ExportOnSave": "All" https://docs.jumoo.co.uk/usync/reference/config I can see that the uSync tab shows 3 sections "Settings", "Content","Everything" but the Settings > "Export on Save" is still None.

    If I change to: "ExportOnSave": "Settings" I see the "uSync" tab update to a single "Settings" section but still have "None" within the "Settings" tab. This proves to me that my config is in the right place and being read.

    I have tried many variations including removing all the config to allow it to fall back to defaults with the same results.

    Has anyone else experienced any problems with this or have any suggestions to make it export on save?

    Thanks Craig

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Feb 02, 2023 @ 13:34
    Kevin Jump
    0

    Hi Craig

    There are a few settings here for diffrent things and they can get confusing.

    ExportOnSave (Default All)

    This means when you save something in umbraco (.eg save a datatype, doctype or content item) uSync will write a usync config file into the usync folder on disk.

    by default this is on, and will happen whenever you save anything in Umbraco.

    ExportOnStartup (Default None)

    Very rarely needed will run export when your Umbraco site starts up, you really don't need this its just the logical pair setting with Import on Startup (also default none) - which can run an import when a site starts. which can be usefull for deployments etc.

    UiEnabledGroups (Default all)

    this is the groups / boxes you see on the uSync dashboard, so you can choose to turn the content box off in the uSync dashboard while not changing the underling settings of SaveOnExport etc..

    so In an example config section for appsetting.json you might have :

      "uSync": {
        "Settings": {
          "ExportOnSave": "Settings",
          "UiEnabledGroups":  "Settings"
        }
      }
    

    And this would remove the content (and everything) boxe(s) from the uSync dashboard, and only changes to Settings would be saved to disk when you saved them. (e.g this wouldn't sync content).

    Just checked this on v11 and it does work.

    enter image description here

    when you update the config file. you don't need to restart the site you but you do need to refresh your browser

  • CraigFerguson 8 posts 98 karma points
    Feb 03, 2023 @ 12:03
    CraigFerguson
    100

    Hi Kevin,

    Thanks for your help and for your quick response. My problem turned out to be due to settings that were in my appsettings.Development.json overriding the ones in appsettings.json.

      "uSync": {
        "Settings": {
          "ExportOnSave": "None"
        }
      }
    

    This is why all the other settings except for the export on save were working as I expected. Your post made me think I had a duplicate entry so I searched through all my config files which highlighted the problem.

    Thanks again and thanks for such a great package!

    Craig

Please Sign in or register to post replies

Write your reply to:

Draft