I upgraded to the latest dev branch a few hours ago, and it broke all the views I had set up for our products. The cause appears to be a filter field on the views that used variations:delta and set to 0, in order to only show the first variation of each product row, rather than a row for every variation of the same product.

After update, the filter field is reported in views as "Broken/missing handler", and I can't find another variations delta in the filter fields.

I assume I just missed something obvious, but what should I do? Is there a new process for limiting to just the first variation I'm unaware of?

Comments

Gode.Agarunov created an issue. See original summary.

bojanz’s picture

Did you run update.php after you updated the files? And tried clearing the cache?

Gode.Agarunov’s picture

@bojanz

Yes sir:

 -------------------- ----------- --------------- -----------------------------
  Module               Update ID   Type            Description
 -------------------- ----------- --------------- -----------------------------
  commerce_order       8208        hook_update_n   Convert the 'order_items'
                                                   configurable field into a
                                                   base field.
  commerce_order       8209        hook_update_n   Update all existing views
                                                   using a reference to order
                                                   items.
  commerce_product     8208        hook_update_n   Convert 'stores' and
                                                   'variations' configurable
                                                   fields into base fields.
  commerce_product     8209        hook_update_n   Update all existing views
                                                   using a reference to stores
                                                   or variations.
  commerce_store       8203        hook_update_n   Add the timezone field to
                                                   stores.
  commerce_promotion   11          post-update     Allows promotion start and
                                                   end dates to have a time
                                                   component.
  commerce_store       3           post-update     Revert the Store entity
                                                   form display.
 -------------------- ----------- --------------- -----------------------------


 Do you wish to run the specified pending updates? (yes/no) [yes]:
 > yes

>  [warning] Invalid json in modules/contrib/devel_ladybug/composer.json
>  [notice] Update started: commerce_order_update_8208
>  [notice] Update completed: commerce_order_update_8208
>  [notice] Update started: commerce_product_update_8208
>  [notice] Update completed: commerce_product_update_8208
>  [notice] Update started: commerce_order_update_8209
>  [notice] Update completed: commerce_order_update_8209
>  [notice] Update started: commerce_product_update_8209
>  [notice] Update completed: commerce_product_update_8209
>  [notice] Update started: commerce_store_update_8203
>  [notice] Update completed: commerce_store_update_8203
>  [warning] Invalid json in modules/contrib/devel_ladybug/composer.json
>  [warning] Invalid json in modules/contrib/devel_ladybug/composer.json
>  [notice] Update started: commerce_promotion_post_update_11
>  [notice] Update completed: commerce_promotion_post_update_11
>  [notice] Update started: commerce_store_post_update_3
>  [notice] Succeeded:core.entity_form_display.commerce_store.online.default was successfully reverted
>  [notice] Update completed: commerce_store_post_update_3
bojanz’s picture

Okay, it was worth checking. Thanks for reporting back.

This was caused by #3002939: Convert order/product multivalue configurable fields back into base fields. We'll need to investigate why the "delta" filter disappeared and how we can bring it back.
Could you share an export of the view by any chance?

Gode.Agarunov’s picture

@bojanz, sure, it's going to be a bit complicated and long though

uuid: 5977d1af-504e-416b-9ebb-50e94b365efc
langcode: en
status: true
dependencies:
  config:
    - commerce_product.commerce_product_type.party_speaker
    - field.storage.commerce_product.field_msrp
    - field.storage.commerce_product.field_subtitle
    - field.storage.commerce_product_variation.field_product_variation_media
    - user.role.administrator
    - user.role.management
    - user.role.sales
    - user.role.wholesaler
  module:
    - commerce
    - commerce_order
    - commerce_price
    - commerce_product
    - user
    - views_infinite_scroll
