Issues with CLI

I have…

  • Read the following guideline: Troubleshooting and Support | Squidex. I understand that my support request might get deleted if I do not follow the guideline.
  • Used code blocks with ``` to format my code examples like JSON or logs properly.

I’m submitting a…

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

Current behavior

  • I created a schema, added a few records to the content, then updated the schema with a new field with default data. When I called ./sq contents enrich-defaults schema_a -u, the data was not updated in the Squidex UI.
  • I have schemas schema_b and schema_c. I tried to import data with the command ./sq sync in ./squidexdata -t contents. For schema_b, the data imported without error, but for schema_c, I got an “invalid command” error.

Expected behavior

  • Data should be updated on the UI after calling the enrich-defaults command.
  • Error messages should be more informative.

Minimal reproduction of the problem

  1. Create schema Item.
  2. Add content to the Item schema.
  3. Update the schema with a new field with a default value.
  4. Call enrich-defaults command via CLI.

Environment

App Name:

  • Self hosted with docker
  • Self hosted with IIS
  • Self hosted with other version
  • Cloud version

Version: Latest

Browser:

  • Chrome (desktop)
  • Chrome (Android)
  • Chrome (iOS)
  • Firefox
  • Safari (desktop)
  • Safari (iOS)
  • IE
  • Edge

Others:

I am not sure if these problems are CLI errors or not:

  1. The enrich defaults just triggers an API call. We have to investigate if the problem is on the CLI on the API. It also does not update fields that are set to null, only wqhen they are not defined (depends on whether you can click the “clear” button above each field or not)
  2. The “invalid command” error means that you wanted to update an entity on a schema which belongs to another schema. Content IDs are globally unique, therefore /schemaA/123 should actually be /schemaB/123

I have already created content. After I added a new field with a default value of 111, I noticed that this field appears empty in the Squidex UI and requires saving. However, when I use the CLI and call enrich-defaults, it indicates that the data is updated, but the field still appears empty in the UI.

But when I update it via ./sq contents import $schema_name $schema_name.json --format=JSON --app=$target_app, it works without error.

Which version do you use?

Squidex CLI v13.0.0.0
Squidex {“version”:“7.13.0.0”}

1 Like

I tested it locally and I cannot reproduce the problem with the enrich-defaults command.

Can we setup call, I can show this cases?

Can you create a separate issue first so that we can discuss one thing at a time?

I am available today after 5pm german time

I’m sorry for the delay, I’ve vacation for a week, link to separated issue.