Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 1.0.x
  • 1.0.0
  • 1.0.0-alpha1
  • 1.0.0-alpha2
  • 1.0.1
5 results

Target

Select target project
  • project/viewsreference_extras
  • issue/viewsreference_extras-3460863
  • issue/viewsreference_extras-3460887
  • issue/viewsreference_extras-3472228
4 results
Select Git revision
  • 1.0.x
  • 3460887-add-readme
  • 1.0.0-alpha1
3 results
Show changes
Commits on Source (3)
Showing
with 435 additions and 6 deletions
Views Reference Extras
# Views Reference Extras
This module is for more contributed features extending
[Views Reference Field](https://www.drupal.org/project/viewsreference) allowing that module
to be focused on the core functionality and be kept simple.
## Features
For now this module has only one feature:
1. **Handling complex Views Reference field configurations**
Views Reference Field configurations that have many options - like control of which options are shown in a long list
of terms - can result in 414 errors. Install this module to extend the compression provided in #3396530: Views
reference results in 414 if many options set and ajax used to reload the settings from the entity rather than passing
all settings in the query string.
## Post-Installation
No change is needed. The module automatically enables the above feature. If multiple features are eventually added, an
interface for opting in to features will be set up and an upgrade hook to maintain the status quo will be in place (ie,
this first feature will remain enabled on new sites). If you are still seeing this message, you do not need to take any
action other than enabling the module.
## Supporting organizations:
[Soapbox](https://designbysoapbox.com/) - Original development and maintenance.
\ No newline at end of file
......@@ -11,7 +11,7 @@
"source": "https://git.drupalcode.org/project/viewsreference_extras"
},
"require": {
"drupal/viewsreference": "2.x-dev"
"drupal/viewsreference": "2.x-dev|^2.0@beta|^2.0@RC|^2.0"
},
"require-dev": {
"drupal/views_ajax_history": "1.x-dev"
......
langcode: en
status: true
dependencies:
config:
- node.type.test_ajax_history
id: node.test_ajax_history.promote
field_name: promote
entity_type: node
bundle: test_ajax_history
label: 'Promoted to front page'
description: ''
required: false
translatable: true
default_value:
-
value: 0
default_value_callback: ''
settings:
on_label: 'On'
off_label: 'Off'
field_type: boolean
langcode: en
status: true
dependencies:
config:
- node.type.test_ajax_history
id: node.test_ajax_history.status
field_name: status
entity_type: node
bundle: test_ajax_history
label: Published
description: ''
required: false
translatable: true
default_value:
-
value: 0
default_value_callback: ''
settings:
on_label: 'On'
off_label: 'Off'
field_type: boolean
langcode: en
status: true
dependencies:
config:
- field.field.node.test_ajax_history.field_views_reference_history
- node.type.test_ajax_history
module:
- viewsreference
id: node.test_ajax_history.default
targetEntityType: node
bundle: test_ajax_history
mode: default
content:
field_views_reference_history:
type: viewsreference_select
weight: 121
region: content
settings: { }
third_party_settings: { }
status:
type: boolean_checkbox
weight: 120
region: content
settings:
display_label: true
third_party_settings: { }
title:
type: string_textfield
weight: -5
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
hidden:
created: true
path: true
promote: true
sticky: true
uid: true
langcode: en
status: true
dependencies:
config:
- field.field.node.test_ajax_history.field_views_reference_history
- node.type.test_ajax_history
module:
- user
- viewsreference
id: node.test_ajax_history.default
targetEntityType: node
bundle: test_ajax_history
mode: default
content:
field_views_reference_history:
type: viewsreference_formatter
label: above
settings:
plugin_types:
- block
third_party_settings: { }
weight: 101
region: content
links:
settings: { }
third_party_settings: { }
weight: 100
region: content
hidden: { }
langcode: en
status: false
dependencies:
config:
- core.entity_view_mode.node.teaser
- field.field.node.test_ajax_history.field_views_reference_history
- node.type.test_ajax_history
module:
- user
id: node.test_ajax_history.teaser
targetEntityType: node
bundle: test_ajax_history
mode: teaser
content:
links:
settings: { }
third_party_settings: { }
weight: 100
region: content
hidden:
field_views_reference_history: true
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_views_reference_history
- node.type.test_ajax_history
module:
- viewsreference
id: node.test_ajax_history.field_views_reference_history
field_name: field_views_reference_history
entity_type: node
bundle: test_ajax_history
label: 'Views Reference History'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:view'
handler_settings:
target_bundles: null
auto_create: false
plugin_types:
block: block
preselect_views:
test_views_ajax_history: test_views_ajax_history
enabled_settings: { }
field_type: viewsreference
langcode: en
status: true
dependencies:
module:
- node
- views
- viewsreference
id: node.field_views_reference_history
field_name: field_views_reference_history
entity_type: node
type: viewsreference
settings:
target_type: view
module: viewsreference
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
langcode: en
status: true
name: 'Test Ajax History'
type: test_ajax_history
description: null
help: null
new_revision: false
preview_mode: 0
display_submitted: false
langcode: en
status: true
dependencies:
module:
- node
- user
id: test_views_ajax_history
label: 'Test views ajax history'
module: views
description: ''
tag: ''
base_table: node_field_data
base_field: nid
display:
default:
id: default
display_title: Default
display_plugin: default
position: 0
display_options:
title: 'Test views ajax history'
fields:
title:
id: title
table: node_field_data
field: title
relationship: none
group_type: group
admin_label: ''
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:
link_to_entity: true
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
pager:
type: full
options:
offset: 0
items_per_page: 5
total_pages: null
id: 0
tags:
next: 'Next ›'
previous: ' Previous'
first: '« First'
last: 'Last »'
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
quantity: 9
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: perm
options:
perm: 'access content'
cache:
type: tag
options: { }
empty: { }
sorts:
created:
id: created
table: node_field_data
field: created
relationship: none
group_type: group
admin_label: ''
entity_type: node
entity_field: created
plugin_id: date
order: DESC
expose:
label: ''
field_identifier: ''
exposed: false
granularity: second
arguments: { }
filters:
status:
id: status
table: node_field_data
field: status
entity_type: node
entity_field: status
plugin_id: boolean
value: '1'
group: 1
expose:
operator: ''
style:
type: default
row:
type: fields
query:
type: views_query
options:
query_comment: ''
disable_sql_rewrite: false
distinct: false
replica: false
query_tags: { }
relationships: { }
use_ajax: true
header: { }
footer: { }
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- 'user.node_grants:view'
- user.permissions
tags: { }
block_1:
id: block_1
display_title: Block
display_plugin: block
position: 1
display_options:
display_extenders:
ajax_history:
enable_history: true
exclude_args: ''
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- 'user.node_grants:view'
- user.permissions
tags: { }
name: 'Views Reference Extras Integration With Views Ajax History Test Module'
description: 'This is a copy from the main Views Reference module'
core_version_requirement: ^10.2 || ^11
package: Views
type: module
dependencies:
- drupal:node
- drupal:views
- viewsreference:viewsreference
- viewsreference_extras:viewsreference_extras
- views_ajax_history:views_ajax_history
name: 'Views Reference Extras Test Module'
description: 'Provides sample data to help test the module'
core_version_requirement: ^10 || ^11
core_version_requirement: ^10.2 || ^11
package: Views
type: module
dependencies:
......@@ -8,3 +8,7 @@ dependencies:
- drupal:views
- viewsreference:viewsreference
- viewsreference_extras:viewsreference_extras
test_dependencies:
- views_ajax_history:views_ajax_history
- viewsreference_extras:viewsreference_extras_ajax_history_test
\ No newline at end of file
......@@ -46,7 +46,7 @@ class ViewsReferenceExtrasCompressionReloadTest extends WebDriverTestBase {
'field_ui',
'big_pipe',
'block',
'test_views_reference_ajax_history',
'viewsreference_extras_ajax_history_test',
'viewsreference_extras_test',
];
......@@ -166,6 +166,8 @@ class ViewsReferenceExtrasCompressionReloadTest extends WebDriverTestBase {
'parent_entity_type' => 'node',
'parent_entity_id' => '1',
'parent_field_name' => 'field_views_reference_history',
'parent_revision_id' => '1',
'field_item_delta' => 0,
];
$json = UrlHelper::uncompressQueryParameter($parsed_url['query']['viewsreference']['reload']);
$parameters = Json::decode($json);
......@@ -190,6 +192,8 @@ class ViewsReferenceExtrasCompressionReloadTest extends WebDriverTestBase {
'parent_entity_type' => 'node',
'parent_entity_id' => '1',
'parent_field_name' => 'field_views_reference_history',
'parent_revision_id' => '1',
'field_item_delta' => 0,
];
$view = Views::getView('test_views_ajax_history');
$view->setDisplay('block_1');
......
name: 'Views Reference Extras'
description: 'Provides extra options for the Views Reference Field module.'
core_version_requirement: ^10 || ^11
core_version_requirement: ^10.2 || ^11
package: Views
type: module
......@@ -9,4 +9,4 @@ dependencies:
- viewsreference:viewsreference
test_dependencies:
- views_ajax_history:views_ajax_history
- views_ajax_history:views_ajax_history
\ No newline at end of file