The SlickNav plugin causes a site's JavaScript to break when CSS/JS aggregation is enabled and using jQuery 1.10. The error message presented is as follows:

Uncaught SyntaxError: Unexpected identifier

After performing some investigation, it was found that SlickNav is missing commas at the end of statements, which throws jQuery "Unterminated statements" errors. When this JavaScript is then aggregated, it breaks.

I will attach a patch for review in a minute.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ron_s created an issue. See original summary.

ron_s’s picture

Here is a patch for review. Once this has been finalized, I'd recommend asending this to the SlickNav developers so they can make sure to fix the issue in their code. Thanks.

Status: Needs review » Needs work

The last submitted patch, 2: adminimal_admin_menu-unterminated_statements-2677036-2.patch, failed testing.

kala4ek’s picture

Status: Needs work » Needs review
FileSize
3.99 KB

Attached new patch, which should pass tests.
Hate JS for such problems...

Status: Needs review » Needs work

The last submitted patch, 4: unterminated_statements-2677036-4.patch, failed testing.

Tess Bakker’s picture

Tess Bakker’s picture

Status: Fixed » Closed (fixed)