NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1
|Anonymous | Login | Signup for a new account||29-03-17 02:25 BST|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0015283||phplist application||Message Send Process||public||11-05-09 17:18||09-04-10 19:17|
|Target Version||2.10.11||Fixed in Version||2.10.11|
|Summary||0015283: v2.10.10: Date criteria does not work|
|Description||Using Date attributes as criteria does not seem to work anymore.|
This issue is reported by Aidan:
==== START QUOTE ====
On the Criteria tab, I try to add a criterion based on the date attribute - I choose the date attribute from the dropdown and enter the date in the format specified, dd-mm-yyyy, and click 'Add Criterion'. But it replaces the date I entered with 0. I get the message 'Adding Submission Date isbefore 0' and it adds a line to the 'Existing Criteria' table which also has '0' in the values column.
Running the Calculate function shows that this criterion has no effect on the number of results returned.
=== END QUOTE ===
Source: http://forums.phplist.com/viewtopic.php?f=17&t=24512#p61910 [^]
Issue confirmed on my installation too.
|Additional Information||Had a quick look at the code and it seems to me that the use of the cleanCommaList function in send_core.php causes problems when Date type attibutes are used as criteria.|
This is a possible fix which seems to work, though I haven't tested it thoroughly. It basically reverts two code lines back to what it was in the previous version:
1. change line 495
from this: $values = cleanCommaList($values);
to this: // $values = cleanCommaList($values);
2. change line 859
from this: $where_clause .= cleanCommaList($crit_data["values"]) . ") )";
to this: $where_clause .= $crit_data["values"] . ") )";
NOTE: I think the cleanCommaList function was applied to fix this issue: http://mantis.phplist.com/view.php?id=15211 [^]
Removing cleanCommaList did not produce any query errors, so the workaround solution suggested by davideg in 15211 wasn't needed.
|Tags||No tags attached.|
I wonder whether this issue might be related to other issues involving the
cleanCommaList() function, like for instance http://mantis.phplist.com/view.php?id=15301 [^]
A patched send_core.php file with my suggested fix is available on the forum: http://forums.phplist.com/viewtopic.php?f=17&t=24512#p67532 [^]
This file includes taydeko's suggested fix for issue 15287 ("FCKeditor doesn't load when opening the 'send a message' page"). See http://mantis.phplist.com/view.php?id=15287 [^]
The cleanCommaList() function also appears to affect criteria based on radio buttons.
guyshomenet reported this scenario results in the following error message:
"Database error 1064 while doing query You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'and table1.value in ()' at line 1"
The solution mentioned above appears to fix this issue too.
Related forum thread: http://forums.phplist.com/viewtopic.php?f=17&t=29190 [^]
|yes, the use of the cleancommalist function seems to have caused some issues. Should be ok now.|
|Copyright © 2000 - 2017 MantisBT Team|