When workflow creates the action buttons, the buttons' values get assigned as they are in the db.

The buttons' values (aka the Transitions' Labels) should be passed through html_entity_decode so Drupal doesn't get lost searching for a button, like Save & Review vs Save & Review.

Without html_entity_decode, Drupal can't find the clicked button and ends up assuming that another button was clicked.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

natanmoraes created an issue. See original summary.

natanmoraes’s picture

Status: Active » Needs review
FileSize
643 bytes
johnv’s picture

Component: Code » User interface

Regrouping issues for action buttons.

  • johnv committed 223f627 on 7.x-2.x
    Issue #2578493: html_encode option values for workflow/state/transition
    

  • johnv committed 1c0fa82 on 8.x-1.x
    Issue #2578493: html_encode option values for workflow/state/transition
    
johnv’s picture

Title: Action button value should have special chars encoded » html_encode the option values for workflow/state/transition
Version: 7.x-2.x-dev » 7.x-2.5
Status: Needs review » Fixed

Thanks for the tip.
This is not only for action buttons but for radio's and select list as well.

In D8, less changing was needed, since Twig does some great things by itself.

johnv’s picture

Title: html_encode the option values for workflow/state/transition » Use html_entity_decode() for the option values for workflow/state/transition

Status: Fixed » Closed (fixed)

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

johnv’s picture

Status: Closed (fixed) » Fixed

This was not OK for the D8-version. Now it is.

  • johnv committed c5b5343 on 8.x-1.x
    Issue #2578493 by natanmoraes: Use html_entity_decode() for the option...

Status: Fixed » Closed (fixed)

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