• Resolved Mark

    (@bidfor)


    After updating WordPress popular post and wp rocket, I get three errors in the browser developer console.

    Uncaught TypeError: Cannot read property ‘use’ of undefined
    Uncaught ReferenceError: moment is not defined
    Uncaught TypeError: Cannot read property ‘setSettings’ of undefined

    It doesn’t cause anything other than errors in the console. But I still want to avoid it if possible.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @bidfor,

    The errors I’m seeing in the console are all from missing / not-loaded-in-the-right-order WordPress core JavaScript files.

    WordPress Popular Posts 5.4.0 enabled its widget block for everyone and so WordPress is loading all of its block-related libraries so they can be used by the WPP block and by any other blocks you use on your website. My guess is that the JS minification / bundling settings you’re using with WP Rocket right now are a bit too aggressive, causing the error messages you’re seeing on the console now.

    Since WP Rocket is a paid plugin I can’t really help you debug this (I don’t have a license nor the plugin itself). I can suggest some things to try though, hopefully they’ll get you on the right direction:

    • Have WP Rocket not minify / bundle any JS files from wp-includes/js/dist/.
    • If you don’t plan on using the Block editor nor the new block-based Widgets screen on your website then you can disable WPP’s Gutenberg support which in turn will also have WordPress not load any of its Block JS files, fixing these JS errors you’re having now (assuming that you don’t have another plugin installed on your site that does require these JS files).
    Plugin Author Hector Cabrera

    (@hcabrera)

    @bidfor please disregard the suggestions from my previous comments. Try upgrading to WordPress Popular Posts 5.4.1 first instead and if that doesn’t fix the issue then do try what I suggested above.

    Thread Starter Mark

    (@bidfor)

    Hi Hector,

    Thank you for the quick fix. Everything seems good on the site.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Wp-Rocket compatibility issue’ is closed to new replies.