Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I got an identical error to the one you're getting now. I once encountered a very similar error using the Chosen library. The problem was (in Chosen's case) that IDs with the <code>[]</code> characters were being used, thus confusing Javascript between css selectors and ids (remember that in CSS we can use <code>[]</code> to specify attributes).</p> <p>In the case of DataTables, however, I noticed that the DataTables script itself was prepending <code>class = " "</code> before the first element in every tr element within the <code>tbody</code>. </p> <p>The reason for this was because the HTML output from the php had a logical error. The faulting code:</p> <pre><code>&lt;?php for ($currentRow = 0 ; $currentRow &lt;= $query_length; $currentRow++) { ?&gt; &lt;tr&gt; &lt;?php list($job_id, $company_id, $job_title, $industry_id, $profession_int, $job_openings, $job_city, $job_salary_start, $job_end_date, $job_start_date, $job_skills, $company_name, $isConfidential, $job_experience_level) = dbRow($query_results, $currentRow); echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_title . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $company_name . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $industry_id . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $profession_int . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_openings . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_city . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_salary_start . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_end_date . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_start_date . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_skills . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_experience_level . "&lt;/td&gt;"; ?&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;?php } ?&gt; </code></pre> <p>There was an error at the bottom of the long, long table, indicating that postgres could not jump to row 208. This told me I needed to stop looping at <code>i - 1</code>, or <code>$currentRow - 1</code>.</p> <p>Hence the fixed, working code:</p> <pre><code>&lt;?php for ($currentRow = 0 ; $currentRow &lt;= $query_length - 1; $currentRow++) { ?&gt; &lt;tr&gt; &lt;?php list($job_id, $company_id, $job_title, $industry_id, $profession_int, $job_openings, $job_city, $job_salary_start, $job_end_date, $job_start_date, $job_skills, $company_name, $isConfidential, $job_experience_level) = dbRow($query_results, $currentRow); echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_title . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $company_name . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $industry_id . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $profession_int . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_openings . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_city . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_salary_start . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_end_date . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_start_date . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_skills . "&lt;/td&gt;"; echo "&lt;td class = \"detailed-job-row\"&gt;" . $job_experience_level . "&lt;/td&gt;"; ?&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;?php } ?&gt; </code></pre> <p>Performing this change allowed DataTables to perform properly.</p> <p>So although I cannot provide a working solution, I do advise you to look at your html mark-up, as that may be the source of your problem (ex, does your table have a <code>tbody</code>?).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload