Posted: June 26, 2021 at 11:30 pm
Hi, |
|
Hi Mark, Event Espresso hasn’t included those DB fields in the CSV headers since version 4.9.69.p with the exception of when you have code hooking into So, starting from the beginning, do you have any custom code hooking into |
|
Hi Tony,
No, I dont have any custom hook into FHEE__EE_Export__report_registrations__reg_csv_array. |
|
Ok, so I assume you are using the latest version of EE4? When you click on the export button does it take you to another page with a progress bar and then the file downloads? Or does the file just instantly download when you click? |
|
Hi,
This is my scenario. |
|
Ok, so I assume you are using the latest version of EE4? |
|
My EE version is 4.10.10.p. |
|
Ok, so that version definitely wouldn’t add the columns by default. The ‘progress bar’ page I mentioned above means you are using the batch system, again meaning the DB column wouldn’t be added by default. The only time those values would be added with the above is if you are hooking into Or, the DB field names can be explicitly set to load using You’ve said you arent’ hooking into the above, but there must be some custom code somewhere as we don’t add those fields into the CSV anymore. If you test this with only Event Espresso running and a default theme, do the files no longer show? |
|
Hi Tony, |
|
Yes, I gathered, however as mentioned, EE does not inject those fields unless you are using those hooks or you’re using the old CSV export (without the progress bar). If you aren’t hooking into those features and your using the latest version then it doesn’t make any sense that you have those fields.
Wait…. so you don’t have the progress bar? Did the progress bar appear previously? Are you defining |
|
Sorry Tony for the misguidance actually we have a team of developers after discussion I got to know that we are using this define(‘EE_USE_OLD_CSV_REPORT_CLASS’, true); in our config.php |
|
Ok, so that means you don’t get a progress bar and the file instantly downloads as you are using the old export system…. which explains why you have the DB field names.
May I ask why you need the old CSV system to do that? The new system has a filter for the filename so you can change it to whatever you need:
Have one of you developers first remove Then run a registration report and confirm that you first see a progress bar and that the CSV headers no longer include the DB field names. After that, have one of those developers hook into the filename using the above and set it to be whatever you need to use. |
|
Hi Tony, |
|
You can use the filter I mentioned above:
With that, you can change the filename to whatever you prefer. Including the event slug in the filename is possible if the report is for a specific event (Event Espresso -> Events -> {hover over event} -> Registrations), if it’s not then EE won’t know which event the report is for. Just check the request to see if |
|
Could you please provide lines of codes to do the trick? Thanks. |
|
I have been using this code to make file name according to eventID
When I click on generate CSV button it leads to the progress bar and then leads to 500 Internal Server error. |
|
Yeah, that code will break as your returning nothing but an Event ID also if no EVT_ID is set on the request you return nothing at all (which breaks the filter). You’ll need something like this: https://gist.github.com/Pebblo/9053b0c939f039e3d97dd1de558fd18d Note that generally, we don’t provide support for customizations/custom code (such as the above) although I’m more than happy to help point you in the right direction. |
|
The support post ‘Remove database tags from the CSV report header’ 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.