Not sure what I'm doing wrong here, seems pretty straight forward with what I'm suppsed to do, so that's why I think there is a coding error.
I have created a content type with a role reference field. I have created a handful of test pages assigning different roles for each page. The I created a new views block and everything was going smoothly until I tried to create a contextual filter using this role reference field.
I selected "Content: User Roles" and then "Provide default value" and "User Roles IDs from logged in User" assuming that would do the trick. But as soon as I select that, everything in the preview disappears.
Any help would be greatly appreciated. I am not a PHP wizard by any means but I am very comfortable with View and using contextual filters. I have been using Drupal for about 5 years, so I have already checked all of the simple mistakes and now I'm thinking there is something more major going on here.
**Screenshots Included**
| Comment | File | Size | Author |
|---|---|---|---|
| Screen Shot 2014-03-21 at 4.32.53 PM.jpg | 116.27 KB | steven_kropp | |
| Screen Shot 2014-03-21 at 4.48.21 PM.jpg | 141.82 KB | steven_kropp | |
| Screen Shot 2014-03-21 at 4.36.07 PM.jpg | 18.57 KB | steven_kropp | |
| Screen Shot 2014-03-21 at 4.33.12 PM.jpg | 47.61 KB | steven_kropp |
Comments
Comment #1
kumkum29 commentedHello,
I have the same problem, I don't see how to configure the contextual filter of my view with this field.
Have you found a solution?
Thanks for your help.
Comment #2
kumkum29 commentedHello,
I have found a solution with a php code in the contextual filter:
...and select the "allow multiple values".
Comment #3
alex liannoy commentedHi guys,
Default arguments plugin already contains the code from the comment above:
I suppose, we can close the issue.