Problem/Motivation
The workflow_buttons_entity_view renders the widget even if there are no transitions available for the user.
In such cases, it typically displays the default actions of the entity (such as Save and Preview).
Steps to reproduce
- Edit Editorial workflow
- Add a new state "Review"
- Add a new transition "Review" ( Draft -> Review )
- Allow authenticated users to both add new articles and view own unpublished content.
- Allow authenticated users to use Review transition
- When an authenticated user creates and views an article node, the "Save" and "Preview" buttons are presented, but they literally do nothing.
Proposed resolution
Stop rendering the field widget if no transition is available for the logged-in user.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | Screenshot from 2024-05-07 13-07-36.png | 7.5 KB | rajan kumar@2026 |
| #2 | 3445614-2.patch | 1.88 KB | uditrawat |
Issue fork workflow_buttons-3445614
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
uditrawatAdd a patch to update
workflow_buttons_entity_viewComment #3
rajan kumar@2026 commentedComment #4
uditrawatComment #6
rajan kumar@2026 commentedHi, @uditrawat
Apply above patches and tested save and preview button Its working fine for me, moving RTBC++
Comment #7
rajan kumar@2026 commentedComment #8
wylbur commentedThis issue needs test coverage, I will see what I can do!
Comment #11
mlncn commentedBringing this in; would be excellent to have a test before we make a release.