Skip to content

Updating a resource on distant server results in a 409 #1082

@thierry2015

Description

@thierry2015
  • Laravel Version: 5.7.15
  • Nova Version: 1.1.7
  • PHP Version: 7.2.12

Description:

When updating a resource that was recently created (about a minute ago), I keep having the same updating error message:

Another user has updated this resource since this page was loaded. Please refresh the page and try again.

The resource was retrieved at 1543891456 and last updated at 1543891576 (2 min after)
I was the only user editing the resource.

Since the retrieved_at time is the browser's Date() time and the updated_at is the server timestamp, there is a possibility of a mismatch if the client and the server are not well synced. This might also happen if updating on a different timezone.

Steps To Reproduce:

  1. Have a distant server with a fresh Laravel w/ nova application, with a resource using the updated_at column.
  2. Change the client time to make it 2 minutes earlier than the server
  3. Update a resource
  4. Edit the same resource again
  5. Update it again
  6. The error should appear on save (HTTP 409 w/ an error toast)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions