Small patch that allows people to enable/disable the Views query stats output and choose what page region they would output in.
Currently Views forces this output "on" if Devel is installed and outputs in the "footer".
Given that buidling views currently shows query information and Devel can also provide query information in general, I defaulted things to be to "off". Feel free to change that if you think it's needed by default.
| Comment | File | Size | Author |
|---|---|---|---|
| views-query-stats-options.patch | 1.67 KB | Moonshine |
Comments
Comment #1
moshe weitzman commentedlooks good to me. thanks.
Comment #2
nonsieThanks for the patch. I ended up somehow with views output in the header and was stuck not being able to add any views until the patch was applied.
Comment #3
merlinofchaos commentedCommitted. THanks!
Comment #4
jmdoran commentedAs a further note, this output currently breaks the ajax in Views (and therefore the Views UI) if left unpatched. This is because the XMLHttpRequest object will return with the loading time information prepended to the request string. This makes it invalid XML, and results in a parsererror. The user will simply see "An error has occured" however. That seems to be a fairly severe conflict with the devel module, and perhaps should receive more attention from someone familiar with the Views codebase.
Comment #5
merlinofchaos commentedYou must be using a very old version of devel module if that is happening; Views is already doing the right thing to tell devel not to append information (which is to set the header properly to let it know that the page is not HTML).
Comment #6
moshe weitzman commented@merlinofchaos - FYI, views_ajax_render() could become 1 line slimmer by using drupal_json() instead of sending its own http header.
Comment #7
merlinofchaos commentedMoshe: Sure thing. Fixed in my local codebase; will not be able to check in for awhile though.
Comment #8
jmdoran commentedNo. This happens on a clean install with Drupal 6.2, devel-6.x-1.8 and views-6.x-2.0-beta3. It could be coming from somewhere else, although I wouldn't know from where.
Update -- The problem I'm having (with the rogue output) seems to not be fixed by the patch, it must be coming from somewhere else. I'll post another issue report if I can figure more out about it.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.