Editor errors on page load.

Editor errors on page load.

crush123crush123 Posts: 417Questions: 126Answers: 18

I am delveloping a new site, using some working existing admin pages which use datatables and editor.

On the new page, I have updated the paths to the latest libraries, but the page is not rendering, i get the following errors in the console.

Uncaught SyntaxError: Invalid regular expression: missing / dataTables.editor.js:459

Uncaught TypeError: $.fn.dataTable.Editor is not a constructor galleries.php:89

If i remove the editor instance, the datatable loads ok

test page...

http://nfci.forthwebsolutions.com/admin/galleries.php

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,867Questions: 1Answers: 10,137 Site admin

    My browser is showing an error:

    dataTables.editor.js:459 Uncaught SyntaxError: Invalid regular expression: missing /

    And looking at that line in Editor it is correct -

                    .replace(/
    /g, '\n');
    

    That's very wrong. It should be:

    .replace(/
/g, '\n');
    

    Indeed the lines before it are also wrong and should have HTML entities in them. Can I ask which file you used to download this version of Editor?

    Allan

  • crush123crush123 Posts: 417Questions: 126Answers: 18

    i downloaded the editor file individually, on 28/4

    however, i just looked at the dataTables.editor.js on my local view and this is correct.

    -- so I then looked at the file in vhosts and it is as you stated

    don;t understand why, (though I did rename the parent folder at one point and dreamweaver prompted me to update links, (which I did)).

    anyway, i re-copied the editor folder and all of its content and it is now working fine.

    sorry for time wasting ;-(

  • allanallan Posts: 61,867Questions: 1Answers: 10,137 Site admin
    Answer ✓

    Good to hear its working now. Possible DreamWeaver tried to be "helpful"...

    Allan

This discussion has been closed.