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

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

sah62 created an issue. See original summary.

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

sah62’s picture

@tbkot thanks, that should do it!

tbkot’s picture

Status: Active » Needs review
sah62’s picture

I've made the change manually and tested it. The fix eliminated the error.

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

jsacksick’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

tbkot’s picture

Status: Fixed » Needs review

@jsacksick
I've added a bit better solution to this, so tests should pass now

jsacksick’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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