[SOLVED] Singleton content sync errors

I have…

I’m submitting a…

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

Current behavior

Hello,

When running sq sync in folder we are getting failed: Singleton content cannot be created errors. Would it be possible to get some more context on what this error means, and how to prevent it? Looking at the code below it seems that the relevant condition failing is coming from context.ContentId != context.Schema.Id but it would be great to find out what exactly ContentId and Schema are so we can fix this.

Thanks

Expected behavior

Error message explaining what the problem is

Minimal reproduction of the problem

sq sync in folder

Yes, you are right. Singletons are not handled / covered by the CLI yet.

OK good to know, what exactly is a singleton so we can avoid this error? Couldn’t find anything in the docs.

A singleton is a schema that has only one content item. This content item must have the ID of the schema it belongs to.

So when you make a sync to a new app, a new schema is created with a new ID. Therefore the content ID does not match to the schema ID anymore.

I will provide a fix for that soon. It will and can be solved in the CLI.

Great - any idea on when that might be fixed?

Today, I hope…but I do not promise it.

1 Like

It has been pushed and deployed.

Running the sync we are still getting the same error unfortunately. By the way we are using cloud squidex, the screenshot shows that we are currently getting served an old snapshot so that might be why we’re not seeing the change yet? Looking at the source and changelog I don’t see any recent updates.

Thanks

Have you downloaded the new CLI?

Not yet, will give that a go.

1 Like

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