wp-calypso icon indicating copy to clipboard operation
wp-calypso copied to clipboard

Post locking screen not always displayed

Open dsas opened this issue 2 years ago • 5 comments

Quick summary

A dotorg install displays this dialog when two users try to edit the same page.

Screenshot 2023-10-27 at 09 07 24

This dialog does not appear on dotcom. A similar one can be sometimes triggered.

Is the modal broken?

Once the dialog is being displayed, I think it's probably broken when using the calypso page/post editor.

The iframe bridge has some code related to making the post locking modal work across despite modals.

It assumes that the post locked dialog has three buttons but since https://github.com/WordPress/gutenberg/pull/37852 it only has two.

This means it's not overriding the all posts link to bust out the iframe and it's not modifying the take over button to add the frame-nonce.

Steps to reproduce

  1. Create a simple site and add an extra editor user to it
  2. As one user create a new post and save it as a draft. Leave this window open
  3. In a second profile/private window log in as the second user and then open the same draft as the other user has open.

What you expected to happen

A dialog to appear to the second user warning them that someone is already working on this page/post. Like the initial screenshot (made using a dotorg install).

What actually happened

Nothing, I could use the editor as normal.

Impact

One

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

No response

Logs or notes

In a dotorg install pressing 'Take over' will mean the original user will see a dialog warning them of this:

Screenshot 2023-10-27 at 09 13 17

This dialog does eventually appear in dotcom, if you start typing in both windows.

dsas avatar Oct 24 '23 14:10 dsas

Hey @dsas ! Would you like KitKat to replicate this further for you as part of triage? If so, I could use some info on what's expected/what's actually happening - I can't quite tell from the report above what to look for in that test. Once I know that, happy to test across Simple & Atomic to add further notes/screenshots!

cuemarie avatar Oct 26 '23 19:10 cuemarie

Hey @cuemarie. Sorry, this was a problem I found while looking at some related code but couldn't get to the affected modal dialog as the user. I've explored the problem a little more and rewritten the issue to be more user-centric.

dsas avatar Oct 27 '23 08:10 dsas

Much appreciated @dsas !

cuemarie avatar Oct 30 '23 20:10 cuemarie

📌 REPRODUCTION RESULTS

  • Tested on Simple – Replicated

📌 FINDINGS/SCREENSHOTS/VIDEO Replicated as described! I was never notified that someone was already editing a post. I did eventually run into the notification that "Someone else has taken over this post".

https://github.com/Automattic/wp-calypso/assets/27249804/373aea78-153f-4fc1-8315-6d72b991056a

📌 ACTIONS

  • Triaged

cuemarie avatar Oct 30 '23 23:10 cuemarie

I'm not sure why this is stripped out. This can be super handy in situations where multiple people are trying to edit a page/post. Otherwise edits can be lost.

davemart-in avatar Oct 18 '24 17:10 davemart-in

I think this is on purpose in D49393-code and only limited to a12s as a way to prevent blocking users during support sessions.

I've tried to reproduce it with my test (non-a8c) accounts and I couldn't reproduce it.

Closing this. :)

BogdanUngureanu avatar Oct 21 '24 14:10 BogdanUngureanu

@BogdanUngureanu, we're running some group triage at the moment and came across this issue. Did you resolve it as part of your Dotcom Groundskeeping rotation this week? Thanks!

inaikem avatar Oct 22 '24 14:10 inaikem

@inaikem yes, I investigated it yesterday.

BogdanUngureanu avatar Oct 22 '24 15:10 BogdanUngureanu