uSync
uSync copied to clipboard
Importing a default language fails if there is only one language
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:
- Create a new local Umbraco project using Umbraco.Cms version 13.2.2 and uSync 13.1.3.
- 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.
- Stop Umbraco
- Delete your database (SQLite files for local dev for example)
- Start Umbraco
- 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