Title: CSV Import Error
Last modified: September 20, 2020

---

# CSV Import Error

 *  Resolved [litumahi](https://wordpress.org/support/users/litumahi/)
 * (@litumahi)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/csv-import-error-6/)
 * Hi Harmonic Design
 * Thanks for this excellent plugin.
 * I have tried this for a demo quiz and worked perfectly. But started having issues
   recently. I have around 400 rows. It is loading only the first row each time.
   I have tried .csv, UTF-8 CSV, with double quotes, without double quotes, removing
   the first row etc.,
 * I get the following message on screen ‘Adding questions has begun. Please do 
   not leave this page until complete.’ But nothing happens.
 * I also tried to upload from different browsers. In both Chrome and Firefox, I
   see 1 user message and 1 error in the console (given below).
 * Uncaught ReferenceError: HDQ is not defined
    <anonymous> [https://xxxxx.com/wp-admin/?page=hdq_tools_csv_importer:328](https://xxxxx.com/wp-admin/?page=hdq_tools_csv_importer:328)
   setTimeout handler* [https://xxxxx.com/wp-admin/?page=hdq_tools_csv_importer:328](https://xxxxx.com/wp-admin/?page=hdq_tools_csv_importer:328)
   wp-admin:328:23
 * HDQ: Importer loaded hdq_csv_import.js:12:11
 * Related Post: [https://wordpress.org/support/topic/csv-bulk-importer-not-working/](https://wordpress.org/support/topic/csv-bulk-importer-not-working/)
 * Any clue would help. Thank you for your support.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Harmonic Design](https://wordpress.org/support/users/harmonic_design/)
 * (@harmonic_design)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/csv-import-error-6/#post-13429971)
 * Hi itumahi,
    thank you for taking a look a the console.
 * It looks like the real issue is `Uncaught ReferenceError: HDQ is not defined`
   which is interesting because it essentially means that HD Quiz isn’t loaded on
   that page. I cannot tell you _why_ this would be happening for you, but _something_
   on your site is messing with enqueued scripts in your admin area.
 * Another possibility is that your site is just _too damned slow_. By this, I mean
   that the importer is trying to send the data for the next question before HD 
   Quiz has fully initialized.
 * **STEPS:**
    First, let’s make sure that this is not a timing issue due to a super
   slow site/server.
 * Edit `./hd-quiz/includes/tools/csv_import.php` and replace line `278` near the
   very bottom with the following:
 * `echo '<script>setTimeout(function(){HDQ.parseNext("'.$csvFile.'", '.$atonce.','.
   count($csvAsArray).');}, 5000);</script>';`
 * This will slow the process down 500%, giving your server plenty of time to load
   everything. Make sure to clear your browser cache after saving 🙂
 * If the above does not work for you, then based on your reply to a similar past
   thread
 * > It used to work before. But not anymore.
 * Code is code and the same code executes the exact same way every time – zero 
   exceptions. So if it used to work, but doesn’t anymore, then this means that 
   the cause is that _something has changed_ on your site. So the only / best advice
   I can give is to try and track down what changed on your site so we can find 
   the culprit.
 * The standard WordPress debug procedure is the following. This is used to narrow
   down any possible conflicts from other plugins or your theme.
 * 1. Switch theme to the default Twenty Twenty theme. Clear your browser cache 
   and try again. If it now works, then we know that the issue lies with your theme.
   
   2. If it is not your theme, then we need to test plugins. Deactivate all plugins
   except HD Quiz then test again. Then re-enable each plugin one by one until we
   find the culprit.
 * If all of the above still fails you, then my best next best guess is that your
   server is misconfigured and is experiences disconnects. Basically the connection
   between your site and your server gets interrupted which breaks the connection.
   If this is the case then you will need to contact your host to get them to debug/
   fix your server.
 * I’m marking this thread as resolved simply because I cannot think of anything
   else that could help or be the cause, but please do not hesitate to reply to 
   this thread again with updated information or if you need further assistance 
   or clarification on anything.
 *  Thread Starter [litumahi](https://wordpress.org/support/users/litumahi/)
 * (@litumahi)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/csv-import-error-6/#post-13430288)
 * Hello Harmonic Design
 * Thanks a lot for the quick response.
 * I did update the line (just incremented the milliseconds from 1000 to 5000). 
   It is working now 🙂 It is spot on.
 * Really impressed by the plugin and the support. Nowadays, we can’t expect this
   even from the so called paid pro/premium versions.
 * Great job. Keep going.
 * I will also poke my hosting provider to improve the speed.
 * Thanks again.
 *  Thread Starter [litumahi](https://wordpress.org/support/users/litumahi/)
 * (@litumahi)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/csv-import-error-6/#post-13445979)
 * Hi
 * Just to update on this. The issue was actually with the ‘Bluehost’ plugin. I 
   deactivated it and have done the above change (1000 ->5000). So got confused.
   When I activate the Bluehost plugin, I saw that error again. So I guess, the 
   issue is with the plugin compatibility.
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘CSV Import Error’ is closed to new replies.

 * ![](https://ps.w.org/hd-quiz/assets/icon-256X256.gif?rev=2936040)
 * [HD Quiz](https://wordpress.org/plugins/hd-quiz/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hd-quiz/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hd-quiz/)
 * [Active Topics](https://wordpress.org/support/plugin/hd-quiz/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hd-quiz/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hd-quiz/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [litumahi](https://wordpress.org/support/users/litumahi/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/csv-import-error-6/#post-13445979)
 * Status: resolved