• Resolved Anonymous User 18795708

    (@anonymized-18795708)


    Hey all,

    I just updated my website to WP 5.8. In the process, I noticed a new error in the console that didn’t appear there before.
    “Uncaught SyntaxError: Unexpected token ‘)'” is the name of the error and it’s supposed to be in “/wp-content/themes/onepress/assets/js/theme.js”.
    Apparently the code there is not assembled correctly after the update to WordPress 5.8.

    Here the code which is objected:

    “[…] onepress_gallery_init($(“.gallery-content”));if(“undefined”!==typeof wp&&wp.customize&&wp.customize.selectiveRefresh){wp.customize.selectiveRefresh. bind(“partial-content-rendered”,function(placement){if(placement.partial.id==”section-gallery”){onepress_gallery_init(placement.container.find(“.gallery-content”));$(window).resize()}})}}) […]”

    Apparently the closed brackets trigger the error in wordpress 5.8.

    Maybe I someone else noticed the error.

    Best regards

    itsebiGaming

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author FameThemes

    (@famethemes)

    Hi,

    Thanks for your feedback.

    I do not see any issue like that on my demo site, OnePress v2.2.7, and WordPress 5.8. Could you try disabling all your plugins and see if this fixes the issue? You’ll need to clear all your caches after disabling your plugins.

    If it does fix the issue, then try re-enabling your plugins one by one until the issue comes back. This procedure will help diagnose which plugin is causing the issue.

    Thread Starter Anonymous User 18795708

    (@anonymized-18795708)

    Hey @famethemes ,

    thanks for the quick reply.

    I was able to solve the error. The plugin “WP Rocket” triggers the error during javascript minification. Once you add the path to “theme.js” as an exception to the minification, then the error is fixed.

    Best regards

    itsebiGaming

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

The topic ‘WP 5.8 | Unexpected token ‘)’ | theme.js’ is closed to new replies.