Closed (fixed)
Project:
Reverse Node Reference
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 May 2010 at 22:15 UTC
Updated:
17 Oct 2013 at 16:00 UTC
Hi,
Thank you so much for this module - it has just made a nightmare incredibly easy. I am using it for multiple views and its working without error... except for one strange thing.
My pagers don't seem to be working. If I have a view which is showing 10 results and I simply turn on the pager and make it show 2 results, I expect to see 5 pages like I do with my normal views. With this I see no pager, just the first 2 results.
Does anyone else see this?
Thanks,
Paul.
Comments
Comment #1
markus_petrux commentedIt works here. So it could be something particular to your installation, or maybe something special in this view that brakes the joins that this module builds.
Try debugging the queries executed (using the devel module) and see how the SQL statement from the main query of this view changes from one page to another.
Comment #2
markus_petrux commentedComment #3
techypaul commentedHi,
I apologise for being a noob, but I have installed the devel module but I cant see what I should be looking for. I get a whole load of queries, caches etc at the bottom of the page but cannot see anything showing the SQL output of this view. Is there something in particular I should be looking for?
I know you are very busy so appreciate your advice.
Thanks,
Paul.
Comment #4
markus_petrux commentedYou can first see how the query looks in the Views UI, and that should give you the pattern to look into the list of queries provided by devel module.
Comment #5
singularoI had this as well, and figured it out, in my case, i was using the backreference to heavily, and when the "count" query was run by views to get the number of rows returned, it adds "distinct" and since all the rows were for one node (with multiple backreferences), it only returned 1. This was the query:
So, I had to re-think the view, sort of reverse the relationship/criteria, and the query now looks like:
And correctly gives the right number of rows - 22
Now there is in fact no backreference usage at all, just using the "group" relationship (which i was backreferencing before) in the argument. This is probably much more efficient as well ;-)
HTH
Comment #6
markus_petrux commentedIt looks like this is fixed.
Comment #8
dunx commentedI don't believe the solution offered is a fix.
If you use a reverse node reference to display nodes referring to a given node, then you must use the relationship field on the row style configuration to return the referencing nodes. If not, you just end up with multiple copies of the referenced node. The pager count SQL is not taking in to account this relationship and the DISTINCT is always returning 1 - the node referenced, rather than the number of referencing nodes.