Bug | Wordfence Does Not Remember Opened or Closed Diagnostics Positions

Good Day,

We just noticed that Wordfence does not remember (i.e., save) the last open or closed position of each diagnostic we set on the Diagnotics page.

For example, when we expand all diagnostics with your button, they never stay open when we leave the page and come back or when we simply refresh the page. Some are open others are closed. There’s no consistency in behavior.

We investigated this issue in more detail with a developer and learned that part of the issue lies with the number of Ajax calls made on the diagnostics page. Currently, seventeen (17) Ajax calls are made when only one (1) is necessary.

The developer suggested the following:

*** Instead of Using: ***

Ajax Format 1:

name: wf-diagnostics-mysql
state: true
action: wordfence_saveDisclosureState
nonce: bfe4bcbb0d
pll_ajax_backend: 1

Ajax Format 2:

name: wf-diagnostics-wordpress-constants
state: true
action: wordfence_saveDisclosureState
nonce: bfe4bcbb0d
pll_ajax_backend: 1

*** Use Instead: ***

var ajaxData = {
'action': 'wordfence_saveDisclosureState',
'nonce': 'bfe4bcbb0d',
'pll_ajax_backend': 1,
'configurations': {
'wf-diagnostics-mysql': {
'name': 'wf-diagnostics-mysql',
'state': true
},
'wf-diagnostics-wordpress-constants': {
'name': 'wf-diagnostics-wordpress-constants',
'state': true
}
}
};

Where, 'state': true is Open and 'state': false is Closed.

Please share this finding with your developers.

It would be great if they can fix this finding and incorporate the above suggestion into your plugin code at your next convenient plugin revision.

Thank you!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer