If a view hasn't already been cached, the function correctly updates the cache with the 'count' and 'countquery' values, but doesn't incorporate them in the current $info variable for the current call. This can result in there being no values to substitute and an invalid query still containing '%s' is returned causing errors the first time the user hits the view or after a clear of the views cache.

Installing the viewtheme.module showed this up for me; it does an early count.

Attached is a patch which seems to have sorted the problem for me.

CommentFileSizeAuthor
views_6.patch1.11 KBadrianr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

Status: Active » Needs review

Marking patches as patches will get them looked at sooner. That can save weeks =)

merlinofchaos’s picture

Status: Needs review » Fixed

Fixed in -dev. Thanks for the submission!

Anonymous’s picture

Status: Fixed » Closed (fixed)