uSync icon indicating copy to clipboard operation
uSync copied to clipboard

Importing a default language fails if there is only one language

Open karlmacklin opened this issue 10 months ago • 0 comments

Describe the bug

If you have only one language and try to import a new language which is set to default, the import fails. You can somewhat avoid this by manually creating the language first, but this is problematic for setups where you rely on automation, so it isn't really a workaround.

To Reproduce Steps to reproduce the behavior:

  1. Create a new local Umbraco project using Umbraco.Cms version 13.2.2 and uSync 13.1.3.
  2. Start Umbraco and create a new Language (other than english) under settings, setting it to the default language in the process. By now you should have two uSync language files, one updating the initial English one and your new default language.
  3. Stop Umbraco
  4. Delete your database (SQLite files for local dev for example)
  5. Start Umbraco
  6. Go to Settings > uSync and import Settings

Expected behavior

I expect the import to succeed, creating all relevant languages as a first step and afterwards altering which is the default one.

Actual behavior

Import fails, since it can't make english non-default as it is the only language in the system.

Screenshot

image

karlmacklin avatar Apr 02 '24 07:04 karlmacklin