Views integration (for listing XB pages) broken

Created on 6 March 2025, about 1 month ago

Overview

I did not find XB pages as an option in views. Turns out the XB entity type defines its views_data as Drupal\Core\Entity\EntityViewsData which does not exist. Other entity types have a views data class that derives from Drupal\views\EntityViewsData.

Proposed resolution

Change the views handler. Unfortunately changing it to the real views data base class is still not enough in my testing, but looking at other views data classes, such as Media suggest that it should be enough? The link templates are already provided for viewing and editing XB pages, so they would be exposed to views due to that automatically.

User interface changes

🐛 Bug report
Status

Active

Version

0.0

Component

Page builder

Created by

🇭🇺Hungary Gábor Hojtsy Hungary

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

Merge Requests

Comments & Activities

  • Issue created by @Gábor Hojtsy
  • 🇭🇺Hungary Gábor Hojtsy Hungary

    NOT TRUE, my 5th drush rebuild worked and I created a simple two column table view of pages with Edit links with the one line change MR above.

    uuid: 937af821-a7c8-4779-9130-8f725f57da4e
    langcode: en
    status: true
    dependencies:
      module:
        - experience_builder
    id: pages
    label: Pages
    module: views
    description: ''
    tag: ''
    base_table: xb_page_field_data
    base_field: id
    display:
      default:
        id: default
        display_title: Default
        display_plugin: default
        position: 0
        display_options:
          fields:
            title:
              id: title
              table: xb_page_field_data
              field: title
              relationship: none
              group_type: group
              admin_label: ''
              entity_type: null
              entity_field: title
              plugin_id: field
              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: true
              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: {  }
              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
            edit_xb_page:
              id: edit_xb_page
              table: xb_page
              field: edit_xb_page
              relationship: none
              group_type: group
              admin_label: ''
              entity_type: xb_page
              plugin_id: entity_link_edit
              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
              text: Edit
              output_url_as_text: false
              absolute: false
          pager:
            type: mini
            options:
              offset: 0
              pagination_heading_level: h4
              items_per_page: 10
              total_pages: null
              id: 0
              tags:
                next: ››
                previous: ‹‹
              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
          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
          access:
            type: none
            options: {  }
          cache:
            type: tag
            options: {  }
          empty: {  }
          sorts: {  }
          arguments: {  }
          filters:
            status:
              id: status
              table: xb_page_field_data
              field: status
              entity_type: xb_page
              entity_field: status
              plugin_id: boolean
              value: '1'
              group: 1
              expose:
                operator: ''
          style:
            type: table
            options:
              grouping: {  }
              row_class: ''
              default_row_class: true
              columns:
                title: title
                edit_xb_page: edit_xb_page
              default: '-1'
              info:
                title:
                  sortable: false
                  default_sort_order: asc
                  align: ''
                  separator: ''
                  empty_column: false
                  responsive: ''
                edit_xb_page:
                  sortable: false
                  default_sort_order: asc
                  align: ''
                  separator: ''
                  empty_column: false
                  responsive: ''
              override: true
              sticky: false
              summary: ''
              empty_table: false
              caption: ''
              description: ''
          row:
            type: fields
            options:
              default_field_elements: true
              inline: {  }
              separator: ''
              hide_empty: false
          query:
            type: views_query
            options:
              query_comment: ''
              disable_sql_rewrite: false
              distinct: false
              replica: false
              query_tags: {  }
          relationships: {  }
          header: {  }
          footer: {  }
          display_extenders: {  }
        cache_metadata:
          max-age: -1
          contexts:
            - 'languages:language_content'
            - 'languages:language_interface'
            - url.query_args
          tags: {  }
    
  • 🇭🇺Hungary Gábor Hojtsy Hungary

    More enticing title :P

  • 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺

    Works for me, do we need a test?

  • 🇺🇸United States Kristen Pol Santa Cruz, CA, USA

    Love the clickbait headline 🤣

  • Pipeline finished with Failed
    30 days ago
    Total: 9979s
    #441855
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    I don’t recall spending a single second on this.

    That line dates back to 📌 Create Page entity type Active . Zero comments about it in there. I think that was unintentionally there … 😅

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
  • 🇺🇸United States mglaman WI, USA

    Oversight whoopsies, approved the MR

  • Pipeline finished with Skipped
    30 days ago
    #442033
  • Pipeline finished with Skipped
    30 days ago
    #442034
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    First clickbait commit, congrats Gábor 🤣

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

Production build 0.71.5 2024