10up/restricted-site-access

In Reading. all of sudden cannot save

jromero1982 opened this issue · 7 comments

Describe the bug

All of a sudden under the reading page, I cannot save new IP addresses.

Steps to Reproduce

We restrict everyone except for a list of IP addresses. It lets me add the new IP address but it will not save. After you type the IP in the input box and add the description, the save button greys out. If I type only the IP it does not grey out but the button is dead (),it does nothing. disabled plugins and still the same

Screenshots, screen recording, code snippet

No response

Environment information

chrome, php 7.4, wp 6.2.2 , RSA 7.4.0

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

After further investigation, it seems like once I start typing it locks up the save button

Is it possible to add additional ip's via database

@10up/open-source-practice would be good to get some help triaging here.

@jromero1982 do you have any other plugins active?

Hi @jromero1982

I investigated but could not reproduce the issue.

The only time when we disable the Submit button is when the IP address added is invalid.
Do you see any console errors?

Is it possible to add additional ip's via database

Yes, we provided the following API to add IP addresses via code:

add_action( 'plugins_loaded', function() {
	Restricted_Site_Access::add_ips(
		array(
			'label one' => '192.168.1.5',
			'label two' => '192.168.1.6'
		)
	);
} );

This issue has been automatically closed because there has been no response to our request for more information. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. See this blog post on bug reports and the importance of repro steps for more information about the kind of information that may be helpful.