Unable to update content

I have…

  • [X] Checked the logs and have provided the logs if I found something suspicious there

I’m submitting a…

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

Current behavior

Not able to update some contents

Expected behavior

Be able to update all contents ^^

Minimal reproduction of the problem

  • Create a schema
  • Create a Content
  • Try to update

Environment

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

Version: [VERSION]

Browser:

  • [X] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:
My squidex version is based on the current master branch

EDIT: That can append with all schema but only newly created content

I got an error 500 when I try to send an update request from my client app and an error 412 from the squdex UI

{ 
    "message":"Requested version 0 for object 'b0ccb322-65b7-42ff-9664-3cdc844bec87' (type 
        Squidex.Domain.Apps.Entities.Contents.ContentDomainObject), but found 1.",
    "traceId":"|3393cc74-4291b80316371480.",
    "type":"https://tools.ietf.org/html/rfc7231#section-6.5.10",
    "statusCode":412
}

here the log error at line 1397 and 1501

This has been fixed 1-2 hours ago.

1 Like

If the fix is suppose to be in this commit sorry but it didn’t fix it

Yes, exactly. I will have a look again.

Strange, it works on my machine as expected. Are you sure that you have restarted and so on?

Yeah, I’m force to stop then restart IIS to update my instance. But I found new behaviors. If I create the content from the UI and not from my client, everything works fine.

So the problem must come from my app, it look like it unsynchronyse the versions in some cases :thinking:

I try to update my contents just after created them, could this be linked ?

My workflow :

  • Create Schema A
  • Create Content 1 that got Schema A Id as value in a field
  • Create Content 2 still from an other schema
  • Update Content 1 by adding a reference to Content 2

Those 4 requests are sent in a row, but the forth generate the error 500 that seem to corrupt the content.

Sadly I didn’t use this part of my app since 2 weeks, so I’m not sure when exactly it stop working.

Timing could be an issue. I changed something how domain objects are loaded, so I guess the failure is on my side and not yours. I will try to reproduce it with a client tomorrow.

I am surprised that you use etags in your client, nobody does it I think.

I think step 3 does not really matter.

Btw: In the logs there is another error, it is also very old.

We do not use etags, what made you think this ?
I tried to add a timeout of 1s between the third and the forth steps: It works !!!
But I’m not a huge fan of that solution. It can become a mess on the long run, and drastictly slowdown the system. Hope we’ll found a better fix, but for know it’s not an emergency anymore :slight_smile:

This exception should only happen in case of you define the expected version with a header. Can you send me the correct logs?

This bug was one of the reasons why I started with a new test suite for API tests and I cannot reproduce it:

Here is my test:

So I updated Squidex, removed my patch then did the operation and now everythings works fine.
Even the old corrupted contents I was unable to delete or update are now updatable.

I’m sure I was up to date yesterday but there is no new commit that could fix this…

I suppose I missed my publish :confused:

1 Like

The same problem happened again, we didn’t update since last time, few contents un-updatable.

We’ll retry with the new version tomorow.

Strange, the new version is in production since a while (on the cloud) and I have not seen it yet.