[SOLVED] Sync CLI: Sync fails when a schema has a Components field

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

I have:
A Default type component (named country), with a Components (array of components) field referenced (named score).
When syncing out/in, if there is at least one score in the field, I get this error:
failed: Validation error: indicators.iv: Invalid component. Cannot find schema.
The countries that have an empty scores field sync correctly

Expected behavior

Should import whether there are values in the scores field or not

Minimal reproduction of the problem

Minimal simplified schemas:
COUNTRY

{
  "schema": {
    "fields": [
      {
        "name": "scores",
        "partitioning": "invariant",
        "properties": {
          "fieldType": "Components",
          "schemaIds": [
            "score"
          ]
        }
      }
    ],
    "isPublished": true
  },
  "name": "country",
  "isSingleton": false,
  "schemaType": "Default"
}

SCORE

{
  "schema": {
    "fields": [
    ]
  },
  "name": "score",
  "isSingleton": false,
  "schemaType": "Component"
}

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [x] Cloud version

Version: [CLI 9.6]

Hi,
I just tried with:
sq content export
sq content import
It also fails with the same error message

Does it work in the UI?

Yes, I was able to add one manually and save.
It also works with the .NET SDK using BulkUpdate

1 Like

I think the problem is actually this bug: schemaName is missing from API

Which version do you use?

Sync out from an on-premise Squidex 6.7.0.0
Sync in to Cloud (7.0.0.0)
Also tried syncing in another app in 6.7 but I have more issues (e.g. allowed schemas in components fields are not synced) and it’s not the target anyway so I gave up.

Using CLI 9.6

The cloud has the same problem. It is actually not a problem of the CLI. It is fixed, but I am not sure yet, when I can deploy it.

1 Like

Fixed as part of dev-7577.

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.