Solved

Drupal Roles Reference module not working in Views

Posted on 2010-11-28
7
531 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
  • 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Creating Functions in phpMyAdmin 8 26
Split wordpress loop 35 56
AJAX pass along a variable 3 46
How to make a good PHP + MySQL + JS pagination system? 3 31
This article discusses how to create an extensible mechanism for linked drop downs.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

808 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