id: catalog_party_speakers
label: 'Catalog - Party Speakers'
module: views
description: ''
tag: ''
base_table: commerce_product_field_data
base_field: product_id
core: 8.x
display:
  default:
    display_plugin: default
    id: default
    display_title: Master
    position: 0
    display_options:
      access:
        type: none
        options: {  }
      cache:
        type: tag
        options: {  }
      query:
        type: views_query
        options:
          disable_sql_rewrite: false
          distinct: false
          replica: false
          query_comment: ''
          query_tags: {  }
      exposed_form:
        type: basic
        options:
          submit_button: Apply
          reset_button: false
          reset_button_label: Reset
          exposed_sorts_label: 'Sort by'
          expose_sort_order: true
          sort_asc_label: Asc
          sort_desc_label: Desc
      pager:
        type: infinite_scroll
        options:
          items_per_page: 24
          offset: 0
          id: 0
          total_pages: null
          tags:
            previous: ‹‹
            next: ››
          expose:
            items_per_page: false
            items_per_page_label: 'Items per page'
            items_per_page_options: '5, 10, 25, 50'
            items_per_page_options_all: false
            items_per_page_options_all_label: '- All -'
            offset: false
            offset_label: Offset
          views_infinite_scroll:
            button_text: 'Load More'
            automatically_load_content: false
      style:
        type: default
        options:
          grouping: {  }
          row_class: product-flex-col
          default_row_class: true
      row:
        type: fields
      fields:
        title:
          id: title
          table: commerce_product_field_data
          field: title
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: string
          settings:
            link_to_entity: false
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          entity_type: null
          entity_field: title
          plugin_id: field
        view_commerce_product:
          id: view_commerce_product
          table: commerce_product
          field: view_commerce_product
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          text: view
          output_url_as_text: true
          absolute: false
          entity_type: commerce_product
          plugin_id: entity_link
        field_msrp:
          id: field_msrp
          table: commerce_product__field_msrp
          field: field_msrp
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: number
          type: commerce_price_calculated
          settings:
            strip_trailing_zeroes: false
            currency_display: symbol
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          plugin_id: field
        price__number:
          id: price__number
          table: commerce_product_variation_field_data
          field: price__number
          relationship: variations
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: number
          type: commerce_price_calculated
          settings:
            strip_trailing_zeroes: false
            currency_display: symbol
            adjustment_types:
              fee: fee
              promotion: promotion
              tax: '0'
              shipping: '0'
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          entity_type: commerce_product_variation
          entity_field: price
          plugin_id: field
        field_product_variation_media:
          id: field_product_variation_media
          table: commerce_product_variation__field_product_variation_media
          field: field_product_variation_media
          relationship: variations
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: target_id
          type: entity_reference_entity_view
          settings:
            view_mode: variation_image_catalog_mode
          group_column: target_id
          group_columns: {  }
          group_rows: true
          delta_limit: 1
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ''
          field_api_classes: false
          plugin_id: field
        nothing:
          id: nothing
          table: views
          field: nothing
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: false
          alter:
            alter_text: true
            text: "<a class=\"fcatalog-product-wrapper\" href=\"{{ view_commerce_product }}\"  title=\"{{ title }}\" data-toggle=\"tooltip\" data-placement=\"bottom\">\r\n\t\r\n\t<div class=\"fcatalog-product-media text-center\">\r\n\t\t{{ field_product_variation_media }}\r\n\t</div>\r\n\t<h2 class=\"fcatalog-product-title text-center\">\r\n\t\t{{ title }}\r\n\t</h2>\r\n\t<div class=\"fcatalog-product-data text-center\">\r\n\t\t<h5 class=\"fcatalog-product-msrp text-center\">\r\n\t\t\t<label>MSRP:&nbsp;</label><span class=\"fc_msrp\">{{ field_msrp }}</span>\r\n\t\t</h5>\r\n\t\t<h4 class=\"fcatalog-product-price text-center\">\r\n\t\t\t<label>Your Price:&nbsp;</label><span class=\"fc_price\">{{ price__number }}</span>\r\n\t\t</h4>\r\n\t</div>\r\n</a>"
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: false
          plugin_id: custom
      filters:
        status:
          value: '1'
          table: commerce_product_field_data
          field: status
          plugin_id: boolean
          entity_type: commerce_product
          entity_field: status
          id: status
          expose:
            operator: ''
          group: 1
        delta:
          id: delta
          table: commerce_product__variations
          field: delta
          relationship: none
          group_type: group
          admin_label: ''
          operator: '='
          value:
            min: ''
            max: ''
            value: '0'
          group: 1
          exposed: false
          expose:
            operator_id: ''
            label: ''
            description: ''
            use_operator: false
            operator: ''
            identifier: ''
            required: false
            remember: false
            multiple: false
            remember_roles:
              authenticated: authenticated
            placeholder: ''
            min_placeholder: ''
            max_placeholder: ''
          is_grouped: false
          group_info:
            label: ''
            description: ''
            identifier: ''
            optional: true
            widget: select
            multiple: false
            remember: false
            default_group: All
            default_group_multiple: {  }
            group_items: {  }
          plugin_id: numeric
        type:
          id: type
          table: commerce_product_field_data
          field: type
          relationship: none
          group_type: group
          admin_label: ''
          operator: in
          value:
            party_speaker: party_speaker
          group: 1
          exposed: false
          expose:
            operator_id: ''
            label: ''
            description: ''
            use_operator: false
            operator: ''
            identifier: ''
            required: false
            remember: false
            multiple: false
            remember_roles:
              authenticated: authenticated
            reduce: false
            hide_single_bundle: true
          is_grouped: false
          group_info:
            label: ''
            description: ''
            identifier: ''
            optional: true
            widget: select
            multiple: false
            remember: false
            default_group: All
            default_group_multiple: {  }
            group_items: {  }
          entity_type: commerce_product
          entity_field: type
          plugin_id: commerce_entity_bundle
      sorts: {  }
      title: 'Party Speakers'
      header: {  }
      footer: {  }
      empty: {  }
      relationships:
        variations:
          id: variations
          table: commerce_product__variations
          field: variations_target_id
          relationship: none
          group_type: group
          admin_label: 'variations: Product variation'
          required: true
          plugin_id: standard
          entity_type: commerce_product
          entity_field: variations
      arguments: {  }
      display_extenders: {  }
      use_ajax: true
    cache_metadata:
      max-age: -1
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - url.query_args
      tags:
        - 'config:field.storage.commerce_product.field_msrp'
        - 'config:field.storage.commerce_product_variation.field_product_variation_media'
  block_1:
    display_plugin: block
    id: block_1
    display_title: 'Logged In'
    position: 1
    display_options:
      display_extenders: {  }
      display_description: ''
      block_description: 'Party Speakers'
      access:
        type: role
        options:
          role:
            wholesaler: wholesaler
            sales: sales
            management: management
            administrator: administrator
      defaults:
        access: false
        fields: false
      fields:
        title:
          id: title
          table: commerce_product_field_data
          field: title
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: string
          settings:
            link_to_entity: false
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          entity_type: null
          entity_field: title
          plugin_id: field
        view_commerce_product:
          id: view_commerce_product
          table: commerce_product
          field: view_commerce_product
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          text: view
          output_url_as_text: true
          absolute: false
          entity_type: commerce_product
          plugin_id: entity_link
        field_msrp:
          id: field_msrp
          table: commerce_product__field_msrp
          field: field_msrp
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: number
          type: commerce_price_calculated
          settings:
            strip_trailing_zeroes: false
            currency_display: symbol
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          plugin_id: field
        price__number:
          id: price__number
          table: commerce_product_variation_field_data
          field: price__number
          relationship: variations
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: number
          type: commerce_price_calculated
          settings:
            strip_trailing_zeroes: false
            currency_display: symbol
            adjustment_types:
              fee: fee
              promotion: promotion
              tax: '0'
              shipping: '0'
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          entity_type: commerce_product_variation
          entity_field: price
          plugin_id: field
        field_product_variation_media:
          id: field_product_variation_media
          table: commerce_product_variation__field_product_variation_media
          field: field_product_variation_media
          relationship: variations
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: target_id
          type: entity_reference_entity_view
          settings:
            view_mode: variation_image_catalog_mode
          group_column: target_id
          group_columns: {  }
          group_rows: true
          delta_limit: 1
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ''
          field_api_classes: false
          plugin_id: field
        field_subtitle:
          id: field_subtitle
          table: commerce_product__field_subtitle
          field: field_subtitle
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: string
          settings:
            link_to_entity: false
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          plugin_id: field
        nothing:
          id: nothing
          table: views
          field: nothing
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: false
          alter:
            alter_text: true
            text: "<a class=\"fcatalog-product-wrapper\" href=\"{{ view_commerce_product }}\"  title=\"{{ title }} - {{ field_subtitle }}\" data-toggle=\"tooltip\" data-placement=\"bottom\">\r\n\t\r\n\t<div class=\"fcatalog-product-media text-center\">\r\n\t\t{{ field_product_variation_media }}\r\n\t</div>\r\n\t<h2 class=\"fcatalog-product-title text-center\">\r\n\t\t{{ title }}\r\n\t</h2>\r\n\t<h5 class=\"fcatalog-product-subtitle text-center\">{{ field_subtitle }}</h5>\r\n\t<div class=\"fcatalog-product-data text-center\">\r\n\t\t<h5 class=\"fcatalog-product-msrp text-center\">\r\n\t\t\t<label>MSRP:&nbsp;</label><span class=\"fc_msrp\">{{ field_msrp }}</span>\r\n\t\t</h5>\r\n\t\t<h4 class=\"fcatalog-product-price text-center\">\r\n\t\t\t<label>Your Price:&nbsp;</label><span class=\"fc_price\">{{ price__number }}</span>\r\n\t\t</h4>\r\n\t</div>\r\n</a>"
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: false
          plugin_id: custom
    cache_metadata:
      max-age: -1
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - url.query_args
        - user.roles
      tags:
        - 'config:field.storage.commerce_product.field_msrp'
        - 'config:field.storage.commerce_product.field_subtitle'
        - 'config:field.storage.commerce_product_variation.field_product_variation_media'
  block_2:
    display_plugin: block
    id: block_2
    display_title: 'Not Logged In'
    position: 1
    display_options:
      display_extenders: {  }
      display_description: ''
      block_description: 'Party Speakers - Not Logged In'
      fields:
        title:
          id: title
          table: commerce_product_field_data
          field: title
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: string
          settings:
            link_to_entity: false
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          entity_type: null
          entity_field: title
          plugin_id: field
        view_commerce_product:
          id: view_commerce_product
          table: commerce_product
          field: view_commerce_product
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          text: view
          output_url_as_text: true
          absolute: false
          entity_type: commerce_product
          plugin_id: entity_link
        field_msrp:
          id: field_msrp
          table: commerce_product__field_msrp
          field: field_msrp
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: number
          type: commerce_price_calculated
          settings:
            strip_trailing_zeroes: false
            currency_display: symbol
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          plugin_id: field
        price__number:
          id: price__number
          table: commerce_product_variation_field_data
          field: price__number
          relationship: variations
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: number
          type: commerce_price_calculated
          settings:
            strip_trailing_zeroes: false
            currency_display: symbol
            adjustment_types:
              fee: fee
              promotion: promotion
              tax: '0'
              shipping: '0'
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          entity_type: commerce_product_variation
          entity_field: price
          plugin_id: field
        field_product_variation_media:
          id: field_product_variation_media
          table: commerce_product_variation__field_product_variation_media
          field: field_product_variation_media
          relationship: variations
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: target_id
          type: entity_reference_entity_view
          settings:
            view_mode: variation_image_catalog_mode
          group_column: target_id
          group_columns: {  }
          group_rows: true
          delta_limit: 1
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ''
          field_api_classes: false
          plugin_id: field
        field_subtitle:
          id: field_subtitle
          table: commerce_product__field_subtitle
          field: field_subtitle
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: string
          settings:
            link_to_entity: false
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          plugin_id: field
        nothing:
          id: nothing
          table: views
          field: nothing
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: false
          alter:
            alter_text: true
            text: "<a class=\"fcatalog-product-wrapper\" href=\"{{ view_commerce_product }}\"  title=\"{{ title }} - {{ field_subtitle }}\" data-toggle=\"tooltip\" data-placement=\"bottom\">\r\n\t\r\n\t<div class=\"fcatalog-product-media text-center\">\r\n\t\t{{ field_product_variation_media }}\r\n\t</div>\r\n\t<h2 class=\"fcatalog-product-title text-center\">\r\n\t\t{{ title }}\r\n\t</h2>\r\n\t<h5 class=\"fcatalog-product-subtitle text-center\">{{ field_subtitle }}</h5>\r\n\t<div class=\"fcatalog-product-data text-center\">\r\n\t\t<h4 class=\"fcatalog-product-price text-center\">\r\n\t\t\t<span class=\"fc_price\">Please Log In To View Prices</span>\r\n\t\t</h4>\r\n\t</div>\r\n</a>"
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: false
          plugin_id: custom
      defaults:
        fields: false
    cache_metadata:
      max-age: -1
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - url.query_args
      tags:
        - 'config:field.storage.commerce_product.field_msrp'
        - 'config:field.storage.commerce_product.field_subtitle'
        - 'config:field.storage.commerce_product_variation.field_product_variation_media'
