Solved

Drupal Roles Reference module not working in Views

Posted on 2010-11-28
7
536 Views
Last Modified: 2012-05-10
I have a content type downloads that, using the Roles Reference module, contains a field for role that allows the admin to assign a role to the download. The plan is to only show downloads that match the role of the logged in user.

In Views I created a download view that uses the role filter provided by the Roles Reference module. I made sure the appropriate fields were included in the view so that the filter would work. It's simply not working.

I don't have a lot of Drupal experience—I usually provide custom built CMS—so this may be a very easy fix. I'm hoping. My client is getting impatient.
0
Comment
Question by:stephenbliss
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 3

Expert Comment

by:RobertPope
ID: 34232511
are you using this view in a block?  are you using arguments to limit the view?  If so are you certain your arguments are in scope when using the block?
0
 

Author Comment

by:stephenbliss
ID: 34232694
I'm using this view as a page that lists available downloads. The only filters are by node=downlaod and then the Current Roles = Yes provided by the roles reference module. In fields I included Content: Role and User: Roles not being certain which were required for the filter. When I view the page—nothing. If I remove the filter for Current Roles I see all the downloads as expected. So I know it all works, just the Roles filtering that doesn't.
0
 
LVL 3

Expert Comment

by:RobertPope
ID: 34232739
I may have 20 minutes after 5pm to screenshare a bit with you - I am thinking you are going to want to use arguments to solve this though

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:stephenbliss
ID: 34232854
That would be awesome. Just not sure of my schedule 5 - 6. Later would work for sure and anytime tomorrow.
0
 

Accepted Solution

by:
stephenbliss earned 0 total points
ID: 34315630
I solved this by using a User Reference field type in the content type. This works perfectly—we can select the users that we want to have access to these downloads individually providing the granularity the client wanted.
0
 
LVL 3

Expert Comment

by:RobertPope
ID: 34315970
Hey that's great!  nice work.
0
 

Author Closing Comment

by:stephenbliss
ID: 34341733
I was directed to this solution by information I found elsewhere on the web.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Read about how to approach blogging and about ways to do it right. Stand out from the crowd and let your knowledge be consumed by a large audience. This article aims to explain how your blog should look like,  the most important things to do while b…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question