• In Developers tools I get the error “SyntaxError: Unexpected token < line 1” when I visit the “Other Options” page in the admin section. It doesn’t affect anything on that page however it does if I try to insert a gallery in a post.
    Clicking the SAVE button does nothing: http://cl.ly/image/1N3M311p022F and I see the error in the developer tools: http://cl.ly/image/0j2N1R3q2G11

    I don’t believe there is a conflict with the theme since I have the same theme running on another install and I am not getting any problems.

    The error does not appear if I go to “Gallery Settings” but it does on “Other Options” or when adding a gallery in the body of a post.

    Is there something special in these pages that show the js error?

    I scanned log files and I even added error_reporting(-1); in the core plugin file to attempt to trouble shoot and get more details but nothing.

    Please advise. Thanks!

    https://ww.wp.xz.cn/plugins/nextgen-gallery/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @ash – Have you tried re-installing the plugin on that particular site? There could be a corrupted file in the installation …

    – Cais.

    Thread Starter Ash

    (@ashmetry)

    Hi Cais,

    Yes. I’ve tried that. I’ve uninstalled, deleted, and reinstalled and the error remains.

    I am wondering what’s so special about these calls? I even have CDN which I disabled just in case any cross domain references in css/js is causing it. but nothing…

    Plugin Contributor photocrati

    (@photocrati)

    @ash – Although you do not believe it is the theme, have you tried deactivating *all* plugins, temporarily switching to a default WordPress Twenty series theme and reactivating NextGEN Gallery only? Does the issue still persist?

    – Cais.

    Thread Starter Ash

    (@ashmetry)

    Unfortunately that is not an option since this is a production website with 1000s of daily visitors. The theme is genesis based.

    I am trying to clone the website elsewhere and do what you recommended on another server. Hopefully I can duplicate the issue

    Plugin Contributor photocrati

    (@photocrati)

    @ash – I don’t suspect a Genesis based theme to cause issues, it’s just a SOP for troubleshooting to use a default WordPress Twenty series theme as a baseline.

    Let us know what you find with the clone site.

    Thanks!

    – Cais.

    Thread Starter Ash

    (@ashmetry)

    I did more troubleshooting. The problem seems to be in the call to /photocrati_ajax, it seems to return extra text from the wp_footer section defined in Genesis after the json string being returned which causes parse error in JSON.parse(…).

    I am still unable to duplicate the issue locally but Firefox Debugger shows it clearly on the production server.

    Still troubleshooting.

    Plugin Contributor photocrati

    (@photocrati)

    @ash – Thanks … we have not had trouble specifically with a Genesis based theme to date that I am aware of. This would be good to know the root cause so it can be addressed … either through NextGEN Gallery or through the Genesis based theme.

    – Cais.

    Thread Starter Ash

    (@ashmetry)

    I tried with another Genesis install and the problem wasn’t there (so it’s not Genesis’s fault).
    I was able to do more testing and for some reason the ajax calls executes wp_footer() and return it’s content in the json response which results in a malformatted json string. Something triggering that but I am not clear to the cause.

    Plugin Contributor photocrati

    (@photocrati)

    @ash – Please let us know if you find the root cause on this … as its described now I do not recall a similar issue.

    – Cais.

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

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