Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | views-cache-issue.patch | 412 bytes | alfaguru |
Comments
Comment #1
alfaguru CreditAttribution: alfaguru commentedI'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.
Comment #2
kbahey CreditAttribution: kbahey commentedFixed in -dev.
Thank you.