Failing Report export.

Hello Guys,

[color=#0000ff]Suite Version : 7.8.2[/color]

I am going through an [color=#ff0000]urgent[/color] issue with [color=#ff0000]Report module[/color]. When I am trying to export reports for case module and if I am having big number of rows. [color=#ff0000]Report Exporting failing and white blank screen is being rendered in the end .[/color]. :pinch:

[color=#0000ff]For Example[/color]

I am exporting cases from Case Search View. all my cases are being exported (13K +) cases. Size of CSV is big (30 MB +) though. but that is not the case with Report exporting. Though I am getting proper data in my output on the screen of that report :blink:

Please Direct towards Solution.

Thanks in advance.

[b][color=#ff0000]Hello Guys,

Can some one reply on this topic on urgent bases.
[/color][/b]

  1. Set your permissions correctly

  2. Try to increase system resources (eg: max_execution_time, and all other) to rather high numbers

  3. If you don’t provide the necessary information it is almost impossible for anyone to help: you should at least:
    . provide the SuiteCRM version (you did)
    . operating system
    . php version
    . database and version
    . if known: webserver and version

All these things may be the key to your problem

  1. Additionnally you have to provide:
    . any errors from the PHP/web server logs
    . any errors from the suitecrm/sugarcrm logs
    . any errors from the console of the browser
    . any displayed errors (you did: blank screen)

  2. Provide any other additional information that may be useful (eg: it’s a fresh install, a system that has been upgraded several times, a system that has been moved from another server, if you have introduced some customisation via coding, other failures, etc…)

  3. Please do not write in red. It is important to you. If someone is able to help he will try to help you. There are some very collaborative individuals in this forum who are helping lot’s of people for free but, being this a completely voluntary and free contribution, one may have to wait and accept also that no one has an answer.

1 Like

Hello amariussi,

Thanking for the reply.

I enabled the php errors and as you suggested it was ‘Execution time out’ which was causing the issue. I increase it’s value in php.ini and reports are being downloaded now (but just a lil bit slow).

now a different issue for the same module is occurring.

I have upgraded from 7.4.3 to 7.8.2 and my setup is migrated from VPS to AWS (EC2 M4.Large instance).

The issue is

I am Missing fields and conditions when clicking on respective buttons. no tree list of fields being displayed on selecting any of the module. I made sure that all permissions are correct.

and found following errors (see attached images)

Please direct toward solution

Thanking

The errors you showed are all warnings which means, since they are displayed, that you have a wrong configuration of error_reporting: you should allow only fatal errors in your production environment. So I recommend that you chnage the values of error repoerting in php.ini

Having said this, you have another problem.

  1. How and when have you set permissions “correctly”?

  2. How did you go from VPS to AWS? What were the changes and have you migrated the instance?

  3. Please check your logs and report here what you see (suitecrm/sugarcrm.log, PHP/Apache/Web server logs)

  4. I recommend that:
    . you reset permissions correctly again
    . make sure that your cron jobs are run by the same system user within the same system group thta runs SuiteCRM (otherwise permissions may get messed up)
    . you go to Admin->Repair and run Quick Repair and Rebuild, all the javascript/js repairs available, rebuild relationships. I also recommend that between each of these you reset permissions again (it’s many times but useful)
    . open you .htaccess file and check that everything is fine (specially if you have migrated)
    . log out of SuiteCRM and the log in again
    . clear your browser cache a few times
    . try with a different browser to see if the behaviour is the same
    . in case you have moved the instance you should also edit config.php (and possibly also config_override,php) to make sure that there are no more references to the old installation and that all variables now refer to the new instance.

I hope this helps

1 Like

Hello amariussi,

Thanks for useful reply,

I followed some of the steps you suggested.

but suddenly I found Module directory was missing in /var/www/html/suitecrm782/cache/themes/SuiteR/ (I am using “SuiteR” theme) when I compared it with a newly installed setup of the same version which was not having this issue.

I copied and paste Module directory containing template files there. and issue resolved but only until I perform repair and rebuild. After that those files were removed by the system from there. I pest them there and then I saw that only a piece of code was begun to be missing when performed repair.

here is that piece of code (the layout of fieldTree panel)…

{$MOD.LBL_AOR_MODULETREE_SUBPANEL_TITLE}


{$MOD.LBL_AOR_FIELDS_SUBPANEL_TITLE}

==============> line no. 43 /var/www/html/development/suiteCRM/cache/themes/SuiteR/modules/AOR_Reports/EditView.tpl

now it is working fine untill I repair. after that I have to paste that piece of code again after reseting the permission.

One more thing I have to mention…

it is happening few times that if I tries to generate report with case module with including a couple of fields of contact module there it is Query with error being generated and no data is being fetched.

it is showing MySQL error 1103: Incorrect table name ‘’ . which is query with error - double Grave accent markes (``) before a table name.

here is the log details.

Tue Apr 11 18:54:37 2017 [24597][1e420e07-a864-eadd-29e6-57025d777a54][FATAL] Query Failed: SELECT count(*) c FROM (SELECT cases_cstm.user_id1_c AS ‘Followup_By0’, cases.id AS ‘cases_id’, cases.case_number AS ‘Number1’, cases.name AS ‘Subject2’, cases.account_id AS ‘Account_Name3’, cases_cstm.paymentfe_c AS ‘Payment_to_FE4’, cases_cstm.bgvstatus_c AS ‘BGV_Status5’, DATE_FORMAT(cases.date_entered + INTERVAL 330 MINUTE,’%d/%m/%Y’) AS ‘Date_Created6’, DATE_FORMAT(cases.date_modified + INTERVAL 330 MINUTE,’%d/%m/%Y’) AS ‘Date_Modified7’, DATE_FORMAT(cases_cstm.bgvduedate_c,’%d/%m/%Y’) AS ‘BGV_Due_Date8’, DATE_FORMAT(cases_cstm.bgvreportsent_c,’%d/%m/%Y’) AS ‘BGV_Report_Sent_Date9’, cases_cstm.amounttopartner_c AS ‘Amount_To_Partner10’, cases_cstm.finalpartneronjobmobile_c AS ‘Final_Partner_on_Job_Mobile11’, cases.assigned_user_id AS ‘Assigned_to12’, cases:contacts_cstm.bankaddress_c AS ‘Partner_Bank_Address13’, cases:contacts.id AS ‘cases:contacts_id’ FROM cases LEFT JOIN cases_cstm cases_cstm ON cases.id = cases_cstm.id_c LEFT JOIN contacts_cases cases|cases:contacts ON cases.id=cases|cases:contacts.case_id AND cases|cases:contacts.deleted=0

LEFT JOIN contacts cases:contacts ON cases:contacts.id=cases|cases:contacts.contact_id AND cases:contacts.deleted=0
LEFT JOIN ``cases:contacts_cstm cases:contacts_cstm ON cases:contacts.id = cases:contacts_cstm.id_c WHERE ( (cases_cstm.bgvstatus_c = ‘ReportReceivedQAPending’ OR cases_cstm.bgvstatus_c = ‘QAinProcessQuerytoFE’ OR cases_cstm.bgvstatus_c = ‘QACallPending’ OR cases_cstm.bgvstatus_c = ‘QACompletedReportSent’) AND (cases_cstm.paymentfe_c != ‘FEBankDetailsReceived’ AND cases_cstm.paymentfe_c != ‘FEPaymentReleased’ AND cases_cstm.paymentfe_c != ‘NoPaymenttoFE’) AND cases_cstm.user_id1_c = ‘’ OR cases_cstm.user_id1_c IS NULL ) AND cases.deleted = 0 ) as n: MySQL error 1103: Incorrect table name ‘’

here is few more information you asked for…

I went from VPS to AWS by copy pasting all codebase, database & file system (Not installed all new SuiteCRM just copy pasted it).

php version : 5.5.9
mysql version : 5.5.54

Please direct toward solution

Thanking

Please reply to the above question in detail.

Have you checked that permissions have been updated after you have issued the commands to change them? Have you updated config.php with the correct file/folder permissions as well as owner/group?

What operating system are you on?

1 Like

Hello amariussi,

I have reset permissions after copying all files to the AWS instance.

and by correctly I meant as instructed in installation document …

sudo chown -R www-data:www-data .
sudo chmod -R 755 .
sudo chmod -R 775 cache custom modules themes data upload config_override.php 

permissions are updated after performing ‘Repair & Rebuild’, en_us.lang.php, en_us.js & templates files (.tpl & tpl.php) files in cache directory are being set to -rw-r–r-- or -rw-rw---- but again I reset them as mentioned above.

here is my config.php portion for permissions and user

array (
‘dir_mode’ => 1528,
‘file_mode’ => 432,
‘user’ => ‘’,
‘group’ => ‘’,
),

I am running on ubuntu 14.04

The fact that files are missing in the cache folder makes me think that you are facing permissions issues.

Normally I set permissions in config.php with the following values:
‘dir_mode’ => 1533, // 2775
‘file_mode’ => 493, // 755

However I have seen many other values being suggested.

It may help that you also set
‘user’ => ‘’,
‘group’ => ‘’,
to the correct values.

If you have enabled cron jobs you may end up having problems if user and group are not set correctly and/or cron jobs are run by a different user/group (you have to make sure they run with the same, while some times they run with root, which means errors). This problem seems to having being tackled in 7.8.3 that has come out this week (but I haven’t tried it yet).

Also make sure that you clear completely your browser cache or try using a different browser to see if you have the same problems.

Additionally you may increase system values in php.ini to high numbers:
max_execution_time = xx <-- try putting 3000
max_input_time = xx <-- 3000
max_input_vars = xx <— 10000
memory_limit = xx <— 500M
upload_max_filesize = xx <-- 256M

1 Like

Hello amariussi,

I change permissions suggested by you. and cleared all browser data several times.

performed repair & rebuild but no changes in situation. yet that piece of code is missed & the query is being generated with error (as I wrote above).

I also tried upgrade patch 7.8.3. the situation is the same though.

I enabled cron job but made sure that the user must be ‘www-data’ which is apache user in ubuntu 14.04
by
sudo crontab -u www-data -e

I had to add that code manually in /var/www/html/suitecrm782/cache/themes/SuiteR/modules/AOR_Reports/EditView.tpl after every repair and rebuild
and every time I run a particular report no data being fetched. and suitecrm log shows this (Wrong table name)…

Wed Apr 12 19:49:54 2017 [9957][359e3e4e-e469-f198-9e01-56ea6caeaf89][FATAL] [color=#0000ff]Query Failed[/color]: SELECT count(*) c FROM (SELECT cases.id AS ‘cases_id’, cases.case_number AS ‘Number0’, cases_cstm.bgvstatus_c AS ‘BGV_Status1’, DATE_FORMAT(cases_cstm.bgvreportsent_c,’%d/%m/%Y’) AS ‘BGV_Report_Sent_Date2’, cases_cstm.partnerbeneficiaryname_c AS ‘Partner_Beneficiary_Name3’, cases_cstm.partnerbeneficiarycode_c AS ‘Partner_Beneficiary_Code4’, cases_cstm.partnerbankname_c AS ‘Partner_Bank_Name5’, cases_cstm.partnerbankaccountno_c AS ‘Partner_Bank_Account_No6’, cases_cstm.partnerbankifsc_c AS ‘Partner_Bank_IFSC7’, cases_cstm.amounttopartner_c AS ‘Amount_To_Partner8’, cases_cstm.finalpartneronjobmobile_c AS ‘Final_Partner_on_Job_Mobile9’, cases.id AS ‘ID_(Case_ID)10’, cases.name AS ‘Subject11’, cases.account_id AS ‘Account_Name12’, cases_cstm.paymentfe_c AS ‘Payment_to_FE13’, cases_cstm.partnerpaymentoption_c AS ‘Partner_Payment_Option14’, cases:contacts.id AS ‘cases:contacts_id’, cases:contacts_cstm.beneficiaryname_c AS ‘Partner_Beneficiary_Name_(Contacts)15’, cases:contacts_cstm.partnerbeneficiarycode_c AS ‘Partner_Beneficiary_Code_(Contacts)16’, cases:contacts_cstm.partnerbankaccountno_c AS ‘Partner_Bank_Account_No_(Contacts)17’, cases:contacts_cstm.ifsccode_c AS ‘Partner_Bank_IFSC_(Contacts)18’, cases:contacts_cstm.bankname_c AS ‘Partner_Bank_Name_(Contacts)19’, cases:contacts_cstm.mobile1_c AS ‘Partner_Mobile_120’, cases:contacts.id AS ‘ID_(Contacts)21’, cases:contacts_cstm.partnerbankdetailsavailable_c AS ‘Partner_Bank_Details_Available22’ FROM cases LEFT JOIN cases_cstm cases_cstm ON cases.id = cases_cstm.id_c LEFT JOIN contacts_cases cases|cases:contacts ON cases.id=cases|cases:contacts.case_id AND cases|cases:contacts.deleted=0

LEFT JOIN contacts cases:contacts ON cases:contacts.id=cases|cases:contacts.contact_id AND cases:contacts.deleted=0
LEFT JOIN ``cases:contacts_cstm cases:contacts_cstm ON cases:contacts.id = cases:contacts_cstm.id_c WHERE ( cases_cstm.bgvstatus_c = ‘QACompletedReportSent’ ) AND cases.deleted = 0 ) as n: [color=#0000ff]MySQL error 1103: Incorrect table name ‘’[/color]
Wed Apr 12 19:49:54 2017 [9957][359e3e4e-e469-f198-9e01-56ea6caeaf89][FATAL] [color=#0000ff]Query Failed[/color]: SELECT cases.id AS ‘cases_id’, cases.case_number AS ‘Number0’, cases_cstm.bgvstatus_c AS ‘BGV_Status1’, DATE_FORMAT(cases_cstm.bgvreportsent_c,’%d/%m/%Y’) AS ‘BGV_Report_Sent_Date2’, cases_cstm.partnerbeneficiaryname_c AS ‘Partner_Beneficiary_Name3’, cases_cstm.partnerbeneficiarycode_c AS ‘Partner_Beneficiary_Code4’, cases_cstm.partnerbankname_c AS ‘Partner_Bank_Name5’, cases_cstm.partnerbankaccountno_c AS ‘Partner_Bank_Account_No6’, cases_cstm.partnerbankifsc_c AS ‘Partner_Bank_IFSC7’, cases_cstm.amounttopartner_c AS ‘Amount_To_Partner8’, cases_cstm.finalpartneronjobmobile_c AS ‘Final_Partner_on_Job_Mobile9’, cases.id AS ‘ID_(Case_ID)10’, cases.name AS ‘Subject11’, cases.account_id AS ‘Account_Name12’, cases_cstm.paymentfe_c AS ‘Payment_to_FE13’, cases_cstm.partnerpaymentoption_c AS ‘Partner_Payment_Option14’, cases:contacts.id AS ‘cases:contacts_id’, cases:contacts_cstm.beneficiaryname_c AS ‘Partner_Beneficiary_Name_(Contacts)15’, cases:contacts_cstm.partnerbeneficiarycode_c AS ‘Partner_Beneficiary_Code_(Contacts)16’, cases:contacts_cstm.partnerbankaccountno_c AS ‘Partner_Bank_Account_No_(Contacts)17’, cases:contacts_cstm.ifsccode_c AS ‘Partner_Bank_IFSC_(Contacts)18’, cases:contacts_cstm.bankname_c AS ‘Partner_Bank_Name_(Contacts)19’, cases:contacts_cstm.mobile1_c AS ‘Partner_Mobile_120’, cases:contacts.id AS ‘ID_(Contacts)21’, cases:contacts_cstm.partnerbankdetailsavailable_c AS ‘Partner_Bank_Details_Available22’ FROM cases LEFT JOIN cases_cstm cases_cstm ON cases.id = cases_cstm.id_c LEFT JOIN contacts_cases cases|cases:contacts ON cases.id=cases|cases:contacts.case_id AND cases|cases:contacts.deleted=0

LEFT JOIN contacts cases:contacts ON cases:contacts.id=cases|cases:contacts.contact_id AND cases:contacts.deleted=0
LEFT JOIN ``cases:contacts_cstm cases:contacts_cstm ON cases:contacts.id = cases:contacts_cstm.id_c WHERE ( cases_cstm.bgvstatus_c = ‘QACompletedReportSent’ ) AND cases.deleted = 0 ORDER BY DATE_FORMAT(cases_cstm.bgvreportsent_c,’%d/%m/%Y’) ASC LIMIT 0,70: [color=#0000ff]MySQL error 1103: Incorrect table name ‘’
[/color]Wed Apr 12 19:50:16 2017 [9957][359e3e4e-e469-f198-9e01-56ea6caeaf89][FATAL] [color=#0000ff]Query Failed[/color]: SELECT count(*) c FROM (SELECT cases.id AS ‘cases_id’, cases.case_number AS ‘Number0’, cases_cstm.bgvstatus_c AS ‘BGV_Status1’, DATE_FORMAT(cases_cstm.bgvreportsent_c,’%d/%m/%Y’) AS ‘BGV_Report_Sent_Date2’, cases_cstm.partnerbeneficiaryname_c AS ‘Partner_Beneficiary_Name3’, cases_cstm.partnerbeneficiarycode_c AS ‘Partner_Beneficiary_Code4’, cases_cstm.partnerbankname_c AS ‘Partner_Bank_Name5’, cases_cstm.partnerbankaccountno_c AS ‘Partner_Bank_Account_No6’, cases_cstm.partnerbankifsc_c AS ‘Partner_Bank_IFSC7’, cases_cstm.amounttopartner_c AS ‘Amount_To_Partner8’, cases_cstm.finalpartneronjobmobile_c AS ‘Final_Partner_on_Job_Mobile9’, cases.id AS ‘ID_(Case_ID)10’, cases.name AS ‘Subject11’, cases.account_id AS ‘Account_Name12’, cases_cstm.paymentfe_c AS ‘Payment_to_FE13’, cases_cstm.partnerpaymentoption_c AS ‘Partner_Payment_Option14’, cases:contacts.id AS ‘cases:contacts_id’, cases:contacts_cstm.beneficiaryname_c AS ‘Partner_Beneficiary_Name_(Contacts)15’, cases:contacts_cstm.partnerbeneficiarycode_c AS ‘Partner_Beneficiary_Code_(Contacts)16’, cases:contacts_cstm.partnerbankaccountno_c AS ‘Partner_Bank_Account_No_(Contacts)17’, cases:contacts_cstm.ifsccode_c AS ‘Partner_Bank_IFSC_(Contacts)18’, cases:contacts_cstm.bankname_c AS ‘Partner_Bank_Name_(Contacts)19’, cases:contacts_cstm.mobile1_c AS ‘Partner_Mobile_120’, cases:contacts.id AS ‘ID_(Contacts)21’, cases:contacts_cstm.partnerbankdetailsavailable_c AS ‘Partner_Bank_Details_Available22’ FROM cases LEFT JOIN cases_cstm cases_cstm ON cases.id = cases_cstm.id_c LEFT JOIN contacts_cases cases|cases:contacts ON cases.id=cases|cases:contacts.case_id AND cases|cases:contacts.deleted=0

LEFT JOIN contacts cases:contacts ON cases:contacts.id=cases|cases:contacts.contact_id AND cases:contacts.deleted=0
LEFT JOIN ``cases:contacts_cstm cases:contacts_cstm ON cases:contacts.id = cases:contacts_cstm.id_c WHERE ( cases_cstm.bgvstatus_c = ‘QACompletedReportSent’ ) AND cases.deleted = 0 ) as n[color=#0000ff]: MySQL error 1103: Incorrect table name ‘’[/color]
Wed Apr 12 19:50:16 2017 [9957][359e3e4e-e469-f198-9e01-56ea6caeaf89][FATAL] Query Failed: SELECT cases.id AS ‘cases_id’, cases.case_number AS ‘Number0’, cases_cstm.bgvstatus_c AS ‘BGV_Status1’, DATE_FORMAT(cases_cstm.bgvreportsent_c,’%d/%m/%Y’) AS ‘BGV_Report_Sent_Date2’, cases_cstm.partnerbeneficiaryname_c AS ‘Partner_Beneficiary_Name3’, cases_cstm.partnerbeneficiarycode_c AS ‘Partner_Beneficiary_Code4’, cases_cstm.partnerbankname_c AS ‘Partner_Bank_Name5’, cases_cstm.partnerbankaccountno_c AS ‘Partner_Bank_Account_No6’, cases_cstm.partnerbankifsc_c AS ‘Partner_Bank_IFSC7’, cases_cstm.amounttopartner_c AS ‘Amount_To_Partner8’, cases_cstm.finalpartneronjobmobile_c AS ‘Final_Partner_on_Job_Mobile9’, cases.id AS ‘ID_(Case_ID)10’, cases.name AS ‘Subject11’, cases.account_id AS ‘Account_Name12’, cases_cstm.paymentfe_c AS ‘Payment_to_FE13’, cases_cstm.partnerpaymentoption_c AS ‘Partner_Payment_Option14’, cases:contacts.id AS ‘cases:contacts_id’, cases:contacts_cstm.beneficiaryname_c AS ‘Partner_Beneficiary_Name_(Contacts)15’, cases:contacts_cstm.partnerbeneficiarycode_c AS ‘Partner_Beneficiary_Code_(Contacts)16’, cases:contacts_cstm.partnerbankaccountno_c AS ‘Partner_Bank_Account_No_(Contacts)17’, cases:contacts_cstm.ifsccode_c AS ‘Partner_Bank_IFSC_(Contacts)18’, cases:contacts_cstm.bankname_c AS ‘Partner_Bank_Name_(Contacts)19’, cases:contacts_cstm.mobile1_c AS ‘Partner_Mobile_120’, cases:contacts.id AS ‘ID_(Contacts)21’, cases:contacts_cstm.partnerbankdetailsavailable_c AS ‘Partner_Bank_Details_Available22’ FROM cases LEFT JOIN cases_cstm cases_cstm ON cases.id = cases_cstm.id_c LEFT JOIN contacts_cases cases|cases:contacts ON cases.id=cases|cases:contacts.case_id AND cases|cases:contacts.deleted=0

LEFT JOIN contacts cases:contacts ON cases:contacts.id=cases|cases:contacts.contact_id AND cases:contacts.deleted=0
LEFT JOIN ``cases:contacts_cstm cases:contacts_cstm ON cases:contacts.id = cases:contacts_cstm.id_c WHERE ( cases_cstm.bgvstatus_c = ‘QACompletedReportSent’ ) AND cases.deleted = 0 ORDER BY DATE_FORMAT(cases_cstm.bgvreportsent_c,’%d/%m/%Y’) ASC LIMIT 0,70: [color=#0000ff]MySQL error 1103: Incorrect table name ‘’[/color]

additionally I have set all parameters as suggested in php.ini

Please Direct toward solution

Thanking.

In one of your previous messages you wrote:

Since the cache folder is being generated automatically it could be that the missing files should be also somewhere else. But they may not be in the place where they should be so they can’t be copied to the cache folder (which contains the files that are actually used).

Can you try to look for the same files in your new setup that works outside the cache folder? It may be better that you copy them to this location instead of cache. (Do a full backup before!).

I tried looking for those files both in a working instance as well as in a fresh install but I couldn’t find them.
Are they related to customisations that you have made?

Digging further I searched for the missing code and I found it in the following file:
SuiteCRM-7.8.2/modules/AOR_Reports/tpls/EditViewHeader.tpl

Please check if the file named EditViewHeader.tpl is present in folder modules/AOR_Reports/tpls/

If it’s not there make a copy from your working installation then run Quick Repair and Rebuild and check if the code is still missing in the cache folder.

If now this problem has been resolved it may not mean that all problems have been resolved. It could be that during an install or an upgrade some files were not copied correctly so you would have to go back and check the logs for those events to try to understand what happened and find out if other files are missing or were corrupted.

1 Like