Hi - I just loaded report builder and set up a template.
I get a critical error when I try to download the report.
I've checked that Zip Archive is installed on my server and the Host has told me that Apache doesn't need to be re-started, but I still get the critical error.
I am also getting a more general WPDatatables error of:
Notice: Undefined index: table in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/wpdatatables/source/class.wpdatatable.php on line 1635
Line 1635 is: $tableName = $parsedQuery['FROM'][0]['table'];
I don't understand what this parsed query relates to. I am using URL filters using this extension "?wdt_column_filter[0]=" - is it related to that? The filtering is working fine.
So I'm unclear if this error is related to my report builder critical error or slow rendering problem or something different.
I can't say what the issue is with the report builder without logging into your website. That's a generic error, and it's not telling me anything.
table id=table_2 is not the ID of your wpDataTable, but the wpdatatable object, as seen in our developers' documentation. So, it's probably related to the second table on your page.
The invalid JSON response error is usually seen when something blocks the admin-ajax call the table is making, resulting in a broken JSON. It can be blocked by security plugins (such as WordFence), but it can also be blocked by some security measures on your server, so you may want to reach out to your hosting provider about that.
Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party.
You can write credentials here just check Private Reply so nobody can see them except us.
I can see that both tables (#37 and #80) have subqueries in them, and wpDataTables' server has problems parsing queries like this.
I also noticed the invalid JSON issue on table #54, but I didn't go through all of them.
The issue is in the query, and the ability of our PHP SQL parser to parse the query and add new query dynamically. To avoid this, you should prepare a MySQL view (a stored query), which will return the data that you need; call it “view1” (for example), and then build a wpDataTable based on a simple query like “SELECT * FROM view1″.
Please note some this when working with the server-side processing feature:
Please do not use “LIMIT” in the SELECT statement. wpDataTables adds it automatically and it will be overridden.
Please do not use “ORDER BY” in the SELECT statement. wpDataTables has its own sorting engine so it makes no sense to use MySQL’s sorting, since it will be overridden. Also, server-side processing feature adds this part of statement automatically when users trigger the sorting on the front-end, and having it in the initial statement may cause the table to crash.
This report button is on a page within a Group in Buddypress (Buddypages/Youzer), but even when I run it on a standard WP page I still get the critical error. I'm at a loss what else to try.
I used code from this website in reportbuilder.php file to display the actual error behind the Critical error, and this is what I got (you can see fro the attached screenshot that it's coming from your website):
Fatal error: Uncaught Error: Class 'ZipArchive' not found in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php:134 Stack trace: #0 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/TemplateProcessor.php(88): PhpOffice\PhpWord\Shared\ZipArchive->open('/tmp/PhpWord1Ji...') #1 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.template.processor.extend.php(13): PhpOffice\PhpWord\TemplateProcessor->__construct('/home/c3ovyi30c...') #2 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.document.builder.php(61): WDTReportBuilder\TemplateProcessorExtend->__construct('/home/c3ovyi30c...') #3 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.document.builder.php(256): WDTReportBuilder\DocumentBuilder->fillInSingleFile() #4 /home/c3ovyi30chcr/public_html/50metres.com/wp-cont in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php on line 134
Maybe the Zip Archive you have installed is out of date? I don't know, but it can't be found by the Report Builder - that's why it's failing.
Aleksander - the report builder worked for a few test downloads but then gave me a critical error again which does not seem to refer to Zip Archive - it refers to WDTTools
Fatal error: Uncaught Error: Call to a member function setGenerationLogic() on null in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.reportbuilder.php:422 Stack trace: #0 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/reportbuilder.php(314): WDTReportBuilder\ReportBuilder->build() #1 /home/c3ovyi30chcr/public_html/50metres.com/wp-includes/class-wp-hook.php(287): WDTReportBuilder\Plugin::downloadReport('') #2 /home/c3ovyi30chcr/public_html/50metres.com/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array) #3 /home/c3ovyi30chcr/public_html/50metres.com/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #4 /home/c3ovyi30chcr/public_html/50metres.com/wp-admin/admin-ajax.php(176): do_action('wp_ajax_report_...') #5 {main} thrown in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.reportbuilder.php on line 422
Looking at the error I reset my activation codes (because I had tried to deactivate and reactivate the report builder plugin), And now I get another Zip Archive error -
Warning: ZipArchive::getFromName(): Invalid or uninitialized Zip object in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php on line 201
Warning: ZipArchive::getFromName(): Invalid or uninitialized Zip object in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php on line 204
Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php on line 163
Fatal error: Uncaught PhpOffice\PhpWord\Exception\Exception: Could not close zip file /tmp/PhpWordAsXp7L: in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php:164 Stack trace: #0 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/TemplateProcessor.php(403): PhpOffice\PhpWord\Shared\ZipArchive->close() #1 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/TemplateProcessor.php(419): PhpOffice\PhpWord\TemplateProcessor->save() #2 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.document.builder.php(161): PhpOffice\PhpWord\TemplateProcessor->saveAs('/tmp/strategy-s...') #3 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.document.builder.php(256): WDTReportBuilder\DocumentBuilder->fillInSingleFile() #4 /home/c3ovyi30chcr/public_html/50metres.co in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php on line 164
The host team tell me that this is a problem with the plugin - that it seems to be sometimes accessing zip and sometimes not.
Hi - I just loaded report builder and set up a template.
I get a critical error when I try to download the report.
I've checked that Zip Archive is installed on my server and the Host has told me that Apache doesn't need to be re-started, but I still get the critical error.
Any suggestions on where else I look?
Andrew
Debugging the critical error I get a series of identical errors which all refer to tables that don't exist:
DataTables warning: table id=table_2 - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1
I don't have a table_2 ?
I am also getting a more general WPDatatables error of:
Notice: Undefined index: table in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/wpdatatables/source/class.wpdatatable.php on line 1635
Line 1635 is:
$tableName = $parsedQuery['FROM'][0]['table'];
I don't understand what this parsed query relates to. I am using URL filters using this extension
"?wdt_column_filter[0]=" - is it related to that? The filtering is working fine.
So I'm unclear if this error is related to my report builder critical error or slow rendering problem or something different.
Hello Andrew
I can't say what the issue is with the report builder without logging into your website. That's a generic error, and it's not telling me anything.
table id=table_2 is not the ID of your wpDataTable, but the wpdatatable object, as seen in our developers' documentation. So, it's probably related to the second table on your page.
The invalid JSON response error is usually seen when something blocks the admin-ajax call the table is making, resulting in a broken JSON. It can be blocked by security plugins (such as WordFence), but it can also be blocked by some security measures on your server, so you may want to reach out to your hosting provider about that.
Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party.
You can write credentials here just check Private Reply so nobody can see them except us.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello again Andrew
I can see that both tables (#37 and #80) have subqueries in them, and wpDataTables' server has problems parsing queries like this.
I also noticed the invalid JSON issue on table #54, but I didn't go through all of them.
The issue is in the query, and the ability of our PHP SQL parser to parse the query and add new query dynamically. To avoid this, you should prepare a MySQL view (a stored query), which will return the data that you need; call it “view1” (for example), and then build a wpDataTable based on a simple query like “SELECT * FROM view1″.
Please note some this when working with the server-side processing feature:
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Aleksander
Unfortunately I'm still getting a critical error when trying to run the Report Builder.
As you suggested I created a View (customerstrategyreport) and then created a Table (Customer Strategy Report #103) with the simplest query:
SELECT * FROM customerstrategyreport
Then I created the report referencing this new table, but still I get the critical error.
I'm not sure what else to try - the Host says everything is working from a security perspective.
If you log in with the details I previously provided and navigate to this page:
https://50metres.com/groups/aafiya/client-strategic-plans/?wdt_column_filter[0]=aafiya
You will see the report button.
This report button is on a page within a Group in Buddypress (Buddypages/Youzer), but even when I run it on a standard WP page I still get the critical error. I'm at a loss what else to try.
Andrew
Hello again Andrew
I used code from this website in reportbuilder.php file to display the actual error behind the Critical error, and this is what I got (you can see fro the attached screenshot that it's coming from your website):
Fatal error: Uncaught Error: Class 'ZipArchive' not found in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php:134 Stack trace: #0 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/TemplateProcessor.php(88): PhpOffice\PhpWord\Shared\ZipArchive->open('/tmp/PhpWord1Ji...') #1 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.template.processor.extend.php(13): PhpOffice\PhpWord\TemplateProcessor->__construct('/home/c3ovyi30c...') #2 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.document.builder.php(61): WDTReportBuilder\TemplateProcessorExtend->__construct('/home/c3ovyi30c...') #3 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.document.builder.php(256): WDTReportBuilder\DocumentBuilder->fillInSingleFile() #4 /home/c3ovyi30chcr/public_html/50metres.com/wp-cont in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php on line 134
Maybe the Zip Archive you have installed is out of date? I don't know, but it can't be found by the Report Builder - that's why it's failing.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thank you SOO much Aleksander - that helped me convince by host provider (GoDaddy) that the error was on the server.
It took me 3 attempts, but I finally found someone who understood the issue and could fix the problem which was 100% at their end.
Please close this ticket - thanks!
Aleksander - the report builder worked for a few test downloads but then gave me a critical error again which does not seem to refer to Zip Archive - it refers to WDTTools
Fatal error: Uncaught Error: Call to a member function setGenerationLogic() on null in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.reportbuilder.php:422 Stack trace: #0 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/reportbuilder.php(314): WDTReportBuilder\ReportBuilder->build() #1 /home/c3ovyi30chcr/public_html/50metres.com/wp-includes/class-wp-hook.php(287): WDTReportBuilder\Plugin::downloadReport('') #2 /home/c3ovyi30chcr/public_html/50metres.com/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array) #3 /home/c3ovyi30chcr/public_html/50metres.com/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #4 /home/c3ovyi30chcr/public_html/50metres.com/wp-admin/admin-ajax.php(176): do_action('wp_ajax_report_...') #5 {main} thrown in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.reportbuilder.php on line 422
Looking at the error I reset my activation codes (because I had tried to deactivate and reactivate the report builder plugin), And now I get another Zip Archive error -
Warning: ZipArchive::getFromName(): Invalid or uninitialized Zip object in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php on line 201
Warning: ZipArchive::getFromName(): Invalid or uninitialized Zip object in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php on line 204
Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php on line 163
Fatal error: Uncaught PhpOffice\PhpWord\Exception\Exception: Could not close zip file /tmp/PhpWordAsXp7L: in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php:164 Stack trace: #0 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/TemplateProcessor.php(403): PhpOffice\PhpWord\Shared\ZipArchive->close() #1 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/TemplateProcessor.php(419): PhpOffice\PhpWord\TemplateProcessor->save() #2 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.document.builder.php(161): PhpOffice\PhpWord\TemplateProcessor->saveAs('/tmp/strategy-s...') #3 /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/source/class.document.builder.php(256): WDTReportBuilder\DocumentBuilder->fillInSingleFile() #4 /home/c3ovyi30chcr/public_html/50metres.co in /home/c3ovyi30chcr/public_html/50metres.com/wp-content/plugins/reportbuilder/lib/phpoffice/phpword/src/PhpWord/Shared/ZipArchive.php on line 164
The host team tell me that this is a problem with the plugin - that it seems to be sometimes accessing zip and sometimes not.
I dont know who is correct now.
All sorted now. Sorry to have bothered you.
Hey Andrew
Sorry for the late response.
I'm glad to hear the issue is resolved.
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables