Skip to content

Post lock modal shows "Someone else has taken over this post" after 10 seconds #79976

Closed

Description

@alecgeatches

Reproduction

Joining a locked post results in a "This post is already being edited" dialog with a "Take over" button. After 10 seconds, the dialog changes to "Someone else has taken over this post", with the "Take over" button removed:

post-lock-modal-reproduction.mov

This can be reproduced with RTC turned off, but is related to test failures #79922 / #78753 which also show the post locked modal in response to a specific RTC condition. To reproduce without RTC:

  1. With RTC turned off, create a new post and save.

  2. Using another WordPress user, open the same post.

  3. See a "This post is already being edited" dialog:

    Image
  4. Wait about 10 seconds.

  5. See the dialog change to "Someone else has taken over this post" and the "Take over" button be removed:

    Image

How is this related to the RTC test fail?

From @adamsilverstein in #78753 (comment):

The failure is always the same assertion: the "Take over" link in the "This post is already being edited" post-locked modal is never found (collaboration-document-size-lock.spec.ts:159).

On CI, it appears inconsistent whether the editor loads fast enough to see the original "This post is already being edited" dialog, or the updated "Someone else has taken over this post" dialog.

It fails because the test is specifically looking for the "Take Over" button. collaboration-document-size-lock.spec.ts should be updated to work either way, because we are concerned about the too-large document size text and not the particular dialog text around it.

However, there's another problem here that that also causes the "Take over" button to be removed when it probably shouldn't be. It looks like we're using a stale lock value in the modal which causes the flip-flop. I'm not sure when this issue was introduced.

Activity

  1. self-assigned this
    on Jul 8, 2026
  2. added
    [Type] Bug
    on Jul 8, 2026
  3. added
    [Feature] Real-time Collaboration
    and removed
    [Feature] Real-time Collaboration
    on Jul 8, 2026
  4. added
    [Status] In Progress
    on Jul 8, 2026
  5. i-am-chitti commented on Jul 8, 2026

    @i-am-chitti
    Contributor

    Here is a PR I've raised which fixes the issue - #79997

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Status] In Progress[Type] Bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions