Hi there,

I've noticed views results are not shown for anonymous users for both of two blocks "My Recommendations" and "My Viewed Contents" are not shown.

Comments

alunyov created an issue. See original summary.

alunyov’s picture

Assigned: alunyov » Unassigned
Status: Active » Needs review
Issue tags: +contextual filter
StatusFileSize
new29.41 KB

Issues is about value of default argument current_user for views context filter returns 0, but to get results from `history_rec_prediction` table we should use external uid from `history_rec_ext_users` table. I have added another default argument "User ID from logged in user or External UID for anonymous" which returns uid if user is logged in, and external uid from `history_rec_ext_users` table if user is anonymous. IMPORTANT: After applying the patch make sure value "User ID from logged in user or External UID for anonymous" for contextual filter "Recommender: Browsing History Recommender: user in preference table" is selected for both of views (or for any of views where this contextual filter was used).
Please see attached patch.