• Resolved vrpr

    (@vrpr)


    Hi,
    I have got next errors when I use “Regenerate Thumbnails” plugin:

    Skipped Attachment ID 346: SyntaxError: Unexpected token N in JSON at position 1
    Skipped Attachment ID 459: SyntaxError: Unexpected token N in JSON at position 1
    Skipped Attachment ID 463: SyntaxError: Unexpected token N in JSON at position 1

    It was writing about all images.
    It happend for one theme. If I use other themes – there is not this error.
    What it can be?

    Best regards
    vrpr

    • This topic was modified 8 years, 2 months ago by vrpr.
    • This topic was modified 8 years, 2 months ago by vrpr.
    • This topic was modified 8 years, 2 months ago by Steven Stern (sterndata). Reason: removed LI
    • This topic was modified 8 years, 2 months ago by Steven Stern (sterndata).
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter vrpr

    (@vrpr)

    I wrote not right, I saw this:

    Skipped Attachment ID 513: SyntaxError: Unexpected token < in JSON at position 0
    Skipped Attachment ID 458: SyntaxError: Unexpected token < in JSON at position 0
    Skipped Attachment ID 508: SyntaxError: Unexpected token < in JSON at position 0
    Thread Starter vrpr

    (@vrpr)

    I found that this error happens after adding retina.js in theme. Maybe I was adding retina.js in not right way.

    Plugin Contributor viper007bond

    (@viper007bond)

    Maybe I was adding retina.js in not right way.

    That sounds like the case. If I had to guess, your <script> tag was being outputted as a part of the JSON response in the REST API.

    Check out https://developer.wordpress.org/reference/functions/wp_enqueue_script/

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

The topic ‘SyntaxError: Unexpected token N’ is closed to new replies.