[Vtigercrm-developers] VTQL parser error / tooltips for All Events & Todos
Adam Heinz
amh at metricwise.net
Thu Jun 28 13:49:37 PDT 2012
I'm noodling around trying to add tooltips to All Events & Todos and I
just hit an error the likes of which I've never seen before. I had no
idea that web service requests write a custom query language (VTQL)
that is then parsed into SQL! I'm pasting a bunch of debug/error spam
at the bottom, but the interesting bit is this:
VTQL
string 'select * from Calendar where id ='1x23852';' (length=43)
outputs bogus SQL
LEFT JOIN vtiger_contactdetails ON
vtiger_activity.activityid=vtiger_contactdetails.
note lack of field name for vtiger_contactdetails table. I'm digging
into the code now, but anyone have any ideas?
Adam
---
string '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 'LEFT JOIN vtiger_activity_reminder ON
vtiger_activity.activityid=vtiger_activity' at line 1' (length=226)
SELECT vtiger_activity.activitytype,vtiger_activitycf.confirmed,vtiger_cntactivityrel.contactid,vtiger_crmentity.createdtime,vtiger_seactivityrel.crmid,vtiger_activity.date_start,vtiger_crmentity.description,vtiger_activity.due_date,vtiger_activity.duration_hours,vtiger_activity.duration_minutes,vtiger_activity.eventstatus,vtiger_activitycf.groupname,vtiger_contactsubdetails.homephone,vtiger_activitycf.leadsource,vtiger_activity.location,vtiger_contactdetails.mobile,vtiger_crmentity.modifiedtime,vtiger_activity.notime,vtiger_contactdetails.phone,vtiger_activity.priority,vtiger_activity.recurringtype,vtiger_activitycf.referralid,vtiger_activity_reminder.reminder_time,vtiger_crmentity.smownerid,vtiger_activity.status,vtiger_activity.subject,vtiger_activity.time_end,vtiger_activity.time_start,vtiger_activity.visibility,vtiger_activity.activityid
FROM vtiger_activity LEFT JOIN vtiger_activitycf ON
vtiger_activity.activityid=vtiger_activitycf.activityid LEFT JOIN
vtiger_cntactivityrel ON
vtiger_activity.activityid=vtiger_cntactivityrel.activityid LEFT JOIN
vtiger_crmentity ON vtiger_activity.activityid=vtiger_crmentity.crmid
LEFT JOIN vtiger_seactivityrel ON
vtiger_activity.activityid=vtiger_seactivityrel.activityid LEFT JOIN
vtiger_contactsubdetails ON
vtiger_activity.activityid=vtiger_contactsubdetails.contactsubscriptionid
LEFT JOIN vtiger_contactdetails ON
vtiger_activity.activityid=vtiger_contactdetails. LEFT JOIN
vtiger_activity_reminder ON
vtiger_activity.activityid=vtiger_activity_reminder.activity_id INNER
JOIN vt_tmp_u83_t9 vt_tmp_u83_t9 ON vt_tmp_u83_t9.id =
vtiger_crmentity.smownerid WHERE (vtiger_activity.activityid = 23852)
AND activitytype='Task' AND vtiger_crmentity.deleted=0 LIMIT 100;
( ! ) Fatal error: Uncaught exception 'WebServiceException' with
message 'Database error while performing required operation' in
/var/www/html/include/Webservices/VtigerModuleOperation.php on line
129
( ! ) WebServiceException: Database error while performing required
operation in /var/www/html/include/Webservices/VtigerModuleOperation.php
on line 129
Call Stack
# Time Memory Function Location
1 0.0001 680504 {main}( ) ../index.php:0
2 0.0755 5095896 include(
'/var/www/html/modules/Tooltip/TooltipAjax.php' ) ../index.php:744
3 0.0755 5096312 require_once(
'/var/www/html/include/Ajax/CommonAjax.php' ) ../TooltipAjax.php:11
4 0.0756 5096728 require_once(
'/var/www/html/modules/Tooltip/ComputeTooltip.php'
) ../CommonAjax.php:13
5 0.2060 6315776 vtws_query( ) ../ComputeTooltip.php:29
6 0.2664 6491904 VtigerModuleOperation->query( ) ../Query.php:34
More information about the vtigercrm-developers
mailing list