Just did a fresh install of CiviCRM 4.6.5 on Drupal 7.38 and the JQuery/Ajax isn't working. I get the following 2 errors in the Chrome Developer Console:

Uncaught SyntaxError: Unexpected token <  en_US?r=7WtZJ:1
Uncaught SyntaxError: Unexpected token <  XrTF2AAu:1

I have gone through the "Troubleshooting popups, autocompletes, or other javascript problems" document and have verified everything and cleared my Drupal cache.

  • 1
    Take a look at your page source - possibly there is a malformed script tag on the page. Search the page source for en_US? and it should find a script tag -- what does it look like?
    – Coleman
    Jul 30 '15 at 1:33

This an old thread, but I just encountered the same problem. In case anyone else lands here, here's what I found:

The issue was that I had a typo in the domain for the URL settings, which I'd defined in civicrm.settings.php. My super-helpful ISP redirects the request to http://searchassist.verizon.com/main?a-bunch-of-params-including-my-typoed-domain. That URL contains HTML, of course, not JavaScript. When the browser gets back HTML from a script src, it throws a parse error.

  • To echo this point: I just encountered this on a WordPress site which was redirecting all 404s to the home page. Under System Settings > Resource URLs, I had a bad value for "Image Upload URL", leading to 404s (and thus returned HTML) for at least some Angular.js scripts.
    – TwoMice
    Feb 27 '18 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.