Error when use layoutbuilder in display in a view

Created on 12 November 2023, 8 months ago
Updated 21 December 2023, 6 months ago

When I create a view of commerce products and I switch in the display option from fields to product I get this error

Drupal\Component\Plugin\Exception\MissingValueContextException: Required contexts without a value: entity in Drupal\Core\Plugin\Context\ContextHandler->applyContextMapping() (line 150 of /data/sites/web/ener-guybe/www/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php)

The product layout is made by layout builder. When you use just fields than is not a problem.

Someone any solutions ?

πŸ’¬ Support request
Status

Postponed: needs info

Version

10.1 ✨

Component
ViewsΒ  β†’

Last updated about 4 hours ago

Created by

πŸ‡§πŸ‡ͺBelgium Mav_fly

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

Comments & Activities

  • Issue created by @Mav_fly
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10
  • Status changed to Postponed: needs info 7 months ago
  • πŸ‡³πŸ‡±Netherlands Lendude Amsterdam

    Is there any way to reproduce this in a clean Drupal install?

    This could be due to something in core, but also could be something in Commerce or maybe custom code or configuration.

  • πŸ‡§πŸ‡ͺBelgium Mav_fly

    After some further research into this project, we have been able to conclude the following :

    So when you install commerce and layout builder. And you make a product type and go to display where you make a new custom display setting.
    In this display you layout it with layout builder. Then you make a view of commerce products and switch in the display option from fields to product and add this block to your website in a contenttype with layoutbuilder.
    Then you get this error when you add fields from product variation (price, SKU, ID,...) in your custom display from product type.
    When you remove this fields everything works fine.

Production build 0.69.0 2024