If a bug, provide steps to reproduce it from a clean install.
Install Commerce + Search API + Drupal 11.4
User warning: Recursive rendering attempt aborted for commerce_product_variation:entity_id:1075::fiber_id:235:ro:teaser. In progress: Array ( [taxonomy_term:entity_id:108:108:fiber_id:235:ro:full] => 1 [commerce_product_variation:entity_id:946::fiber_id:235:ro:teaser] => 1 [commerce_product_variation:entity_id:1002::fiber_id:235:ro:teaser] => 1 [commerce_product_variation:entity_id:1003::fiber_id:235:ro:teaser] => 1 [commerce_product_variation:entity_id:1011::fiber_id:235:ro:teaser] => 1 [commerce_product_variation:entity_id:1028::fiber_id:235:ro:teaser] => 1 [commerce_product_variation:entity_id:1033::fiber_id:235:ro:teaser] => 1 [commerce_product_variation:entity_id:110::fiber_id:235:ro:teaser] => 1 [commerce_product_variation:entity_id:1055::fiber_id:235:ro:teaser] => 1 [commerce_product_variation:entity_id:1067::fiber_id:235:ro:teaser] => 1 [commerce_product_variation:entity_id:1068::fiber_id:235:ro:teaser] => 1 [commerce_product_variation:entity_id:1075::fiber_id:235:ro:teaser] => 1 [commerce_product:entity_id:1144::fiber_id:235:ru:teaser] => 1 ) in Drupal\Core\Entity\EntityViewBuilder->setRecursiveRenderProtection() (line 564 of /var/www/html/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php)
#0 /var/www/html/web/core/includes/bootstrap.inc(104): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()
#2 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(564): trigger_error()
#3 [internal function]: Drupal\Core\Entity\EntityViewBuilder->setRecursiveRenderProtection()
#4 /var/www/html/web/modules/contrib/commerce/modules/product/src/ProductVariationFieldRenderer.php(37): call_user_func()
#5 /var/www/html/web/modules/contrib/commerce/modules/product/src/ProductViewBuilder.php(96): Drupal\commerce_product\ProductVariationFieldRenderer->renderFields()
#6 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(308): Drupal\commerce_product\ProductViewBuilder->alterBuild()
#7 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(255): Drupal\Core\Entity\EntityViewBuilder->buildMultiple()
#8 [internal function]: Drupal\Core\Entity\EntityViewBuilder->build()
#9 /var/www/html/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(107): call_user_func_array()
#10 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(914): Drupal\Core\Render\Renderer->doTrustedCallback()
#11 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(447): Drupal\Core\Render\Renderer->doCallback()
#12 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(230): Drupal\Core\Render\Renderer->doRender()
#13 /var/www/html/web/core/lib/Drupal/Core/Template/TwigExtension.php(501): Drupal\Core\Render\Renderer->render()
#14 /var/www/html/web/assets/php/twig/6a587be665758_views-view-unformatted.ht_iohmf_GEnl-KUttBHtzlg1lur/CNJSvGVd5M5EKV4LIEI6EiBiWjSKYoD4M9untxoEXOo.php(48): Drupal\Core\Template\TwigExtension->escapeFilter()
My taxonomy term view full for brand.
{% set classes = [
'vocabulary-' ~ term.bundle|clean_class,
] %}
{% embed 'x:hero-cover' with {
background_url: hero_bg_url,
title: term.label,
} only %}
{% block top %}
{{ drupal_breadcrumb() }}
{% endblock %}
{% endembed %}
{{ content|without('field_image') }}
{{ drupal_view('index_products', 'brand') }}
Comments
Comment #2
jsacksick commentedSince this is happening from a custom template + custom view, I'm not sure we'll be able to easily reproduce this.
Comment #3
pavelculacov commentedProblem found here:
{{ drupal_view('index_products', 'brand') }}
This is a View that renders products using the Teaser view mode based on a Search API index.
The View contains:
Render Entity (View mode: Teaser)
Sorting
This worked correctly in Drupal 10.3, but after upgrading to 10.4, it produces multiple errors.
if Disable "Inject product variation fields into the rendered product.", No error trigger
Comment #4
pavelculacov commentedHere patch that help me.
Comment #6
jsacksick commentedCommitted your fix! Thanks!