I am using sugarcrm version 5.5.4. I have installed language pack for Persian language. When I am trying to set a call from Accounts subpanel i.e from Activities tab, when the language is English, the reminder popup works fine. But when I change the language to Persian, reminder popup does not appears. After lot of research I found that, the query executed to fetch the reminder calls is from "include/javascript/jsAlerts.php
" When I set up a call from English language query executed is like -
SELECT name, calls.id, description, date_start, reminder_time FROM calls LEFT JOIN calls_users ON calls.id = calls_users.call_id WHERE calls_users.user_id=1 AND calls.reminder_time !=-1 AND calls_users.deleted !=1 and date_start>='2014-01-31 09:16:34' AND date_start<='2014-01-31 10:16:34'
and if I change the language to Persian then query executed is -
SELECT name, calls.id, description, date_start, reminder_time FROM calls LEFT JOIN calls_users ON calls.id = calls_users.call_id WHERE calls_users.user_id = 1 AND calls.reminder_time! = -1 AND calls_users.deleted! = 1 and date_start> = '2014-01-31 09:16:34 'AND date_start <= '2014-01-31 10:16:34'
If you observe, in second query there are syntax errors near calls.reminder_time! = -1
and date_start> = '2014-01-31 07:55:32 'AND
.
Thats why query is not executed properly and popup not appears.
Original query from jsAlerts.php doesn't have any such errors, then why it executes in this way. I have tried using various string operations, but nothing helped.
Also, if after creating call from Persian language from same way, and I visit to other pages or simply refresh the same page, then query works fine. Issue is only when I create the call and wait on the same page for the reminder.
Is there any way to overcome from this problem? Any help is appreciated. Thanks.