Import Not Working
-
We are trying to import a csv file created from your template, but it’s saying it is not a valid csv file. It only has one row in it. How can we import?
-
Sounds like you have an error in your CSV file. What did you use to edit it?
We used Excel. We opened the template, then pasted the information in, one column at a time. We have run the file through a CSV checker, and it says it’s valid.
-
This reply was modified 2 years, 3 months ago by
trainfitnessint.
Do you have a link to the CSV file?
And what is the exact error, can you post a screenshot? And are there any entries in the Site Reviews > Tools > Console?
Well, your date format is invalid.

It should be
01/20/2017 09:43:04(i.e. MM/DD/YYYY HH:MM:SS)Still not working. We changed the date to DD/MM/YYYY and selected that on the import. Still not working.
Worked for me.


Just not working here – https://app.screencast.com/86F47SjzgV8On
Site Reviews checks the mime type of the uploaded file and expects
text/csv. If you are getting a “The import file is not a valid CSV file” error, it means that the uploaded file had a different mime type than what was expected.Check it here: https://mimetype.io/

Since the import worked for me but not you, could it maybe be due to the browser you are using?
We downloaded your file and pasted the info into that, saved it and then tried to upload. So are you saying the server is not allowing the mime type, or the mime type of the file has been changed somehow?
Have downloaded your file again. Added the content again. It’s still not importing. Same error.
- When you drop the CSV file into https://mimetype.io/, does it say text/csv? If not, what does is show?
- Have you tried with a different browser? I’d be interested to know if the browser has anything to do with it.
- Also try this: Open the CSV file in Notepad (since you are using Windows), make a small change to the text and then save it. Does that work? Maybe Excel is saving it with a different mime type.
- Last resort, I can tell you which line in the plugin code to comment out to bypass the mime type check.
-
This reply was modified 2 years, 3 months ago by
Gemini Labs.
Your reviews-template.csv that’s downloaded from the plugin says application/vnd.ms-excel
As is our file.
We have tested our file on another mime file checker site https://www.htmlstrip.com/mime-file-type-checker and it is text/plain.
On this site https://www.site24x7.com/es/tools/mime-type-checker.html it is text/csv
I am unable to replicate this issue on my side, when I download the CSV template file, it has the
text/csvmime type as expected.WordPress considers files with a
application/vnd.ms-excelmime-type to be one of the following types of Excel files:*.xla*.xls*.xlt*.xlw.
A mime-type is like a binary signature that is prepended to files to declare their type to applications, so I guess it’s possible that an older version of Excel might add a proprietary Excel mime-type to the file.
Perhaps this problem is specific to Windows. Although, other people I have helped when they had an issue with a wrong date format used Windows computers and did not experience this problem.
Did you try editing the file in Notepad to see if that changed the mime type to the correct one?
Two other CSV editor options you can use in Windows (both free) are: CSV Buddy and Modern CSV. Perhaps you will have better luck using those to edit the file?
If you really don’t want to try a different CSV editor, then the only thing left that I can suggest is to modify the Site Reviews plugin directly to bypass the mime-type check. But, I highly recommend you try one of the CSV editors above first!!!
The lines to remove would be here: https://github.com/pryley/site-reviews/blob/5c37c8362dca765bff73809857a64e51b577242f/plugin/Commands/ImportReviews.php#L83-L89
-
This reply was modified 2 years, 3 months ago by
The topic ‘Import Not Working’ is closed to new replies.