Subpanels are not displaying

Hello Experts,

SuiteCRM version

Version 7.10.9
Sugar Version 6.5.25 (Build 344)

In the Leads module, when I create Task, Meeting or Calls and save the record, immediately it shows the [color=#ff0000]Database failure. Please refer to suitecrm.log for details.[/color] and then it is not showing any subpanel.

Thanks in advance.

Sorry about that. It’s fixed in 7.10.10, coming out soon.

You can apply the fix manually, it’s very easy:

https://github.com/salesagility/SuiteCRM/pull/6371/files

Thanks, pgr for your prompt reply.

I have followed your suggestion but it didn’t work.

Thanks.

Can you get to the query that is throwing the error? It should be in suitecrm.log (maybe you need to increase log level to DEBUG)

I’d like to see the exact SQL error it’s giving. There’s another known issue with SQL commands that include the INTERVAL keyword but fail to specify any value for it…

Hi,

There is only one query that is failed.

Mon Oct 22 05:13:09 2018 [3164][1][FATAL] Error retrieving Lead list: Query Failed: (SELECT meetings.id , meetings.assigned_user_id , meetings.name , meetings.status , ’ ’ contact_name , ’ ’ contact_id , meetings.date_end as date_due , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , ‘Users’ assigned_user_name_mod, ’ ’ contact_name_owner , ’ ’ contact_name_mod , meetings.recurring_source , meetings.created_by , ‘meetings’ panel_name FROM meetings LEFT JOIN meetings_cstm ON meetings.id = meetings_cstm.id_c LEFT JOIN users jt1 ON meetings.assigned_user_id=jt1.id AND jt1.deleted=0

AND jt1.deleted=0 INNER JOIN meetings_leads ON meetings.id=meetings_leads.meeting_id AND meetings_leads.lead_id=‘95f3a003-cedf-dcb2-b3b1-5bcd5cde4913’ AND meetings_leads.deleted=0

where ((meetings.status !=‘Held’ AND meetings.status !=‘Not Held’)) AND meetings.deleted=0) UNION ALL ( SELECT meetings.id , meetings.assigned_user_id , meetings.name , meetings.status , ’ ’ contact_name , ’ ’ contact_id , meetings.date_end as date_due , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , ‘Users’ assigned_user_name_mod, ’ ’ contact_name_owner , ’ ’ contact_name_mod , meetings.recurring_source , meetings.created_by , ‘oldmeetings’ panel_name FROM meetings LEFT JOIN meetings_cstm ON meetings.id = meetings_cstm.id_c LEFT JOIN users jt1 ON meetings.assigned_user_id=jt1.id AND jt1.deleted=0

AND jt1.deleted=0 where ( meetings.parent_id = ‘95f3a003-cedf-dcb2-b3b1-5bcd5cde4913’
AND meetings.parent_type = ‘Leads’ AND meetings.id NOT IN ( SELECT meeting_id FROM meetings_leads ) AND (meetings.status !=‘Held’ AND meetings.status !=‘Not Held’)) AND meetings.deleted=0 ) UNION ALL ( SELECT tasks.id , tasks.assigned_user_id , tasks.name , tasks.status , LTRIM(RTRIM(CONCAT(IFNULL(contacts.first_name,’’),’ ‘,IFNULL(contacts.last_name,’’)))) contact_name , tasks.contact_id , NULL date_due, jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , ‘Users’ assigned_user_name_mod, ’ ’ contact_name_owner , ’ ’ contact_name_mod , NULL recurring_source, tasks.created_by , ‘tasks’ panel_name FROM tasks LEFT JOIN contacts contacts ON tasks.contact_id=contacts.id AND contacts.deleted=0

AND contacts.deleted=0 LEFT JOIN users jt1 ON tasks.assigned_user_id=jt1.id AND jt1.deleted=0

AND jt1.deleted=0 INNER JOIN leads tasks_rel ON tasks.parent_id=tasks_rel.id AND tasks_rel.deleted=0
AND tasks.parent_type = ‘Leads’
where ( tasks.parent_id=‘95f3a003-cedf-dcb2-b3b1-5bcd5cde4913’ AND (tasks.status != ‘Completed’ AND tasks.status != ‘Deferred’)) AND tasks.deleted=0 ) UNION ALL ( SELECT calls.id , calls.assigned_user_id , calls.name , calls.status , ’ ’ contact_name , ’ ’ contact_id , calls.date_end as date_due , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , ‘Users’ assigned_user_name_mod, ’ ’ contact_name_owner , ’ ’ contact_name_mod , calls.recurring_source , calls.created_by , ‘calls’ panel_name FROM calls LEFT JOIN users jt1 ON calls.assigned_user_id=jt1.id AND jt1.deleted=0

AND jt1.deleted=0 INNER JOIN calls_leads ON calls.id=calls_leads.call_id AND calls_leads.lead_id=‘95f3a003-cedf-dcb2-b3b1-5bcd5cde4913’ AND calls_leads.deleted=0

where ((calls.status != ‘Held’ AND calls.status != ‘Not Held’)) AND calls.deleted=0 ) UNION ALL ( SELECT calls.id , calls.assigned_user_id , calls.name , calls.status , ’ ’ contact_name , ’ ’ contact_id , calls.date_end as date_due , jt1.user_name assigned_user_name , jt1.created_by assigned_user_name_owner , ‘Users’ assigned_user_name_mod, ’ ’ contact_name_owner , ’ ’ contact_name_mod , calls.recurring_source , calls.created_by , ‘oldcalls’ panel_name FROM calls LEFT JOIN users jt1 ON calls.assigned_user_id=jt1.id AND jt1.deleted=0

AND jt1.deleted=0 where ( calls.parent_id = ‘95f3a003-cedf-dcb2-b3b1-5bcd5cde4913’
AND calls.parent_type = ‘Leads’ AND calls.id NOT IN ( SELECT call_id FROM calls_leads ) AND (calls.status != ‘Held’ AND calls.status != ‘Not Held’)) AND calls.deleted=0 ) ORDER BY date_start desc LIMIT 0,10: MySQL error 1054: Unknown column ‘date_start’ in ‘order clause’

Please feel free to ask me if anything else is required from my side.

Thanks for your help.

I have seen this one before, recently, but I am not sure if it has a fix already or not. Maybe you can try searching Github, or even pulling the hotfix branch and seeing if the problem goes away.

I don’t think the problem is specific to Leads, it happens in several modules, with the same SQL error.

Thanks for the information.

I will check for this.

Hey @pgr

just upgraded to 7.10.10 and am having this issue. If I create a lead, no problem. If then go back and edit it (any field). I get a database failure with the subpanels not showing.

Wed Nov 7 19:30:01 2018 [2][1][FATAL] Query Failed: SELECT leads.id AS id FROM leads WHERE leads.date_entered = DATE_ADD(leads., INTERVAL ) AND NOT EXISTS (SELECT * FROM aow_processed WHERE aow_processed.aow_workflow_id=‘cccfe6bb-a6b3-5fa9-158e-58ac5cde3580’ AND aow_processed.parent_id=leads.id AND aow_processed.status = ‘Complete’ AND aow_processed.deleted = 0) AND leads.deleted = 0 : MySQL error 1064: 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 ’ INTERVAL ) AND NOT EXISTS (SELECT * FROM aow_processed WHERE aow_processed.ao’ at line 1

I’ve got a bunch of similar errors as above for pretty much every module. You mentioned you saw this INTERVAL issue before. is there a fix you can refer me to?

I should also mention that leads created before I upgraded work fine. Just leads after the upgrade. Contacts seem to work OK too, even new ones.

Upon further investigation. This is the “date_start” issue. It doesn’t seem to be fixed in 7.10.10. I changed the subpaneldefs.php for the leads module to “date_due” and now it works.

[date_start issue

Strange, this is what the files has in 7.10.10:

https://github.com/Dillon-Brown/SuiteCRM/blob/master/modules/Leads/metadata/subpaneldefs.php

so “date_due” seems to be fixed there…?

1 Like

Patched with the [github.com/Dillon-Brown/SuiteCRM/blob/ma...ata/subpaneldefs.php] file here and it did the work.
Did run a “Repair” just in case… All up and running again!

@rcailrello for some reason your link didn’t get included correctly… can you please paste it again?

https://github.com/Dillon-Brown/SuiteCRM/blob/master/modules/Leads/metadata/subpaneldefs.php

It is right up there in on of the previous posts ok?

Good luck!