_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 |
Jump to:
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.
| Attachment | Size |
|---|---|
| views_6.patch | 1.11 KB |

#1
Marking patches as patches will get them looked at sooner. That can save weeks =)
#2
Fixed in -dev. Thanks for the submission!
#3