Describe your bug or feature request.
I received an order from a customer who paid using a credit card. Payment was processed using the Commerce Square Connect module. The order never transitioned from cart status to the validation state. It still appears to be an incomplete order because this error occurred at some point during the payment process:
2026/03/06 08:53:53 [error] 3155090#3155090: *1401973 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception TypeError: "Cannot access offset of type string on string" at /var/www/mysite/web/modules/contrib/commerce/modules/payment/src/Plugin/Field/FieldFormatter/BillingInformationFormatter.php line 90" while reading response header from upstream, client: 1.2.3.4, server: www.mysite.com, request: "GET /admin/commerce/orders/12614?destination=/admin/commerce/orders/carts HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php-fpm.sock:", host: "www.mysite.com", referrer: "https://www.mysite.com/admin/commerce/orders/carts"
This is the line of code described in the error:
$elements[0]['#slots']['card_content']['payment_information'] = $payment_information;
This is the json-encoded value of $elements[0]['#slots']
{"card_content":"","card_footer":{"manage_payments_link":{"#type":"link","#title":"Manage payment \u2192","#url":{}}}}
Sorry, I don't know what caused this, so I don't know how to reproduce it. It isn't happening with all of my orders, either.
Issue fork commerce-3577550
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 #4
sah62 commented@tbkot thanks, that should do it!
Comment #5
tbkot commentedComment #6
sah62 commentedI've made the change manually and tested it. The fix eliminated the error.
Comment #8
jsacksick commentedComment #11
tbkot commented@jsacksick
I've added a bit better solution to this, so tests should pass now
Comment #12
jsacksick commented