Support

Home Forums Event Espresso Premium CSV Download not working correctly

CSV Download not working correctly

Posted: March 18, 2019 at 2:17 pm

Viewing 4 reply threads


webmike

March 18, 2019 at 2:17 pm

Hello, I run EE version 4.9.79.p, with PHP 7.

1) When I export registrations, I get a page not found, however the file is in the batch_temp_folder, so I can download it via FTP (a little cumbersome, but not the biggest deal). However:
a) When I click on “All registration CSV Report” no matter if for all registrations or just one event, the CSV file is empty.
b) When I click on “Filtered CSV Report”, only then the CSV is populated and fine.
I have tried to set the permissions of the batch_temp_folder wp-content/uploads/espresso to 777 – to no avail.
Why does the export create a subfolder in the batch_temp_folder with a name like iola2sAO7vqeRjg and each of these subfolders have their own htaccess file and index.php file. The index says “You are not permitted to read from this folder” and the htaccess says “AddType application/ms-excel csv”

I have also disabled Wordfence and there is no other security plugin, and still no change in the above behavior.

FYI: I haven’t setup a payment method yet, so i am just exporting abandoned registrations, but I think that shouldn’t matter, right?

2) Is there a way to export the transactions that include all the registration data, including which tickets each transaction had, and including custom questions?
Basically I do not want the CSV report to have the tickets separately, I would like to have one line per transaction.

Thanks so much for your help!


webmike

March 18, 2019 at 2:20 pm

PS: for 1) a) I meant to say…the CVS file is empty and only includes the header row.


Tony

  • Support Staff

March 18, 2019 at 5:18 pm

Hi there,

Why does the export create a subfolder in the batch_temp_folder with a name like iola2sAO7vqeRjg and each of these subfolders have their own htaccess file and index.php file.

It’s a batch export system and those randomly named directories would normally be deleted once the file had been sent to the browser.

With the current system, EE pulls in X amount of registrations (by default 50), builds the array that is used to generate the report and then writes that ‘batch’ to a temp file. It loops over until all of the registrations have been written to the file and then its sent t the browser to download.

That process obviously needs a location to hold the temp file for each batch to write to etc and that’s what you see in /wp-content/uploads/espresso/batch_temp_folder

Previously, all registrations would be pulled in a single request, the CSV constructed and streamed directly to the browser, that’s fine for ‘lower’ volumes of registrations but not when you start getting thousands as the request will time out.

Note – that ‘old’ system is still included within EE and you can activate by adding define('EE_USE_OLD_CSV_REPORT_CLASS', true); to your wp-config.php file, notice the difference once you click the Registration Report button and you’ll see what I’m referring to.

So if you try the old system, does that work as expected?

Have you checked the server’s error log to see if any error are being thrown during the export?

FYI: I haven’t setup a payment method yet, so i am just exporting abandoned registrations, but I think that shouldn’t matter, right?

Correct, it should make no difference.

2) Is there a way to export the transactions that include all the registration data, including which tickets each transaction had, and including custom questions?
Basically I do not want the CSV report to have the tickets separately, I would like to have one line per transaction.

No currently, it’s designed to be a registration report rather than a transaction report.

The output is filtered so you can change what is included, but for what I think you want it’s pulling the data in a completely different way.


webmike

March 18, 2019 at 7:06 pm

Hi Tony,

thanks for your quick reply.

1) Yes I have tried adding define(‘EE_USE_OLD_CSV_REPORT_CLASS’, true); to mywp-config.php file after reading about it previously and I can download the csv file fine via both buttons, but both files are empty (only with header rows).

I have checked the server logs and found no errors.

So now I have updated my PPH version to 7.1.14, closed all browser windows and logged out of WP, logged back in and now the download works, but only clicking on “Filtered CSV Report” will give me any data. Clicking on “All registration CSV Report” will download the file, but empty. So for now that’s okay. I can just use the Filtered CSV Report button.

2) Any plans to add the download transactions functionality?


Tony

  • Support Staff

March 19, 2019 at 10:43 am

1) Yes I have tried adding define(‘EE_USE_OLD_CSV_REPORT_CLASS’, true); to mywp-config.php file after reading about it previously and I can download the csv file fine via both buttons, but both files are empty (only with header rows).

Ok, so that means this is specific to the batch process and an error is happening when EE either pulls the data from the DB or builds the array used to create the CSV.

I have checked the server logs and found no errors.

Is your server set to log errors? Can you see other errors around that time unrelated to EE? It seems odd that no error at all is being thrown in the above situation.

Try adding this code to your wp-config.php file:

https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug

Add that above the lines that has /* That's all, stop editing! Happy blogging. */ (usually WP_Debug will be set to false in your wp-config.php file by default, I’d replace that line with the above).

Then run an export and see if anything is shown in /wp-content/debug.log

Are you using any custom functions to customize the output of the CSV at all? If so, disable those for now.

So now I have updated my PPH version to 7.1.14, closed all browser windows and logged out of WP, logged back in and now the download works, but only clicking on “Filtered CSV Report” will give me any data. Clicking on “All registration CSV Report” will download the file, but empty. So for now that’s okay. I can just use the Filtered CSV Report button.

Whilst you may well get a report using that button, something is obviously wrong and it may be a clue to a bigger problem, so I’d advise troubleshooting this further to see if we can identify the cause.

2) Any plans to add the download transactions functionality?

We have plans for an Advanced Reporting add-on, which can be found here:

https://trello.com/c/59CBe7aj/117-advanced-reporting-add-on

However we are working on other areas of the plugin currently, so its unlikely to be released any time ‘soon’.

Viewing 4 reply threads

The support post ‘CSV Download not working correctly’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso