Cannot change completion message text format

Created on 14 April 2025, 10 days ago

Describe your bug or feature request.

Using the Default checkout flow, if I try to change the completion message text format from plain text to Basic HTML (or anything else), and change nothing else, then there is no change to the text format. Worse still, the previous operation in the checkout flow (payment_process) gets moved into the Complete pane.

When I go through the checkout process and I'm just about to reach the completion page, I then get the error:

InvalidArgumentException: Invalid step ID "" passed to redirectToStep(). in Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowBase->redirectToStep() (line 214 of modules/contrib/commerce/modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowBase.php).

See #3045916: Don't allow the PaymentProcess pane to be placed on the Complete step .

If I make multiple attempts to change the completion message text format, then each time I do so, yet another preceeding operation gets moved into the Complete pane.

If a bug, provide steps to reproduce it from a clean install.

Got to edit the default Checkout Flow. In the Complete pane, change the text format of the completion message, and Save. Return to the edit page, and observe that payment_process has now relocated to the Complete pane, and the completion message text format remains as plain text.

Analysis

Looking at the exported yml, I see the following differences:

       button_id: edit-actions-next
       auto_submit_review_form: false
       setup_future_usage: ''
     payment_process:
       display_label: null
-      step: payment
-      weight: 6
+      step: complete
+      weight: 7
       wrapper_element: container
       capture: true
     completion_message:
+      display_label: null
       step: complete
       weight: 7
-      wrapper_element: null
-      message:
-        value: "Thank you for your order!\r\nYour order number is [commerce_order:order_number].\r\n\r\nWe’ve sent a confirmation email to your inbox with all the details. You’ll receive another email once your order has been dispatched.\r\nIf you have any questions in the meantime, feel free to contact us."
-        format: plain_text
+      wrapper_element: container
+      capture: true
     order_summary:
       display_label: null
       step: _sidebar
       weight: 8
       wrapper_element: container

The payment_process has relocated itself into the completion step, the my previously customised message text has been deleted. The message format is no longer "plain_text" but it hasn't been given a new value.

🐛 Bug report
Status

Active

Version

3.0

Component

Checkout

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024