Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2007 at 14:45 UTC
Updated:
25 Sep 2009 at 19:17 UTC
Create view that returns several nodes.
Set 'Num post' to 0
Set 'offset' to 1 - all views are returned.
If you set 'Num post' to 12 then the offset will work properly.
Comments
Comment #1
merlinofchaos commentedThis is actually a problem in Views.
It may also not be fixable -- the reason this is true is that if there is a 'num posts' setting that's not 0, and the pager isn't on, it uses db_query_range() but if it num posts is 0, it just uses db_query(). I'm not sure whether or not db_query_range can be used if I have an offset and want all posts. I'll have to check.
Comment #2
BlindWolf8 commentedVoting for this, as I just spent a good hour or 2 trying to figure out why the hell offset didn't work. Offset is broken if the results are not limited, which makes sense...to a point.
Comment #3
merlinofchaos commentedUnfortunately, offset only works when there is a range of some kind; to use offset, there must also be a limit.
Comment #4
BlindWolf8 commentedI believe it should be put into the documentation or function comment that if you want offset to work, a specific amount should be returned. (aka, not 0, e.g., 9999999) I hope this has already been done in the dev versions or 6.x versions.
Comment #5
sunComment #6
merlinofchaos commentedThis is not fixable in Views 1.