Problem/Motivation
I've demoed this module to a group of ~10 people and we agreed that the warning message could use some improvement.
How it looks now:

So we have two separate warning messages, one reads:
This content is being edited by the user cm1 and is therefore locked to prevent other users changes. This lock is in place since 3 min 24 sec.
And the other reads:
Click here to Break lock
Proposed resolution
I originally thought we should combine the two messages into one, but when I was testing in Drupal 11 I see that's already happening. Only in Drupal 10 do the two messages appear distinct.
I propose the messages be changed to this:

This content is being edited by the user "cm1" and is therefore locked to prevent changes by other users. This lock has been active for 3 minutes.
and
Break the lock.
I feel this phrasing flows better. It also surrounds the username in quotes which makes it easier to understand its the username. This also removes the seconds granularity from the message, which is likely too verbose (seconds are still used if it's less than 1 minute).
And the "Break the lock." is a bit more elegant than "Click here to Break lock", which was missing a period, had a capital B, and an erroneous "click here" (wasn't part of the link).
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Screenshot 2025-09-25 at 12.48.48 PM.png | 44.59 KB | bkosborne |
| Screenshot 2025-09-24 at 10.49.10 AM.png | 51.87 KB | bkosborne |
Issue fork content_lock-3548506
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
bkosborneComment #3
bkosborneComment #4
bkosborneComment #6
bkosborneThose test failures are unrelated
Comment #7
dan3h commentedI came here to create a ticket to suggest rewording the lock-warning message to almost EXACTLY what you proposed. So I am happy to see someone else has already done it. Thanks, @bkosborne!
Comment #9
alexpottI've changed the username token to use the % placeholder - as this will mark up the username appropriately. The other changes here look great. Thanks!
Comment #10
alexpottComment #12
alexpott