Cart block content disappears after "Add to cart" – replaced by render placeholder

Created on 19 June 2025, 3 months ago

Problem/Motivation

After clicking the Add to cart button, the cart block content disappears and is replaced with the following render placeholder:

I tested this on a clean installation using the latest Commerce Kickstart profile, and the issue is there as well.

System info:

Drupal version: 11.1.8
Commerce module version: 3.0.2

Proposed resolution

in commerce_ajax_atc_render_cart_block function the:

$build = $cart_block->getPlugin()->build();
return \Drupal::service('renderer')->render($build);

has to be changed to:

return $entity_type_manager->getViewBuilder('block')->view($cart_block);

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024