I have two content types (ContentA, ContentB) which both use the same paragraph (MyParagraph) as field type “Entity reference revisions.”
MyParagraph consists of two “List (text)” fields: ParagraphFieldA, ParagraphFieldB.
The values for ParagraphFieldA and ParagraphFieldB come in both cases from allowed values lists which have a key and label.
ContentA is limited to one MyParagraph reference but ContentB can have multiple MyParagraph references.
I have been trying to set up a Views Block that will be shown with any ContentA node. I want it to list titles of all ContentB nodes that have the same ParagraphFieldA value as the ContentA node.
I have a Views Block with Fields: Content: Title
; and Filter Criteria: Content: Content type (=ContentB)
.
It has relationships to Paragraph referenced from MyParagraph
and Content using MyParagraph
.
I have added a contextual filter to (MyParagraph: Paragraph) Paragraph: ParagraphFieldA
with “Content ID from URL” selected under “Provide default value.” I expected this to filter on the ParagraphFieldA value from the displayed ContentA node, but no results are returned.
If I put a key value from ParagraphFieldA in the preview box, I get a list of the relevant ContentB titles, but the view is not getting this automatically from the URL.
I have searched high and low for a solution and have tried various permutations without success. Clearly I am making a basic mistake here but I can’t see what it is.
Can anyone help?