Posted: September 18, 2024 at 7:43 am
If I try and export registrations I get taken to a url (******.csv) showing all the registrations but no download option is visible. How do I get an actual CSV file or how do I use a website url with .csv at the end to open in Numbers on my Mac? |
|
Hi there, This is usually due to an incorrect MIME type set up on the server, in short, the server is sending the CSV HTML/TEXT so the browser simply displays it. If you open a ticket with your host and ask them to add this mime type to the server:
Or this may also work:
Does the file then download? |
|
This reply has been marked as private. | |
Hi Faith,
That’s for something different. That’s to allow you to upload different filetypes within WordPress and that’s not what the issue is here.
You don’t, thats not what is needed here. To explain a little, the way in which EE sends the file to the browser hasn’t changed in years and is pretty much standard across all files. What changes is how your server handles MIME types and that then breaks downloads. When you click to download a file the server sends back the contents of that file in a specific format, the MIME type is a way to tell the browser what the file is and what it should do with it. So when this happens it’s usually becuase the server is saying “here’s a file and the MIME is text/HTML”… your browser says “Oh… this .csv is text/HTML? That’s for me to display!” and so it displays it on the page rather than downloading it (I’m overly simplifying this somewhat but the idea is the same). We (EventEspresso) already set a mime type within the directory but the server can (and often does) override that. So it may have worked previously and then you server changed PHP versions and now uses different MIME types than what it did previously… which now break the output. This is a common issue and your host should be able to fix this for you with a code change server side.
The CSV issue, is minor. It’s just mixing up the MIME type to tell what the browser should do with the file, it won’t be causing any other issues. Having missing registrations between MailChimp and EE can be caused by so many different things it’s hard to say. Some of those email addresses may have previously unsubscribed (MailChimp doesn’t resubscribe an emailn when you issue a subscribe call on an archived/unsubscribed email address, that is by design on their end). There may have been an error on the request (generally you’d see an error on the page then or something within the logs). But all in all, the 2 issues you’ve mentioned so far don’t point to a major issue here. |
|
This reply has been marked as private. | |
Hi Faith, Just wanted to check in and see how you got on with this? If you have FTP access to the site I can add the MIME type for you if that helps? (We recommend contacting your host to have them do it as they’ll have more access and know how their servers are set up) |
|
Might be posting this twice but think it didn’t submit just now so trying again: WP Engine eventually got back to me and said to add the following to the functions php file: function add_custom_mime_types($mimes) { return $mimes; This doesn’t work though. I get a red error message if I try to download the CSV file. Many thanks |
|
Yeah, thats going to fix this, your issue has nothing to do with Mind if I take a look? I’ll need WP admin FTP credentials if you have them and you can send them over using this form: |
|
I filled in the form! |
|
This reply has been marked as private. | |
This reply has been marked as private. | |
Hi Faith, Ok, so this is indeed something that WPEngine needs to fix on their side. The above reply they gave is based on changing what YOU can upload to your WordPress site and which MIME types are allowed for you to do that. It’s basically this article: https://wpengine.com/support/mime-types-wordpress/ That’s NOT what the issue is here. — Event Espresso generates the report within a CSV file in We generate the CSV file and a
To tell the server what MIME type to use for that file type, however, IIRC WPEngine uses Nginx and that will ignore the above file, meaning it relies solely on their server set up. They currently return This is NOT something you can fix with a snippet and they need to change it on the server for you. You can copy and paste the above (and even a link to this thread if preferred) within a ticket to WPEngine, if you get the same reply about using the The problem is the response from their sever for CSV files and not related to uploading files at all. See: https://monosnap.com/file/Rgu1vezJhaWlaIESAalpryT9wA601Y — I have a workaround for you for the time being but I still recommend you work through the above. When you click to generate the CSV and it displays the content, right click (command + click) on the page and do Save As. The dialog should show up with the filename showing Type should show as .CSV, something like this: Save the file and then open it, it should now open in whatever app you use to view them. (Note – I’m a Windows user and have very little experience with Mac’s so forgive the ‘Windows-isms’) |
|
This reply has been marked as private. | |
This reply has been marked as private. | |
This reply has been marked as private. | |
You must be logged in to reply to this support post. Sign In or Register for an Account