-
Couldn't load subscription status.
- Fork 5
Description
When restoring an environment using @kontent-ai/data-ops, the process fails with the following error if content items contain non-localizable elements:
Error:
{"message":"Bad Request – Publishing item failed because some non-localizable elements need to be published in the default variant.","errorCode":4040031}
It looks like the tool attempts to publish non-default language variants before publishing the default language variant. Since non-localizable fields must be published in the default variant first, the restore fails.
Steps to reproduce:
- Create a content type with a required non-localizable element (e.g., asset, taxonomy).
- Publish items with multiple language variants.
- Export environment.
- Try to restore into a clean environment.
- Restore fails at the
languageVariantsstep with the error above.
Expected behavior:
The tool should first publish the default language variant, then proceed with other language variants.
Workaround:
Running restore with --skipPublish works, but requires manual publishing afterwards.
Tool version: @kontent-ai/data-ops @kontent-ai/data-ops (latest as of 2025-09-29)
Node.js version: 20.19.4
OS: Mac os