Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem
The view will generate all results (ignoring the contextual filter).
View settings
- Create a View of Nodes which creates a block display.
- Add the Argument: "Node: NID", configured as follows:
- Action to take if argument is not present: "Provide default argument"
- Default argument type: "Node ID from URL"
- Validator options:
- Validator: Node
- Types (choose one or more, shouldn't matter here)
- Leave "Validate user has access to the node" unchecked
- Access operation to check: View
- Argument type: Node ID
- Action to take if argument does not validate: [Display Empty Text | Hide view / Page not found (404)]
Workaround
The contextual filter appears to ignore the specific content-type setting, UNLESS I define the "Validate user has access to the node" setting.
Possible user error
If the "Action to take if argument does not validate" is set to "Display Empty Text", and no "empty text" is defined, this might be the cause.
Comments
Comment #1
MustangGB CreditAttribution: MustangGB commented