Score:0

How can I make the relation I am using in a view work again?

bo flag

I'm currently migrating from Drupal 7 to Drupal 9, and i'm rebuilding all views (as I can't find a good migration procedure for views from 7 to 9), also trying to understand the changes (this is a side project for a friend, i'm not an expert in Drupal). I'm having difficulties with something I have running on 7. This is the situation on 7:

  • I have a content type named "club" for sports clubs. Amongst other fields, it has the logo
  • I have a content type named "club events". It includes a "club" field wich is an Entity Reference to said field.
  • I have a view for displaying the events with the name and logo of the club. For the logo I created a relation in the view, to pick the image of the logo.

Drupal 7 View working

The results are as expected:

Results, working

After migrating the installation to Drupal 9, all content is there, all clubs have their logo, and all fields are ok. So I try to rebuild the view, but I can't make the relation to work. Here is the config of the relation in 9.4

Building the relation

And the view configuration in 9.4 with said relation for the image

Relation in 9.4

But the results don't show the image. If I set the "Behavior when no results" text to something, that text gets displayed, so it is not getting results out of the relation.

no images loaded

I'm stuck. I've been trying some options, but I can't find what I'm doing wrong. Anyone has any hint?

Score:1
bo flag

I'll post the solution, just in case someone else has the same problem. I was making the relation wrong, it seems. When selecting the field, you have to check on "Content referenced from -the content type-". I was using another one :(

enter image description here

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.