Gode.Agarunov’s picture

StatusFileSize
new80.27 KB

Here is a screenshot of the what the configuration actually looks like on views config:

Gode.Agarunov’s picture

After doing some more digging, I believe the issue may be related to this:

Views does not add relationship data for entity_reference fields not defined in configuration and are multiple

I know it's old, and I know next to nothing about how views works internally, but it seems like views doesn't play nice with entity reference fields when they are defined in class rather than as a separate configuration, just figured it might help.

I did a stupid and updated on the live website originally, I have daily backups and am considering rolling back, but I would like to avoid if it at all possible because I did a lot of other stuff yesterday, too. Going to try the patch as it reportedly still applies to 8.7 and see if that makes it any better.

Edit:
Didn't appear to help.

bojanz’s picture

I am not sure that issue is up to date, because relationships do work, I was able to create a product view, add a variation relationship, add a filter (on a "size" attribute), add a field (the SKU). The only thing I'm missing is the "delta" thingie.

Gode.Agarunov’s picture

@bojanz

Glad that you were able to reproduce the issue, and it's not just me or quirk of my configuration/install.

If there's anything else I can do to help please let me know, I'm going to hold off on rolling back to a backup as the issue is cosmetic in nature and we'll deal with having 15 of every product for now, and hopefully it gets sorted soon, as the variation delta is the only way I know of (and I believe is referenced in the documentation) to trim product views with a variation relationship. I suppose in the worst case I could remove the relationship for now, but then I can't pull in the prices/images that are on the variation entity.

