Trying to build a calendar in Views by using referenced dates from nodes with mutiple value references to a paragraph type holding dates as a contextual filter is not showing any of the saved dates in the Views calendar.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

breadcrumbs created an issue. See original summary.

Anonymous’s picture

Afaik, there has not been any effort towards integrating/testing that particular case. Was this working in the Drupal 7 version of the module?

breadcrumbs’s picture

Yes, I just did a quick test with d7 and it's working.
In d8 I can create a view starting from a template (A calendar view of the 'Datum' field in the 'Paragraph' base table) but nothing shows
Any chance you could have a look?

breadcrumbs’s picture

I think the error lies in the viewsFetchFields function in CalenderHelper.php
Fields are not added because they are limited to nodes
If I disable the check on line 680 then it works
So the check --> if ($base == substr($key, 0, 4)) <-- should be made dynamic and not limited to nodes only

Anonymous’s picture

#4 was my initial thought, but let's take a step back here. I'm not able to select the right fields to create a calendar based on a paragraph with a date field. Can you export your views configuration or take a screenshot, so I'm sure I am trying to reproduce the right thing.

breadcrumbs’s picture

Here's a screenshot of the view. It's best to start from the view template (A calendar view of the 'Datum' field in the 'Paragraph' base table), it's the only way to get it working.

Relationship you see is not needed, that's because I want the title from the node that is referencing the paragraph entity. This is also something that isn't working yet, but not sure if this is a paragraphs, views or calendar bug. Works in d7 by just adding the relationship.

Anonymous’s picture

Issue tags: +SprintWeekend2016

Hmm. I'm still not able to reproduce your situation since I keep hitting issues with paragraphs/views/views templates. It's probably somewhat the same as the ones you have for the relationship (which you need for the contextual filter anyway).
Fwiw, I'm on the latest dev version for everything.

nicholas.alipaz’s picture

Looks like I am having this issue as described in #2699477-39: Steps towards handling end dates in Calendar 8.

nicholas.alipaz’s picture

Here is an export of my view:

uuid: 42953875-5980-44e5-a645-aea0917678ab
langcode: en
status: true
dependencies:
  config:
    - field.storage.paragraph.field_date
  module:
    - calendar
    - datetime
    - datetime_range
    - node
    - paragraphs
    - user
id: duplicate_of_calendar
label: 'Duplicate of Calendar'
module: views
description: 'A calendar view of the ''Date'' field in the ''Content'' base table for a contextual Group'
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: none
        options:
          offset: 0
      style:
        type: calendar
        options:
          calendar_type: month
          mini: '0'
          name_size: '3'
          with_weekno: '0'
          max_items: '0'
          max_items_behavior: more
          groupby_times: hour
          groupby_times_custom: null
          theme_style: '1'
          groupby_field: ''
          multiday_theme: '1'
          multiday_hidden: {  }
          granularity_links:
            day: ''
            week: ''
      row:
        type: calendar_row
        options:
          colors:
            legend: type
            calendar_colors_type:
              article: '#ffffff'
              page: '#ffffff'
            taxonomy_field: ''
            calendar_colors_vocabulary: {  }
      fields:
        path:
          id: path
          table: node
          field: path
          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
          absolute: false
          entity_type: node
          plugin_id: node_path
        title:
          id: title
          table: node_field_data
          field: title
          relationship: none
          group_type: group
          admin_label: ''
          label: ''
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: true
            path: '{{ path }}'
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ng-lightbox
            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: node
          entity_field: created
          plugin_id: field
        field_date:
          id: field_date
          table: paragraph__field_date
          field: field_date
          relationship: field_content
          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: daterange_custom
          settings:
            timezone_override: America/Los_Angeles
            date_format: 'Y-m-d\TH:i:sP'
            separator: '-'
          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
      filters:
        status:
          id: status
          table: node_field_data
          field: status
          relationship: none
          group_type: group
          admin_label: ''
          operator: '='
          value: '1'
          group: 1
          exposed: false
          expose:
            operator_id: ''
            label: ''
            description: ''
            use_operator: false
            operator: ''
            identifier: ''
            required: false
            remember: false
            multiple: false
            remember_roles:
              authenticated: authenticated
          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: boolean
          entity_type: node
          entity_field: status
      sorts: {  }
      header: {  }
      footer: {  }
      empty: {  }
      relationships:
        field_content:
          id: field_content
          table: node__field_content
          field: field_content
          relationship: none
          group_type: group
          admin_label: 'field_content: Paragraph'
          required: false
          plugin_id: standard
      arguments:
        field_date_value_year_month:
          id: field_date_value_year_month
          table: paragraph__field_date
          field: field_date_value_year_month
          relationship: field_content
          group_type: group
          admin_label: ''
          default_action: default
          exception:
            value: all
            title_enable: false
            title: All
          title_enable: false
          title: ''
          default_argument_type: date
          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: {  }
          plugin_id: datetime_year_month
      display_extenders: {  }
      use_ajax: true
      title: 'Global Calendar'
    cache_metadata:
      max-age: 0
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - url
        - 'user.node_grants:view'
        - user.permissions
      tags:
        - 'config:field.storage.paragraph.field_date'
  page_1:
    display_plugin: page
    id: page_1
    display_title: 'Page 2'
    position: 2
    display_options:
      display_extenders: {  }
      path: ocalendar
      defaults:
        style: true
        row: true
        arguments: true
        fields: true
    cache_metadata:
      max-age: 0
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - url
        - 'user.node_grants:view'
        - user.permissions
      tags:
        - 'config:field.storage.paragraph.field_date'

