_views_get_query() returning invalid queries

adrianr - June 24, 2007 - 17:28
Project:Views
Version:5.x-1.6-beta5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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.

AttachmentSize
views_6.patch1.11 KB

#1

merlinofchaos - June 24, 2007 - 20:11
Status:active» needs review

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

#2

merlinofchaos - July 14, 2007 - 18:27
Status:needs review» fixed

Fixed in -dev. Thanks for the submission!

#3

Anonymous - July 28, 2007 - 18:28
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.