Download & Extend

Default view argument should use 404, not display all values

Project:Smartqueue Per User
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Currently having an issue using Smartqueue Per User with the latest version of Nodequeue, Drupal 6, and PHP 5.2.5. After a clean install with Views 2, and the creation of smartqueues per user, each user has appropriate permissions as well as their own queue.

On our default home page, we want users to see their own queue, but not that of anyone else. By default, Smartqueue Per User appears to offer only the block "Queue 'Smartqueue'" by default. If you go into views, this queue is actually linked to a view that says it will "Display a list of all nodes in queue 'Smartqueues' "- that is to say, ALL items in ALL queues. By default, again, it appears that the item I need is smartqueue_users_user, which says that it "Displays the nodes in a user's queue". But this item has no views built-in, and especially not a block view (which is what I need).

After some time playing with the views, I cannot figure out how to limit the block to showing ONLY the items in the currently-logged-in user's smartqueue. This could be as simple as setting up an appropriate filter, but I couldn't figure out how to properly pass variables (in this case, the username) through a filter- and really, shouldn't have to, as the views should be setup properly by default?

Any and all help is greatly appreciated, as is this module! Thanks!

Comments

#1

Title:SmartQueuePerUser Views Default to All Users View All Items in All Queues» Default view argument should use 404, not display all values

Indeed, you are correct. The default view definition needs to be corrected. Until that happens, you should be able to resolve this issue by editing the smartqueue_users_user view and clicking the subqueue reference argument and changing"Action to take if argument is not present" to either use the empty text or a 404. A 404 probably makes sense as the default behavior for this view.

#2

Thanks for the update! I tried using the method you mentioned, but it doesn't really achieve the desired affect. Any logged-in user with a Smartqueue can still see all items from all Smartqueues. In other words, the view isn't limited to the currently logged-in user.

Anyone know how to achieve this simply? I imagine there must be a way with filters, but I don't know how to use the filters well enough to get this working.

Thanks again.