Jumoo / uSync.Complete.Issues

Public Issue tracker and roadmap for uSync.Complete
https://jumoo.co.uk/usync/complete/
2 stars 1 forks source link

uSync Roots collides with RootFolder #224

Closed bogdanvista closed 2 months ago

bogdanvista commented 3 months ago

Describe the bug We had a custom "RootFolder" set in the appsettings file. I believe that after the Roots feature was included the RootFolder was ignored as uSync updates were saved only in the default folder.

The UI has changed and now it's showing two Folders instead of the root folder, and I had to update the "Folders" setting in order for this to change: image (nevermind this is not documented as there are still screenshots from v9)

Not sure if this was the right approach either as I can't find any information on how to disable this functionality. If I set the IsRootSite to true then it will create that Root folder and show a yellow message on the CMS, things I don't want.

I think this is a bug as a minor upgrade shouldn't break functionality. Now we're in a situation where we are missing CMS doctype updates that were done by the developers because they were not saved in our custom folder.

Version (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Set a "RootFolder" in appsettings.json
  2. Open the CMS and look at the uSync settings and see it's still using default folders.
  3. Save a Doctype and see it's not in the set "RootFolder" folder.
KevinJump commented 3 months ago

yes,

Its a bug, the root folders should use the RootFolder value for the last of the list and it doesn't .

KevinJump commented 3 months ago

Fix will be in the next release (its a uSync core issue, but we will likely release both packages together).

There is some documentation - https://docs.jumoo.co.uk/usync/uSync/guides/syncRoot but we need to update it to give more details on the folders setup.

working (so once this is fixed) there should be no change, as the site will not have a "root" folder so everything will be saved into the last folder in the array.

you can change the Folders value to a single folder (e.g "Folders": [ "uSync/Custom/"), and this will effectively disable it and the site won't report itself as a root site.

but with the fix in the behavior is the same as when the root folder isn't present on the disk.

bogdanvista commented 3 months ago

Thanks, that was fast :)

I tried changing the "Folders" value to a single folder but that didn't seem to work. The UI reported the same 2 default folders. I thought it needs two items in the array for the appsettings override to work. Or this will only work if IsRootSite is also set to true?

KevinJump commented 3 months ago

A single folder in the array should 'just' work without any other settings - the site won't be root, and it will say root locked, but as there isn't a 'root' folder it will carry on. (at least it did just now when i tested it for that fix... i will double check)

you can have any list of folders in the array, if the doesn't exist it skips over it, thats why /uSync/Root, /uSync/CustomFolder should work. because it will not find root but find custom folder and behave the same way as previously.

bogdanvista commented 2 months ago

True, a single folder seems to be working (maybe I didn't properly ensure the files were updated) but your fix also seems to be working, thanks!

Should I close this? I will. Thanks.