This is the scenario:

There are multiple products (paintings). Each one of these paintings has one author, which is defined with a content type.

There is a reference field form the product to its author.

The view picks the author image in the FIELDS section, a relationship had to be set for this. So far, so good. This displays all author pictures.

The contextual filter

This is where I'm having trouble. I choose ID (that is the product's ID), which is supposed to be in the URL and that way the filter would be applied but it does not.

As a matter of fact, there is no possibility to choose the product's ID as the contextual filter. Edit: The product ID is there, and the the View works now in Views UI, when testing. But it displays the wrong picture in the Product display.

enter image description here enter image description here

And it is because of the URL, Pathauto generates this type of URL:


where 69 is the product ID.

Where does this ?v=79 come from?

If I navigate to the product's admin screen, the link will be correctly displayed on the bottom left part of the browser window, and if I only provide the URL: mysite/product/product_id, the product gets correctly displayed, but the View does not take effect, meaning, it gets displayed, but the right picture has not been filtered out correctly.

Has someone an advice to put me in the right direction.

  • my bad. There is indeed a product ID. The View works now in Views UI, when testing. But it displays the wrong picture in the Product display – Jorge Montoya May 22 at 20:23
  • 1
    Pathauto creates aliases, and views contextual will pull the "original" information. I haven't seen the query with such a parameter, check your Pathauto settings. It's weird that something wrong is shown, usually you don't see anything if there's a problem. Can you post your contextual settings and clarify what you're trying to achieve? If you're placing a Block in a theme region you have to set the contextual option on the Block configuration. – prkos May 23 at 5:02
  • Hi @prkos as always, thank you for your valuable help. I'm helping a colleague with this out, so I'm waiting for his response, in order to delete the Pathauto path for the product types. I also added some images to the question. I'll keep you posted :) – Jorge Montoya May 23 at 15:06
  • What do you mean by "wrong picture"? It's not from the correct author? What are that field settings? – prkos May 24 at 1:02

Have you tried to add the authors as taxonomy and then related said taxonomy terms to the art pieces? Taxonomy terms are fieldable so you can add a bio or view the each page showing the art work.

Adding the authors as users could work, but I wouldn't go that direction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.