- First commit to issue fork.
Hi Everyone,
I am using Group 8.x-1.0-rc2 with Drupal 8.7.1 and it works great apart from one issue with creating a view to display on a node which is a member of a group which in turn displays other nodes that are also members of the same group.
Now I can create a view which is of 'Group Content' which when viewing the group displays other nodes from that group, but when you click to view a node the view is no longer displayed as there is no reference on the node page to which group it is a member of. I have also created a view of 'Content' as outlined in the numerous guides here on the Drupal Group page and incidents list but have the same issue.
I have tried all of the following guides but some seem to use relationships and filters which I dont seem to have available:
https://www.optasy.com/blog/drupal-8-group-module-how-list-related-group...
https://www.drupal.org/project/group/issues/2689663 →
https://www.drupal.org/node/2693847 →
https://www.drupal.org/node/2710795 →
Do I need to add something to the node which has the group relationship so that the view can reference it?
I'm really hoping someone is able to point out where I am going wrong as I'm really stuck at this point. The main, if not only reason I need to create this view is when you view a node from the link on the group page the user does not see any reference to the group that the node is a member of.
These below are the 2 views I have so far which are displaying related group content as blocks but disappear when you view the node
View of Node Content
uuid: 70549093-1c0c-410c-a655-6dd3e44de763
langcode: en
status: true
dependencies:
module:
- group
- node
- user
id: test_content_content
label: 'Test Content Content'
module: views
description: ''
tag: ''
base_table: node_field_data
base_field: nid
core: 8.x
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: perm
options:
perm: 'access content'
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: some
options:
items_per_page: 50
offset: 0
style:
type: default
row:
type: fields
fields:
title:
id: title
table: node_field_data
field: title
entity_type: node
entity_field: title
label: ''
alter:
alter_text: false
make_link: false
absolute: false
trim: false
word_boundary: false
ellipsis: false
strip_tags: false
html: false
hide_empty: false
empty_zero: false
settings:
link_to_entity: true
plugin_id: field
relationship: none
group_type: group
admin_label: ''
exclude: 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_alter_empty: true
click_sort_column: value
type: string
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
gid:
id: gid
table: group_content_field_data
field: gid
relationship: group_content
group_type: group
admin_label: ''
label: 'Parent Group'
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_label
settings:
link: true
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
entity_type: group_content
entity_field: gid
plugin_id: field
filters:
status:
value: '1'
table: node_field_data
field: status
plugin_id: boolean
entity_type: node
entity_field: status
id: status
expose:
operator: ''
group: 1
sorts:
created:
id: created
table: node_field_data
field: created
order: DESC
entity_type: node
entity_field: created
plugin_id: date
relationship: none
group_type: group
admin_label: ''
exposed: false
expose:
label: ''
granularity: second
title: 'Test Content Content'
header: { }
footer: { }
empty: { }
relationships:
group_content:
id: group_content
table: node_field_data
field: group_content
relationship: none
group_type: group
admin_label: 'Content group content'
required: true
group_content_plugins:
'group_node:minor_incident': '0'
'group_node:safeguarding_incident': '0'
'group_node:serious_incident': '0'
entity_type: node
plugin_id: group_content_to_entity_reverse
gid:
id: gid
table: group_content_field_data
field: gid
relationship: group_content
group_type: group
admin_label: Group
required: true
entity_type: group_content
entity_field: gid
plugin_id: standard
arguments:
gid:
id: gid
table: group_content_field_data
field: gid
relationship: group_content
group_type: group
admin_label: ''
default_action: default
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: group_id_from_url
default_argument_options: { }
default_argument_skip_url: false
summary_options:
base_path: ''
count: true
items_per_page: 25
override: false
summary:
sort_order: asc
number_of_records: 0
format: default_summary
specify_validation: false
validate:
type: none
fail: 'not found'
validate_options: { }
break_phrase: false
not: false
entity_type: group_content
entity_field: gid
plugin_id: group_id
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- route
- url
- 'user.node_grants:view'
- user.permissions
tags: { }
block_1:
display_plugin: block
id: block_1
display_title: Block
position: 1
display_options:
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- route
- url
- 'user.node_grants:view'
- user.permissions
tags: { }
View of Group Content
uuid: 79c0711f-fe6e-4c96-9692-d77446e37a3e
langcode: en
status: true
dependencies:
config:
- group.content_type.group_content_type_622783567a7ca
- group.content_type.group_content_type_ba09dbd234bc3
- group.content_type.pupil-group_node-minor_incident
module:
- group
id: test_group_content
label: 'Test Group Content'
module: views
description: ''
tag: ''
base_table: group_content_field_data
base_field: 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: some
options:
items_per_page: 50
offset: 0
style:
type: default
row:
type: fields
fields:
gid:
id: gid
table: group_content_field_data
field: gid
relationship: none
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_label
settings:
link: true
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
entity_type: group_content
entity_field: gid
plugin_id: field
label:
id: label
table: group_content_field_data
field: label
relationship: none
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: 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
entity_type: null
entity_field: label
plugin_id: field
filters:
type_1:
id: type_1
table: group_content_field_data
field: type
relationship: none
group_type: group
admin_label: ''
operator: in
value:
pupil-group_node-minor_incident: pupil-group_node-minor_incident
group_content_type_ba09dbd234bc3: group_content_type_ba09dbd234bc3
group_content_type_622783567a7ca: group_content_type_622783567a7ca
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
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: group_content
entity_field: type
plugin_id: bundle
sorts: { }
title: 'Test Group Content'
header: { }
footer: { }
empty: { }
relationships:
gid:
id: gid
table: group_content_field_data
field: gid
relationship: none
group_type: group
admin_label: Group
required: true
entity_type: group_content
entity_field: gid
plugin_id: standard
arguments:
id:
id: id
table: groups_field_data
field: id
relationship: gid
group_type: group
admin_label: ''
default_action: default
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: group_id_from_url
default_argument_options: { }
default_argument_skip_url: false
summary_options:
base_path: ''
count: true
items_per_page: 25
override: false
summary:
sort_order: asc
number_of_records: 0
format: default_summary
specify_validation: false
validate:
type: none
fail: 'not found'
validate_options: { }
break_phrase: false
not: false
entity_type: group
entity_field: id
plugin_id: group_id
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- route
- url
tags: { }
block_1:
display_plugin: block
id: block_1
display_title: Block
position: 1
display_options:
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- route
- url
tags: { }
Active
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.