scotthorn’s picture

#4 is indeed part of the problem, it will filter to only fields on the base table no matter if the substr part is fixed to be the length of $base.

There's also an issue in src/Plugin/views/row/Calendar.php around line 440. The code currently does $entity->get($field_name) without checking if the field exists, which throws a 500 error if it's from a relationship. I was able to get it to mostly work by changing it to this:

      $entities = array_merge(array('entity' => $entity), $row->_relationship_entities);

      // @todo implement timezone support
      foreach ($entities as $label => $ent) {
        if ($ent->hasField($field_name)) {
          $item = $ent->get($field_name)->getValue();
          // @todo handle timezones
//        $db_tz   = date_get_timezone_db($tz_handling, isset($item->$tz_field) ? $item->$tz_field : timezone_name_get($dateInfo->getTimezone()));
//        $to_zone = date_get_timezone($tz_handling, isset($item->$tz_field) ? $item->$tz_field : timezone_name_get($dateInfo->getTimezone()));
//        $item_start_date = new dateObject($item, $db_tz);
          $item_start_date = new \DateTime($item[0]['value']);

          if (!empty($item[0]['end_value'])) {
            $item_end_date = new \DateTime($item[0]['end_value']);
          }
          else {
            $item_end_date = $item_start_date;
          }
          $entity->date_id = array('calendar.' . $id . '.' . $field_name . '.0');
        }
      }

I'm still getting a few noticed, but the calendar seems to be working with the correct rows returned. I removed the check from #4, which isn't ideal, probably need to know which bases to test against.

othermachines’s picture

FileSize
735 bytes

I put the fix suggested in #4 into a patch. It removes the substring check altogether as suggested by @breadcrumbs (thx!). Checking if what is appended to $key matches $base is sufficient if your base table is, say, 'paragraph' (like mine is), but obviously that doesn't solve the problem of having a relationship with a different type.