Just wanted to say thank you for all the help, this is the 4th or 5th issue I've had to create in the span of this project and you've always responded and helped quickly even though you have no obligation to do so, and I really appreciate that.

Gode.Agarunov’s picture

I've done a bit more investigating, it seems that in practice the only time a delta option appears under filter, is also when the add relationship screen shows the relationship as "X referenced from field_X", if I add such a relationship, I can filter by delta. IIRC the variation relationship used to be displayed as "Product Variation referenced from field_variation_id" or something similar, while after the latest update, the relationship is just displayed as "Product Variation" (I'm assuming all of this applies to store as well, but the likelihood of someone needing to trim on store delta is much smaller).

In the mean time, I believe I can fix it by adding a bool field to variations called first variation, and then going through all the products and setting the first variation to "true", and then adding a filter in views for first variation = true. I'm not exactly thrilled about doing so though, as we have hundreds of products and a dozen views, but as of right now that's the simplest way. Perhaps I can just create the field and then write a hook to set the first variation to true when views loads the variations, so that I don't have to edit every product or write a script to do it for me. Otherwise I'm drawing a blank.

Gode.Agarunov’s picture

Have some more info from playing around:

I created module_field_views_data_alter() and spent more time looking at kint than I would have preferred to in an entire life time (I ended up going directly to the views module and throwing a bunch of kints in there too, but the field doesn't come up), pretty much every field came up, but none of the fields that are defined by basefielddefinition, things like commerce product body, taxonomy, etc. all came up though.

I did some more googling, and I'm pretty sure that this is the issue right here:
Allow @FieldType to customize views data

I haven't really looked through the thread, but I noticed several patches that I will look through and attempt to try, will report if I have any luck.

andyd328’s picture

I had a similar this problem on a view in the new -dev

Notice: Undefined index: base in Drupal\views\Plugin\views\query\QueryPluginBase->getEntityTableInfo() (line 292 of [..]/web/core/modules/views/src/Plugin/views/query/QueryPluginBase.php)

The view in question is a catalog using db search api that had two broken relationships:

  • Variations: Product variation
  • (Variations: Product variation) Product: Product

Please let me know if a paste of the view yaml would help.

It was fixed in my case by removing the
(Variations: Product variation) Product: Product relationship and then adding it again.

bojanz’s picture

@Gode.Agarunov
ETA for a fix is monday, I was able to track down the problem.

@AndyD328
Please do post your view, I guess our update function doesn't yet cover all cases.

Gode.Agarunov’s picture

@bojanz

That's great, thanks!

As far as search view, I had the same problem with my search API based view, where I had to delete the relationship and recreate it, because the fields related to the relationship had broken. Interestingly, in the search view the relationship was listed as "product variation referenced from product variation" instead of just "product variation".

I believe you could reproduce the problem by making a view around "index X" instead of "products", but if you can't reproduce it, it may because the fields were indexed and the index was created before the update. Perhaps create the index and the view before running the latest dev update, and then run the update and you should definitely be able to reproduce it then. I have unfortunately fixed the search view already so I can't give you the yaml now, but if both Andy and I had the same problem I assume it should be pretty easy to reproduce.

lisastreeter’s picture

StatusFileSize
new26.1 KB

I have a patch that incorporates work done in the Commerce Reports module to fix views integration there. Unfortunately, I don't think it's completely working here. In particular, starting at line 585 of commerce.views.inc, the "delta" column for variations should get exposed as a filter option. That's not happening and I think that's what @Gode.Agarunov needs to get his view working again. I'll try to work on this some more tomorrow, but just wanted to get this posted as a start for now.

andyd328’s picture

Thanks @bojanz & @lisastreeter. Failed View below
=======

uuid: 2f93a7cd-5990-467a-bfe8-14b3f7a09749
langcode: en
status: true
dependencies:
  config:
    - search_api.index.db_search_index
    - system.menu.main
  module:
    - commerce_product
    - search_api
id: product_catalogue
label: 'Product Catalogue'
module: views
description: ''
tag: ''
base_table: search_api_index_db_search_index
base_field: search_api_id
core: 8.x
display:
  default:
    display_plugin: default
    id: default
    display_title: Master
    position: 0
    display_options:
      access:
        type: none
        options: {  }
      cache:
        type: tag
        options: {  }
      query:
        type: views_query
        options:
          bypass_access: false
          skip_access: false
      exposed_form:
        type: basic
        options:
          submit_button: Apply
          reset_button: false
          reset_button_label: Reset
          exposed_sorts_label: 'Sort by'
          expose_sort_order: true
          sort_asc_label: Asc
          sort_desc_label: Desc
      pager:
        type: none
        options:
          items_per_page: null
          offset: 0
      style:
        type: default
        options:
          grouping: {  }
          row_class: ''
          default_row_class: true
      row:
        type: fields
        options:
          default_field_elements: false
          inline: {  }
          separator: ''
          hide_empty: false
      fields:
        product_id_1:
          id: product_id_1
          table: search_api_entity_commerce_product_variation
          field: product_id
          relationship: variations
          group_type: group
          admin_label: ''
          label: ''
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: target_id
          type: entity_reference_entity_view
          settings:
            view_mode: product_listing_create_your_own
          group_column: target_id
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
          field_rendering: true
          fallback_handler: search_api_entity
          fallback_options:
            link_to_item: false
            use_highlighting: false
            multi_type: separator
            multi_separator: ', '
            display_methods:
              default:
                display_method: label
                view_mode: default
          entity_type: commerce_product_variation
          plugin_id: search_api_field
      filters: {  }
      sorts:
        title:
          id: title
          table: search_api_index_db_search_index
          field: title
          relationship: none
          group_type: group
          admin_label: ''
          order: ASC
          exposed: false
          expose:
            label: ''
          plugin_id: search_api
      title: 'Product Catalogue'
      header: {  }
      footer: {  }
      empty: {  }
      relationships:
        variations:
          id: variations
          table: search_api_datasource_db_search_index_entity_commerce_product
          field: variations
          relationship: none
          group_type: group
          admin_label: 'Variations: Product variation'
          required: false
          skip_access: false
          entity_type: commerce_product
          plugin_id: search_api
        product_id:
          id: product_id
          table: search_api_entity_commerce_product_variation
          field: product_id
          relationship: variations
          group_type: group
          admin_label: 'Product: Product'
          required: false
          skip_access: false
          entity_type: commerce_product_variation
          plugin_id: search_api
      arguments: {  }
      display_extenders: {  }
      use_ajax: true
    cache_metadata:
      max-age: -1
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
      tags: {  }
  page_1:
    display_plugin: page
    id: page_1
    display_title: Page
    position: 1
    display_options:
      display_extenders: {  }
      path: products
      menu:
        type: normal
        title: All
        menu_name: main
        weight: -45
        description: ''
        parent: ''
        expanded: false
        enabled: true
      cache:
        type: none
      defaults:
        cache: false
      exposed_block: true
    cache_metadata:
      max-age: -1
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
      tags: {  }
Gode.Agarunov’s picture

@lisastreeter

thanks for the help, I had tried to do something very similar to what is being done in the patch to trace it down, I didn't go nearly as far because in my own module, views wouldn't call the hook because the entity didn't belong to my module (apparently, this is something I read while researching so don't quote me on it, but when it calls the hook alter it only does it for the module the entity belongs to, which doesn't make much sense reading it back), I tried it inside the commerce_views_data_alter() and just put a kint on $data and pretty much every single field in the system came up except variation and store, so in my experience it seems like it's not even calling views_data_alter() with the product variation entity data. Not a clue as to why.

I made a bool on the variations and filtered the views by that, it's actually not the worst thing because it allows us to feature multiple variations out of the same product in the catalog as desired, so it's not critical it gets fixed anytime soon for me or anything, but I do believe it is important to fix before the dev branch gets merged in, as it can't be just me using deltas to filter variation views.

bojanz’s picture

The fix took longer than expected cause I ran into all kinds of Views bugs.
Opened #3097582: [meta] Rework the Commerce base field views integration to track the whole effort. Re-added the delta field in #3097586: Multivalue base fields are missing the "delta" views field.

@Gode.Agarunov
Please test the next -dev and confirm that the delta field now works as previously.
If you encounter any problems, post them to #3097586: Multivalue base fields are missing the "delta" views field.

I am going to keep this issue open for investigating upgrade path issues (based on the view in #16).

Gode.Agarunov’s picture

@bojanz latest dev brought the delta filter back, everything works as expected, thanks!

bojanz’s picture

Title: Product views broke with latest dev update » The product/order views update functions should not cover Search API views

I found what the problem is with the view in #16.

Our update function tries to fix all views, even Search API ones, even though the Search API ones don't need fixing, so they get broken in process. The solution is to make the update functions more conservative.

bojanz’s picture

Status: Active » Needs review
StatusFileSize
new1.51 KB

Here's a proposal.

  • bojanz committed 37955c3 on 8.x-2.x
    Issue #3095829 by bojanz, Gode.Agarunov, AndyD328: The product/order...
bojanz’s picture

Status: Needs review » Fixed
andyd328’s picture

Thanks @bojanz, I just tested it, and by the time I'd put in the patch in composer and pulled down the latest dev you'd already committed it and it didn't apply!

Happy to confirm that the view in #16 works. Thank you for your time & effort.

Status: Fixed » Closed (fixed)

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

drupalfan2’s picture

I have a similar problem, but I am not sure if it is the same:

Missing/broken relationship handler in commerce_cart_form after upgrading to Drupal 9
https://www.drupal.org/project/commerce/issues/3258214

How can I solve it?