Support

Home Forums Event Espresso Premium CSV Export Renders Text

CSV Export Renders Text

Posted: October 22, 2015 at 9:13 am


Melissa Rogozinski

October 22, 2015 at 9:13 am

Our CSV export function for registrations stopped working correctly sometime between 10/1 and yesterday. Whereas the exports for all registrations or event level registrations correctly exported a CSV file previously, now the function simply renders the text in the browser and fails to insert line breaks.

The data is usable by reconstructing it using a find/replace to find the first field (TXN ID) and inserting an line break ahead of it.

We haven’t made any significant plugin or other configuration changes aside from updates since it worked correctly.

We are running:
WP 4.3 8/18/2015
EE 4.8.17.p 10/22/2015
PHP 5.5.29-1~dotdeb+7.1

System:
Linux #####-#####.cloudwaysapps.com 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64


Tony

  • Support Staff

October 22, 2015 at 9:30 am

Hi Melissa,

Which application do you normally use to open up the CSV?

Has you browser been set top open up CSV files automatically?


Melissa Rogozinski

October 22, 2015 at 10:16 am

Hi Tony,

I believe the issue is server side. The rendered text is not CSV compliant without some manual processing and appears across multiple browsers.

I have tried IE 11.0.96, Chrome 46.0.2490.71 m and FireFox 41.0.2 on this Windows 7 workstation as well as Chrome on a Surface Pro 3 running Windows 8.

The text rendered looks like this:

”Transaction ID[TXN_ID]”,”Attendee ID[ATT_ID]”,”Registration ID[REG_ID]”,”Time registration occurred[REG_date]”,”Unique Code for this registration[REG_code]”,”Count of this registration in the group registration [REG_count]”,”Registration’s share of the transaction total[REG_final_price]”,Currency,”Registration Status”,”Transaction Status”,”Transaction Amount Due”,”Amount Paid”,”Payment Date(s)”,”Payment Method(s)”,”Gateway Transaction ID(s)”,Check-Ins,”Ticket Name”,”Datetimes of Ticket”,”First Name[ATT_fname]”,”Last Name[ATT_lname]”,”Email Address[ATT_email]”,”Address Part 1[ATT_address]”,”Address Part 2[ATT_address2]”,City[ATT_city],State[STA_ID],Country[CNT_ISO],”ZIP/Postal Code[ATT_zip]”,Phone[ATT_phone],positiontitle,company-name,company-type,”On-site vs WebEx” 17774,1644,495,”2015-10-06 13:39:00″,17774-38-1-054c,”1 of 1″,39.00,USD,Approved,Complete,39.00,39.00,”2015-10-06 18:42:00″,Stripe,1N963536TX417753Y,0,”I DO want CLE credit.”,”2015-10-29 16:00:00″,XXFIRSTXX,XXLASTXX,XXEMAILXX,”XXADDRESSXX”,,Nashville,Tennessee,”United States”,37219,XXPHONEXX,”XXTITLEXX”, 17775,1265,496,”2015-10-06 13:51:00″,17775-42-1-e497,”1 of 1″,0.00,USD,Approved,Complete,0.00,0.00,,,,0,”I do NOT want CLE credit.”,”2015-10-29 16:00:00″,XXFIRSTXX,XXLASTXX,XXEMAILXX,”XXADDRESSXX”,,Washington,”District of Columbia”,”United States”,20006,XXPHONEXX,”XXTITLEXX”,”XXCOMPANYXX”,”Law Firm”,…..

(Fields redacted for privacy reasons.)


Lorenzo Orlando Caum

  • Support Staff

October 22, 2015 at 10:38 am

Hi Melissa,

This could be caused by a conflict with another plugin or it could be a setting on the server.

Does it work as expected when only Event Espresso is activated? If not, then please try the steps below:

If you are able to see the CSV information but it is loading in a webpage, then please try the second solution on this page:

http://www.lasalle.edu/~blum/c341wks/CSVwithHTACCESS.php

If you click on the first button on that page, then you’ll see that it loads in your web browser. If you click on the second, then you’ll see that it downloads. We want your site to download the file. Could you try adding the following line to your htaccess file on your site?

AddType application/octet-stream .csv

The htaccess file can be found in the WordPress root which is the location for the wp-content, wp-admin, wp-includes and other files. You can access it by using an SFTP or FTP client such as FileZilla or Cyberduck.


Lorenz


Melissa Rogozinski

October 23, 2015 at 8:07 am

Hi Lorenzo,

Thanks for your help!

The one change we have made was adding a site plugin to move some posts into a custom post type with a unique taxonomy. There was a formatting error in the plugin that appears to have broken the CSV export.

What is still odd to me is that the text rendered is not CSV compliant so it’s not just failing to export, but failing to compile correctly. Regardless, the issue appears to be fixed!

Thanks for your help.


Lorenzo Orlando Caum

  • Support Staff

October 23, 2015 at 8:58 am

Hi Melissa,

Could you tell us more about this?

What is still odd to me is that the text rendered is not CSV compliant so it’s not just failing to export, but failing to compile correctly. Regardless, the issue appears to be fixed!

If you open the csv file in a program like Google sheets, Numbers, or Excel, does it appear broken?


Lorenzo


Melissa Rogozinski

October 23, 2015 at 11:10 am

The exported CSV file works fine, but when it simply renders in the browser the beginning of the text string starts with “”, many of the fields appear in quotation marks, and no line breaks are included.

Copying the text into a text processor allows me to strip the “” and quotes. Then I have to do a tricky find and replace to insert a carriage return before the “TXN” field which then breaks the single text string into unique records.

The sample above is the exact text output (fields data redacted) for the first two records and header.

Thankfully the pattern “17774,1644,495,” indicates the first three fields so a search for NNNNN,NNNN,NNN can replace these strings with ¶NNNNNNNNN,NNN to insert the carriage return and delineate unique records.

At that point the file is pretty close to the usual exported CSV.

Regardless, the issue appears resolved and the conflicting taxonomy creation was corrected. We’ll have a better idea of what to look for if this happens again.

Thanks again!


Lorenzo Orlando Caum

  • Support Staff

October 23, 2015 at 11:22 am

Hi, the upside down question mark should not be appearing so that isn’t normal. Does the same thing happen when only Event Espresso 4 is running?


Lorenzo

The support post ‘CSV Export Renders Text’ 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