Viewing 1 replies (of 1 total)
  • Hi there. I got the same problem.
    There is a problem on the media-relocator.js file that you can find inside the plugin’s folder.

    SOLUTION:
    1. Locate the line that says (which is in a try-catch block):

    dir = JSON.parse(dirj);

    2. Comment the lines within the catch block, like this:

    /*
            document.write('<table border="3"><tr><td width="200">');
            document.write("<prea>"+err+"\n"+dirj+"</pre>");
            document.write("</td></tr></table>");
          */

    3. Right after the catch block, write the following extra line:

    if (Object.prototype.toString.call(dir)!=="[object Array]")  dir = [];

    … and that’s it.
    The problem arises when the folder you are trying to access is empty.
    The whole code block should look like this:

    try {
            dir = JSON.parse(dirj);
        } catch (err) {
          /*
            document.write('<table border="3"><tr><td width="200">');
            document.write("<prea>"+err+"\n"+dirj+"");
            document.write("</td></tr></table>");
          */
        }
        if (Object.prototype.toString.call(dir)!=="[object Array]")  dir = [];

Viewing 1 replies (of 1 total)

The topic ‘SyntaxError: Unexpected end of input’ is closed to new replies.