Edit: No longer using this: This no doubt needs more investigation but for now this (along with patch in #2859127-2: Undefined property the query name on row) gets things working for me.

chrotto’s picture

I just installed Paragraph module and hoped to use a paragraph field referencing to a type with a date field.This is still not working (using Drupal 8.4.2).
Is it any solution in sight? Or is this perhaps an issue for paragrath module?

othermachines’s picture

@chrotto:

I'm using a Paragraphs relationship with a patched-up version of Calendar in 8.3 (includes patch in #11). What does your view config look like?

chrotto’s picture

I am using the latest version of Drupal (8.4.2), Paragraph (8.x.1.2) and calendar (8.x-1.x-dev).
My view configuration:
uuid: 733fd314-39cf-4b7a-9b39-2afa166af618
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_beskrivning
- field.storage.node.field_projektnamn
- field.storage.paragraph.field_deadline
module:
- calendar
- datetime
- node
- paragraphs
- user
id: deadlines_via_paragraph
label: 'Deadlines via Paragraph'
module: views
description: 'A calendar view of the ''Deadline'' field in the ''Paragraph'' base table'
tag: ''
base_table: paragraphs_item_field_data
base_field: id
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: calendar
options:
pager_placement: top
style:
type: calendar
options:
calendar_type: month
mini: '0'
name_size: '3'
with_weekno: '0'
max_items: '0'
max_items_behavior: more
groupby_times: hour
groupby_times_custom: null
theme_style: '1'
groupby_field: ''
multiday_theme: '1'
multiday_hidden: { }
row:
type: calendar_row
options:
colors:
legend: type
calendar_colors_type:
projekt: '#ffffff'
article: '#ffffff'
helgdag: '#ffffff'
page: '#ffffff'
projektrapport: '#ffffff'
fields:
field_deadline:
id: field_deadline
table: paragraph__field_deadline
field: field_deadline
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: datetime_default
settings:
timezone_override: Europe/Stockholm
format_type: medium
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
field_beskrivning:
id: field_beskrivning
table: node__field_beskrivning
field: field_beskrivning
relationship: reverse__node__field_deadlines
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: basic_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
plugin_id: field
field_projektnamn:
id: field_projektnamn
table: node__field_projektnamn
field: field_projektnamn
relationship: reverse__node__field_deadlines
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: 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
filters:
status:
value: '1'
table: paragraphs_item_field_data
field: status
plugin_id: boolean
entity_type: paragraph
entity_field: status
id: status
expose:
operator: ''
group: 1
sorts:
field_deadline_value:
id: field_deadline_value
table: paragraph__field_deadline
field: field_deadline_value
relationship: none
group_type: group
admin_label: ''
order: ASC
exposed: false
expose:
label: ''
granularity: second
plugin_id: datetime
header: { }
footer: { }
empty: { }
relationships:
reverse__node__field_deadlines:
id: reverse__node__field_deadlines
table: paragraphs_item_field_data
field: reverse__node__field_deadlines
relationship: none
group_type: group
admin_label: field_deadlines
required: true
entity_type: paragraph
plugin_id: entity_reverse
arguments: { }
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- user.permissions
tags:
- 'config:field.storage.node.field_beskrivning'
- 'config:field.storage.node.field_projektnamn'
- 'config:field.storage.paragraph.field_deadline'
page_day:
display_plugin: page
id: page_day
display_title: Day
position: 3
display_options:
display_extenders: { }
display_description: ''
style:
type: calendar
options:
calendar_type: day
mini: '0'
name_size: '3'
with_weekno: '0'
max_items: '0'
max_items_behavior: more
groupby_times: hour
groupby_times_custom: null
theme_style: '1'
groupby_field: ''
multiday_theme: '1'
multiday_hidden: { }
defaults:
style: false
row: false
arguments: false
header: false
row:
type: calendar_row
options:
colors:
legend: type
calendar_colors_type:
article: '#ffffff'
page: '#ffffff'
taxonomy_field: ''
calendar_colors_vocabulary: { }
path: calendar-paragraph-field_deadline/day
menu:
type: tab
title: Day
description: ''
expanded: false
parent: ''
weight: 0
context: '0'
menu_name: main
arguments:
field_deadline_value_full_date:
id: field_deadline_value_full_date
table: paragraph__field_deadline
field: field_deadline_value_full_date
relationship: none
group_type: group
admin_label: ''
default_action: default
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: date
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: true
validate:
type: calendar
fail: 'not found'
validate_options:
replacement_format: 'l, F j, Y'
plugin_id: datetime_full_date
header:
calendar_header:
id: calendar_header
table: views
field: calendar_header
relationship: none
group_type: group
admin_label: ''
empty: true
tokenize: 1
content: '{{ arguments.field_deadline_value_full_date }}'
pager_embed: 0
plugin_id: calendar_header
calendar_header_1:
id: calendar_header_1
table: views
field: calendar_header
relationship: none
group_type: group
admin_label: 'Calendar Pager'
empty: true
tokenize: 1
content: ''
pager_embed: 1
plugin_id: calendar_header
cache_metadata:
max-age: 0
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- user.permissions
tags:
- 'config:field.storage.node.field_beskrivning'
- 'config:field.storage.node.field_projektnamn'
- 'config:field.storage.paragraph.field_deadline'
page_month:
display_plugin: page
id: page_month
display_title: Month
position: 1
display_options:
display_extenders: { }
path: calendar-paragraph-field_deadline/month
display_description: ''
menu:
type: tab
title: Month
description: ''
expanded: false
parent: ''
weight: 0
context: '0'
menu_name: main
tab_options:
type: normal
title: Calendar
description: ''
weight: 0
arguments:
field_deadline_value_year_month:
id: field_deadline_value_year_month
table: paragraph__field_deadline
field: field_deadline_value_year_month
relationship: none
group_type: group
admin_label: ''
default_action: default
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: date
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: true
validate:
type: calendar
fail: 'not found'
validate_options:
replacement_format: 'F Y'
plugin_id: datetime_year_month
header:
calendar_header:
id: calendar_header
table: views
field: calendar_header
relationship: none
group_type: group
admin_label: ''
empty: true
tokenize: 1
content: '{{ arguments.field_deadline_value_year_month }}'
pager_embed: 0
plugin_id: calendar_header
calendar_header_1:
id: calendar_header_1
table: views
field: calendar_header
relationship: none
group_type: group
admin_label: 'Calendar Pager'
empty: true
tokenize: 1
content: ''
pager_embed: 1
plugin_id: calendar_header
defaults:
arguments: false
header: false
cache_metadata:
max-age: 0
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- user.permissions
tags:
- 'config:field.storage.node.field_beskrivning'
- 'config:field.storage.node.field_projektnamn'
- 'config:field.storage.paragraph.field_deadline'
page_week:
display_plugin: page
id: page_week
display_title: Week
position: 2
display_options:
display_extenders: { }
display_description: ''
style:
type: calendar
options:
calendar_type: week
mini: '0'
name_size: '3'
with_weekno: '0'
max_items: '0'
max_items_behavior: more
groupby_times: hour
groupby_times_custom: null
theme_style: '1'
groupby_field: ''
multiday_theme: '1'
multiday_hidden: { }
defaults:
style: false
row: false
arguments: false
header: false
row:
type: calendar_row
options:
colors:
legend: type
calendar_colors_type:
article: '#ffffff'
page: '#ffffff'
taxonomy_field: ''
calendar_colors_vocabulary: { }
path: calendar-paragraph-field_deadline/week
menu:
type: tab
title: Week
description: ''
expanded: false
parent: ''
weight: 0
context: '0'
menu_name: main
arguments:
field_deadline_value_year_week:
id: field_deadline_value_year_week
table: paragraph__field_deadline
field: field_deadline_value_year_week
relationship: none
group_type: group
admin_label: ''
default_action: default
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: date
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: true
validate:
type: calendar
fail: 'not found'
validate_options:
replacement_format: 'F j, Y'
plugin_id: datetime_year_week
header:
calendar_header:
id: calendar_header
table: views
field: calendar_header
relationship: none
group_type: group
admin_label: ''
empty: true
tokenize: 1
content: 'Week of {{ arguments.field_deadline_value_year_week }}'
pager_embed: 0
plugin_id: calendar_header
calendar_header_1:
id: calendar_header_1
table: views
field: calendar_header
relationship: none
group_type: group
admin_label: 'Calendar Pager'
empty: true
tokenize: 1
content: ''
pager_embed: 1
plugin_id: calendar_header
cache_metadata:
max-age: 0
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- user.permissions
tags:
- 'config:field.storage.node.field_beskrivning'
- 'config:field.storage.node.field_projektnamn'
- 'config:field.storage.paragraph.field_deadline'
page_year:
display_plugin: page
id: page_year
display_title: Year
position: 4
display_options:
display_extenders: { }
display_description: ''
style:
type: calendar
options:
calendar_type: year
mini: '0'
name_size: '3'
with_weekno: '0'
max_items: '0'
max_items_behavior: more
groupby_times: hour
groupby_times_custom: null
theme_style: '1'
groupby_field: ''
multiday_theme: '1'
multiday_hidden: { }
defaults:
style: false
row: false
arguments: false
header: false
row:
type: calendar_row
options:
colors:
legend: type
calendar_colors_type:
article: '#ffffff'
page: '#ffffff'
taxonomy_field: ''
calendar_colors_vocabulary: { }
arguments:
field_deadline_value_year:
id: field_deadline_value_year
table: paragraph__field_deadline
field: field_deadline_value_year
relationship: none
group_type: group
admin_label: ''
default_action: default
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: date
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: true
validate:
type: calendar
fail: 'not found'
validate_options:
replacement_format: 'Y'
plugin_id: datetime_year
header:
calendar_header:
id: calendar_header
table: views
field: calendar_header
relationship: none
group_type: group
admin_label: ''
empty: true
tokenize: 1
content: '{{ arguments.field_deadline_value_year }}'
pager_embed: 0
plugin_id: calendar_header
calendar_header_1:
id: calendar_header_1
table: views
field: calendar_header
relationship: none
group_type: group
admin_label: 'Calendar Pager'
empty: true
tokenize: 1
content: ''
pager_embed: 1
plugin_id: calendar_header
path: calendar-paragraph-field_deadline/year
menu:
type: tab
title: Year
description: ''
expanded: false
parent: ''
weight: 0
context: '0'
menu_name: main
cache_metadata:
max-age: 0
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- user.permissions
tags:
- 'config:field.storage.node.field_beskrivning'
- 'config:field.storage.node.field_projektnamn'
- 'config:field.storage.paragraph.field_deadline'

chrotto’s picture

FileSize
127.64 KB

@othermachines
I am using Drupal 8.4.2 and I think my Calendar version have the patch in #11.
My view UI looks like this:
Calendar

othermachines’s picture

@chrotto - Sorry for the delay, it's a busy time.

It looks like you might not be pointing to your relationship (reverse__node__field_deadlines) in your contextual filter, nor the sort criteria, although it's hard to be sure. Unfortunately it's hard to make sense of your configuration since all formatting was lost when you pasted it into your comment (better to just attach the yml file). Anyway, I would check that first.

chrotto’s picture

FileSize
17.33 KB

Thank´s for helping.
I attached the config-file.
When trying to add the #11 patch I am getting an error message:
Can't find file to patch at line 5

othermachines’s picture

Looking at your config file it appears you no longer have any relationships set up.

If my suggestions in #16 didn't help, I'd suggest moving your problem to the Drupal help forums.

The patch probably needs a re-roll since there have been a few commits since it was created. I'll have a look at that when I get some free time, hopefully in the next week or so.

chrotto’s picture

The config is the one I get when saving the Paragraph template with date fields (deadline).
When changing this view to Table the fields is visible but not in the calendar view.

dqd’s picture

@nicholas.alipaz and @chrotto: can you PLEASE post your endless configs somewhere else like pastebin or gist and link here to remove this endless clutter and scrolling. This issue is important and needs attention of main contributors.

@nicholas.alipaz: by the way cross linking to your asking for help in another issue is not very helpful here especially with long config spagetti. Your issue is related to where you linked to, not here. So please remove (shorten) your long posts.

... and yes (for those still asking):

It's a bug. - as stated already by @breadcrumbs - Even the views template example using date field of paragraph is not showing any date (tested here with Drupal 8.5.x with latest module devs) and we should consider temporary work arounds because even if the Calendar or Date fields cause issues, Paragraph module itself states on its project page that paragraph was not intended to work as a pathless entity bundle perfectly in ALL circumstances. So be careful by using paragraph as a 100% replacement for the field collections and multiple field values combination or for X rel data sets.

My suggestion for now: Create custom event or date content types and refer them to the other content types you need them on and use something like https://www.drupal.org/project/reverse_entity_reference or https://www.drupal.org/project/cer to make the reference accessable from both sides. Or use date fields with multitple value setting directly on the referring content type. That's it for now, sadly.

dqd’s picture

Title: Nodes with dates added through a relationship not showing » Dates from date_field used in a paragraphs entity not showing in Views calendar
Issue summary: View changes
dqd’s picture

Issue tags: -SprintWeekend2016
BlondeSwan’s picture

Any update on this bug? It still exists, but I cannot apply the patch, it throws an error saying the patch can't be applied.

DuneBL’s picture

I just started to use this module and my first use case was a date field inside a paragraph... and it works without any added patch