After update Drupal Commerce of the lasted version, Order Type Item result Empty.
I do a bit of debug about the view commerce_order_item_table
After loking the code at /commerce/modules/order/src/Plugin/Field/FieldFormatter/OrderItemTable.php
public function viewElements(FieldItemListInterface $items, $langcode) {
/** @var \Drupal\commerce_order\Entity\OrderInterface $order */
$order = $items->getEntity();
$elements = [];
$order_item_ids = array_column($order->get('order_items')->getValue(), 'target_id');
$elements[0] = [
'#type' => 'view',
// @todo Allow the view to be configurable.
'#name' => 'commerce_order_item_table',
'#arguments' => $order_item_ids ? [implode('+', $order_item_ids)] : NULL,
'#embed' => TRUE,
];
return $elements;
}
I see that my contestual filter was set on Order_id field, but the order_item_ids variable is about the Id objects!
Resolution
I change the field of contestual filter, to point the ID with multiselect Active.
Comments
Comment #2
agoradesign commentedYou should have read the Release notes ;)
There's a CR about that
Comment #3
agoradesign commentedComment #4
cayenne commentedSo, for those of using version 2.24 and still having the bug, is the advice to patch the code?
Aha. yes, read the release note. those of us who have fiddled with the view have to fiddle a little bit more.
https://www.drupal.org/node/3197301