Closed (fixed)
Project:
Open Atrium
Version:
7.x-2.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2013 at 11:06 UTC
Updated:
22 Jan 2014 at 22:00 UTC
Jump to comment: Most recent
I've see that this issue has been found in previous versions of Drupal (D6) but it stills happens when running OA2 with PostgreSQL. In my case it happens when working with the OA Discussions views.
I found a patch in the following drupal.org link that it works for me so far. But with the need of one more step cause it then raises an error for the use of a MySQL function (UNIX_TIMESTAMP()) in a PSQL query.
In the file views_handler_field_oa_new_post.inc (line 21) it says:
$this->field_alias = $this->query->add_field(NULL, "CASE WHEN $field IS NULL AND ($node.changed > (UNIX_TIMESTAMP() - $limit)) THEN 1 ELSE 0 END", $this->table . '_' . $this->field, $params);
I changed to
$this->field_alias = $this->query->add_field(NULL, "CASE WHEN $field IS NULL AND ($node.changed > (".time()." - $limit)) THEN 1 ELSE 0 END", $this->table . '_' . $this->field, $params);
I hope this helps.
Comments
Comment #1
Argus commentedComment #2
mpotter commentedCommited a variation of this to f0c69d8. Actually doing the entire time()-$limit in PHP code now.