Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If ContentHandler or MediaHandler is present it disables GuidNames setting #497

Open
ewuski opened this issue May 10, 2023 · 1 comment
Open
Labels
13.x NETCORE v13 - next LTS changes.

Comments

@ewuski
Copy link

ewuski commented May 10, 2023

uSync 9.2.0

I have the following configuration:

"uSync": {
    "Settings": {
      "UIEnabledGroups": "Content,Settings"
    },
    "Sets": {
      "Default": {
        "HandlerDefaults": {
          "GuidNames": true,
        },
        "DisabledHandlers": [ "DictionaryHandler" ],
        "Handlers": {
          "ContentHandler": {
            "ExportTrashed": false,
            "ImportTrashed": false
          },
          "MediaHandler": {
            "ExportTrashed": false,
            "ImportTrashed": false
          }
        }
      }
    }
  }

In this configuration when saving media the uSync media file is getting renamed/ saved using media name instead of guid - despite GuidNames is turned on. Same for content - it is getting saved to uSync folder using content name instead of the guid.

When I remove ContentHandler or MediaHandler section from config, the GuidNames works as expected (on content or media respectively).

@KevinJump
Copy link
Owner

yeah - looking into this, i think its an artifact of how options are loaded in .net 😢

once the section is there, all the values are loaded as part of the object - I am trying to work out if we can make that bit of the options load up from the default section, but .net seems to load the whole lot - and because the options can come from multiple locations (.json, environment, keys) - we can't 'just' read the json file to work it out.

so TL:DR = we've taking a look. at the moment, workaround is you have to specify any default values in the handlers if you add them.

@KevinJump KevinJump added the 13.x NETCORE v13 - next LTS changes. label Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
13.x NETCORE v13 - next LTS changes.
Projects
None yet
Development

No branches or pull requests

2 participants