Support » Plugins » [Plugin: W3TC] error when adding jquery.js to js file management

  • Hello,

    When I try to configure js file management by adding
    wp-includes/js/jquery/jquery.js to the default group ’embed in header’ i get the following erros when I look at the page with google chrome developer tools.
    ‘Uncought SyntaxError: Unexpected token :’
    ‘Uncought ReferenceError: jQuery is not defined:’
    When I remove it again, everything is fine.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Make sure to try combine only setting and disable others.

    I know this may sound a little silly, but:

    leaving jquery.js unminified entirely VERSUS adding it to the minification process (along with 8 or 9 JS files that minify fine), but choosing “combine only”

    Are the significant trade-offs? I’mhaving this problem currently with 4 files from wp-includes and just wondered


    Tested this – simply split scripts between header and footer and put the ones that were breaking in the minification in the header using Combine Only (header) setting, while leave those in the footer to be minified fully

    Caching headers are set and compression is used.

    This problem does also occur on my site and with W3TC The minification of jquery.js seems to break the javascript of this library.

    However, the plugin Autopimize is able to combine and minify all .js-files, including jQuery.js, without problem.

    Is there another workaround except the “combine only”-option?

    Here are two of my websites. On one of them everything works fine. The other one generates the erroneous javascript-file. Both sites rely on the same jQuery.js file.

    • – javascript works correctly, because option “combine obly” is checked.
    • – javascript broken, because optione “combine obly” is not checked. Instead, comment- and linebreak-removal are active.
      • Javascript-debugger FireBug shows the following error: missing } after property list

    I think I replied to a bug submission about this issue. Comment removal should not be used when minifying jquery.

    Can’t tag this thread as relsolved, although it is resolved as far as I am concerned.

    Great. Anyone else?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: W3TC] error when adding jquery.js to js file management’ is closed to new replies.