Support » Plugin: Slim SEO - Fast & Automated WordPress SEO Plugin » JS error – Slim SEO 3.1.0

  • Resolved shadyshane

    (@shadyshane)


    The latest version of Slim SEO (v3.1.0) causes an JavaScript error in WordPress admin.

    Uncaught TypeError: Cannot read property 'addEventListener' of null
        at HTMLDocument.<anonymous> (notification.js?ver=3.1.0:2)
    (anonymous) @ notification.js?ver=3.1.0:2
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Anh Tran

    (@rilwis)

    Thanks for your feedback. I’ll check and fix it.

    Plugin Author Anh Tran

    (@rilwis)

    Hi again, I’ve just checked and couldn’t replicate the error. Can you please share a screenshot?

    Thread Starter shadyshane

    (@shadyshane)

    Hello Anh Tran, I am sorry for the wrong report. The error was not caused by your plugin, but by other plugins that I used to hide all notifications in the wp-admin.

    I had not encountered this error before because in the older version of Slim SEO, you used jQuery in the slim-seo/js/notification.js file. In the new version (3.1.0), it has been changed to vanilla JS which use document.querySelector, so the browser could not find the hidden .notice-dismiss element in my admin page.

    I think that it’s okay because it is not a very important feature. If possible, would you mind doing a null check before adding events? Thank you for your time.

    • This reply was modified 2 years ago by shadyshane.
    • This reply was modified 2 years ago by shadyshane.
    Plugin Author Anh Tran

    (@rilwis)

    Got it. Thanks for your investigation. I’ve updated the code here.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘JS error – Slim SEO 3.1.0’ is closed to new replies.