Views UID filter not working

danieldembach - August 4, 2008 - 15:26
Project:Favorite Nodes
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Using Drupal 5.9 and Views 5.x-1.6, the UID-filter does not work as expected: Set to "is equal to" "Currently Logged In User", I would expect the resulting view to only show the current user's favorites. It does however show everybody's favs. We accidentally found that exposing the filter makes it work as anticipated.

#1

alfaguru - January 14, 2009 - 16:29
Status:active» needs review

I'm not sure why it should show everybody's favourites but I can see why it may always show those for a particular user. The view gets cached with an actual user ID rather than the magic string ***CURRENT_USER***, which needs to be used in any situation where the current user ID is required, to ensure the view can be cached.

Here's a patch that fixes it.

AttachmentSize
views-cache-issue.patch 412 bytes

#2

kbahey - January 14, 2009 - 16:44
Version:5.x-1.2» 5.x-1.x-dev
Status:needs review» fixed

Fixed in -dev.

Thank you.

#3

System Message - January 28, 2009 - 16:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.