KevinJump/uSync

[BETA FEEDBACK] uSync dashboard ignores default handler configuration

JoseMarcenaro opened this issue · 3 comments

Package Version
14.0.0-beta001

I found an inconsistent behavior when UseFlatStructure = false

  • The initial files generation (when installing uSync and running Umbraco) uses lowercase-with-hyphens. And folders are honored. This is consistent with what v9 does (when UseFlatStructure = false).
  • Saving an existing data type behaves the same way.
  • But the Export button ignores the UseFlatStructure flag: names are PascalCase, folders are not honored, duplicated files appear all over the place.

Note that when UseFlatStructure = true (default), the behavior is correct and consistent with v9:

  • All actions (initial files generation, saving a datatype or Exporting) generate files with PascalCase files - and no folders are generated, as specified.

I will try to find the issue in code and submit a PR

On further research, I noticed that all options configured for the uSync:Sets:Default are honored by the backend events (i.e. saving a DataType) but ignored by the dashboard. This means that the action buttons (i.e. Export) ignore the settings as well!

If you set this in appsettings.json

  "uSync": {
    "Sets": {
      "Default": {    // this section is being ignored by the dashboard.
        "DisabledHandlers": [ "ContentHandler", "MediaHandler"],
        "HandlerDefaults": {
          "UseFlatStructure": false
        }
      }
    }
  }

And then look at the Settings in the dashboard, you see this:
uSync_settings

... which mean that the settings are being ignored.

I'm submitting a PR to fix it: #601

Looks like my PR fixes the dashboard visualization (settings are correctly displayed) but the backend actions (Export) are still ignoring the Default Handler config.

Back to the lab for further research.

Found! the fixed handler set needed to be passed back to the Perform action.
Now PR #601 fixes not only the visualization (Settings) but the actions as well.