CSV importer not working
Hey the import button is not getting clicked. on click, there is no response. Happening since 1-2 month ago moght be.
Also followed your tweak in some previous post, by going to hd-quiz/classes/csv-importer tool
but, the provided case is not visible
If you edit ./hd-quiz/includes/tools/csv_import.php on line 123 you will see $csvFile = "";. Above that line, add the following code.
$csvFile = "URL TO THE CSV FILE";
hdq_parse_csv_data($csvFile, $hdq_nonce);
return "uploading";Replace “URL TO THE CSV FILE” with… the URL of the CSV you uploaded using the WordPress media library.
Couldn’t find the $csvFile. If possible, can you please update the tweak?
Hi Madhabi,
The short answer is that if it used to work, and doesn’t anymore, this is because something changed on your end
One thing you can check is your browser console. F12 for most browsers will open a new browser panel. Select console and take note of any errors there. It’s possible some other plugin is adding code to the page that is breaking things. Since you say that “nothing” happens when you click upload, this indicates that there is probably a JavaScript error on your page.
Getting error in console:
VM613:1 Uncaught (in promise) SyntaxError: Failed to execute ‘json’ on ‘Response’: Unexpected end of JSON input at HTMLFormElement.<anonymous> (csv-importer.js?ver=2.0.10:26:21)
(anonymous)
@
csv-importer.js?ver=2.0.10:26
Unfortunately that means that once the submission happens, your server is crashing.
The importer has debugging enabled to report on what goes wrong with the import, but since your site is crashing, this indicates that the problem is caused by something outside of HD Quiz.
It’s impossible for me to know what the cause of this is. All I can do is recommend following the following debug guide.
The first part of that article will show you how to enable server-level debugs. This will point directly towards the cause of the crash.
If you are unable or unwilling to enable debugging, your next best solution is to do the default WordPress debug steps outlined in the WordPress Debug Steps section of that article.
Good luck, and feel free to respond here if you have further information of questions.
This thread has either been marked as complete or has been automatically closed due to inactivity. Please consider opening a new support thread for help.