Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2006 at 16:14 UTC
Updated:
7 Jul 2006 at 23:30 UTC
The problem: operators get converted to their html equivalents, breaking sql
< and > become < and >
This seems to be true for the built in views operators as well as any that you try to add with other modules. I tried to find the best place to catch this error and convert the entities back before the sql gets run, and this patch is what I came up with. There may be a better place to do it, but this needs to be caught somewhere :-)
| Comment | File | Size | Author |
|---|---|---|---|
| views_query.inc_2.patch | 653 bytes | karens |
Comments
Comment #1
yched commentedI saw your comment about that in your cck's date field patch.
Strangely enough, I myself have never experienced the issue, and <, >, <= etc... operators have always worked fine for me....
Using LAMP server, PHP 4.4.0, MySQL 4.1.14.
Comment #2
yched commentedOK, reposting...
I saw your comment about that in your cck's date field patch.
Strangely enough, I myself have never experienced the issue, and <, >, <= etc... operators have always worked fine for me....
Using LAMP server, PHP 4.4.0, MySQL 4.1.14.
Comment #3
karens commentedI've run into this one in several handlers, including some of the views built-in ones. If I turn on the devel module it's easy to see that the sql has things like ' event.event_start > 9999999', and when I check the values the handler is getting I am getting passed the html entity versions. I have no explanation for why it works sometimes and not others. It pretty much never works right for me. This is on Windows XP, both with php4 and php5, mysql4.1.
Comment #4
karens commentedTrying again, my sql has things like
Comment #5
merlinofchaos commentedUgh. This is because I'm running the operators through %s, which of course is doing that. I never even thought about the > and < issues. I will need to find a better way to ensure the safety of operators that are included that doesn't use check plain.
Comment #6
Briang commentedI've been getting this problem to. I posted a message about it on the event_views issue:
http://drupal.org/node/49157
Comment #7
merlinofchaos commentedI put in an generic fix for this. I feel it's kind of hackish, but it'll do.
Comment #8
(not verified) commented