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

merlinofchaos’s picture

Project: Panels » Views (for Drupal 7)
Version: 5.x-2.0-alpha13 » 5.x-1.6

This 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.

BlindWolf8’s picture

Voting 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.

merlinofchaos’s picture

Unfortunately, offset only works when there is a range of some kind; to use offset, there must also be a limit.

BlindWolf8’s picture

I 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.

sun’s picture

Title: Views Offset doesn't work when Num post = 0 » Offset without limit returns all results
merlinofchaos’s picture

Status: Active » Closed (won't fix)

This is not fixable in Views 1.