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.

Command icon 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

uditrawat created an issue. See original summary.

uditrawat’s picture

StatusFileSize
new1.88 KB

Add a patch to update workflow_buttons_entity_view

rajan kumar@2026’s picture

Assigned: Unassigned » rajan kumar@2026
uditrawat’s picture

Status: Active » Needs review

rajan kumar@2026’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new7.5 KB

Hi, @uditrawat

Apply above patches and tested save and preview button Its working fine for me, moving RTBC++

rajan kumar@2026’s picture

Assigned: rajan kumar@2026 » Unassigned
wylbur’s picture

This issue needs test coverage, I will see what I can do!

mlncn made their first commit to this issue’s fork.

mlncn’s picture

Priority: Minor » Normal
Status: Reviewed & tested by the community » Fixed

Bringing this in; would be excellent to have a test before we make a release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.