PHP 7.1 (XAMPP)
Drupal 8.5.4
Paragraph 8.x-1.3 (same problem also with 8.x-1.2)
Views: Views showing paragraph type, relationship set to content using paragraph

I have a view that shows paragraphs of type paragraph1.
Within the view I show fields of that paragraph type.
I added one relationship "content using field_paragraph1 - Relate each content with a field_paragraph1 set to the paragraph."
Then added a field "(field_paragraph1) content: Title" using this relationship. So I´m excpecting that the title of the content will be shown in the table.

What happened is: Only content titles are shown in the view which were entered with an older version of core (I guess 8.3.X), content that I created with the actual core version are not shown. I played around with relationships but can´t get it to work.

I know that I can create a view vice versa: showing content with a relationship set to the paragraph, still it is confusing and should work.

I seems to me that the relationship works but the way paragraphs are stored has changed. I´m not sure if it is a paragraph issue or a core issue.

:-) Thank you for providing the paragraph module :-)

Comments

ksc created an issue. See original summary.

ksc’s picture

I forgot to write:
I´ve created that view to find "garbage" paragraphs. I don´t see any other possibility because "garbage" paragraphs still have a parent id.

weri’s picture

chrisfromredfin’s picture

I'm seeing this issue as well today. I have looked at the query that views is building and the underlying data structures and it seems like it's joining on the wrong field. A simplified version of the query it's writing is:

SELECT
  *
FROM paragraphs_item_field_data
INNER JOIN node__field_p_event_occurrence
  ON paragraphs_item_field_data.id = node__field_p_event_occurrence.field_p_event_occurrence_target_revision_id;

...the ON clause of that join is bad. I *think* it should be joining

  ON paragraphs_item_field_data.revision_id = node__field_p_event_occurrence.field_p_event_occurrence_target_revision_id

... because I'd think it should join on revision_id, right (those are unique?)?

chrisfromredfin’s picture

chrisfromredfin’s picture

kopeboy’s picture

Version: 8.x-1.3 » 8.x-1.17

This is still active!
After adding the relationship with the paragraph field on the host entity, fields of the parent (using the relationship) are empty in the view!

kopeboy’s picture

Status: Active » Closed (duplicate)

The related issue has more content and even a patch ready.