Problem/Motivation
When you install content lock together with Lock layout builder the primary button will get disabled when you try to edit a page anyone else is editing.
Problem with Gin LB however is that the additional button added to by the module will not be disabled and it will keep on trying to submit the primary button.
It would be better that this button follows the look & feel of the disabled primary button.
Steps to reproduce
Have a Layout builder enabled content type with Gin LB.
Install content lock & Lock layout builder
Edit layout of a page with 2 different users so content lock gets triggered.
You'll see a disabled save button and an enabled save button. The enabled one is added by Gin LB.
See added screenshot
Proposed resolution
Check if the primary button is disabled, if so follow its behavior.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Screenshot 2025-05-22 at 10.03.34.png | 16.16 KB | kevinvb |
| Screenshot 2025-05-22 at 09.34.29.png | 21.8 KB | kevinvb |
Issue fork gin_lb-3525977
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 #3
kevinvb commentedAdded MR which checks the state of the primary button
Comment #5
kevinvb commentedAlso created MR towards 2.x
Comment #6
christian.wiedemann commentedI merged it to the 3.x branch
Comment #7
christian.wiedemann commented