nicosemp
Forum Replies Created
-
Hi,
Thank you for looking into this.Just to be clear: I am sure that the code I copied is the one that is supposed to run, but I don’t know why the onclick listener didn’t run.
It might be a different problem then just substitutingjQuery/$
.Digging a little more and I found that the button with ID
discard-less-secure-notification
is supposed to have an onclick listener from this code insidePLUGIN/script/postman.js
://Discard less secure notification $( document ).on( 'click', '#discard-less-secure-notification', function( e ) { e.preventDefault(); $.ajax( { type: 'POST', url: ajaxurl, data: { action: 'ps-discard-less-secure-notification', _wp_nonce: postman_ajax.lessSecureNotice }, success: function(data) { $( '.ps-less-secure-notice .notice-dismiss' ).click(); }, error: function(data) {debugger alert( data.responseJSON.data.message ); }, } ) $( '.ps-less-secure-notice .notice-dismiss' ).click(); } )
However this doesn’t work for some reason, so I tried running the javascript code manually from the console and got the
$ is undefined
error.So that must be the problem: I tried running it again substituting
$
withjQuery
and it worked. The notice disappeared and is not appearing anymore.Please fix the plugin using
jQuery
instead of$
.This happened to 2 of my websites too.
I was able to rollback to 5.2.2This bug also installed the Akismet plugin and all default themes from TwentyTen to TwentyTwenty, so make sure you check this and uninstall any unused plugin or theme!