Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Exporting to CSV results in PHP fatal error 'Class "PhpOffice\PhpSpreadsheet\Spreadsheet" not found' #525

Open
newton730ia opened this issue Jan 11, 2022 · 1 comment
Assignees
Labels

Comments

@newton730ia
Copy link

newton730ia commented Jan 11, 2022

Exporting to CSVs results in 500error/PHP error

[11-Jan-2022 13:02:12 UTC] PHP Fatal error:  Uncaught Error: Class "PhpOffice\PhpSpreadsheet\Spreadsheet" not found in /wp-content/plugins/torro-forms/src/components/submission-export-csv.php:47
Stack trace:
#0 /wp-content/plugins/torro-forms/src/components/submission-export.php(132): awsmug\Torro_Forms\Components\Submission_Export_CSV->generate_export_from_data()
#1 /wp-content/plugins/torro-forms/src/components/submission-export-handler.php(95): awsmug\Torro_Forms\Components\Submission_Export->export_submissions()
#2 /wp-content/plugins/torro-forms/src/components/submission-export-handler.php(155): awsmug\Torro_Forms\Components\Submission_Export_Handler->export_submissions()
#3 /wp-includes/class-wp-hook.php(301): awsmug\Torro_Forms\Components\Submission_Export_Handler->handle_export_action()
#4 /wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
#5 /wp-includes/plugin.php(470): WP_Hook->do_action()
#6 /wp-admin/admin.php(408): do_action()
#7 {main}
  thrown in /wp-content/plugins/torro-forms/src/components/submission-export-csv.php on line 47

In submission-export-csv.php
use PhpOffice\PhpSpreadsheet\Spreadsheet; and later $spreadsheet = new Spreadsheet(); is called, but PhpOffice is not included any more in vendor-directory.

Version 1.0.16

Problem stems from removing XLS-Library in commit a6ee357 without rewriting the CSV-export (still uses now removed library)

@newton730ia newton730ia changed the title Bug: Exporting to CSV results PHP fatal error 'Class "PhpOffice\PhpSpreadsheet\Spreadsheet" not found' Bug: Exporting to CSV results in PHP fatal error 'Class "PhpOffice\PhpSpreadsheet\Spreadsheet" not found' Jan 11, 2022
@mahype
Copy link
Contributor

mahype commented Jan 11, 2022

Thank you for submitting! I will check this.

@mahype mahype self-assigned this Jan 12, 2022
@mahype mahype added the bug label Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants