Needs review
Project:
Notifications
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Dec 2012 at 16:42 UTC
Updated:
7 Jun 2013 at 06:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
czigor commentedUser content views integration cleaned up a bit.
Comment #2
czigor commentedComment #3
czigor commentedTypo fix in one of the array keys.
Comment #4
rob230 commentedCan you clarify what you fixed in this patch?
I don't know whether a separate issue is needed for this, but I have found the Views integration to be very sketchy.
For example, when trying to create a block View that shows users subscribed to current node. First of all I tried it in the logical way:
This fails immediately on the relationship with the following SQL error:
The query:
Note the error: it has
users.for the join condition. This is because in notifications_views.views.inc it is specified as:Views requires
'left_field'to be specified for a join. Furthermore, there is no such field as notifications_subscription_fields.usid. I don't think it's possible to join to this table on uid, only to notifications_subscription, which contains the field uid.The second problem I discovered when trying to approach it in a different way. I created a View like this:
This fails on the sort criteria:
Indeed, there is no such field. The correct field name is
notifications_subscription.updated. This is easily fixed in notifications_views.views.inc by changing this line:$data['notifications_subscription']['changed'] = array(I wonder how many other things like this slipped through and haven't been noticed since 2011. Also, is this module abandoned?
Comment #5
czigor commentedIn our site users can subscribe other users. I used this patch for to purposes:
#1: to display the users a given user is following.
#2: to display the users who follow a given user.
For example the view for #1 goes:
- User type view
- contextual filter: user uid
- 2 relationships: 1. user subscriptions 2. (subscriptions) Notifications Fields: Author
- 1 field: (Author) User: Rendered User
I think the patch in https://drupal.org/node/1268970#comment-6831516 is also needed.
My patch does not fix the whole views integration at all, just the bit I needed, that's why you see those SQLSTATE errors.
According to the project page the module is not abandoned, only seeking a new maintainer.