Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IP addresses in exlude rules not saved correctly #1035

Closed
tyrann0us opened this issue Sep 24, 2019 · 2 comments · Fixed by #1036
Closed

IP addresses in exlude rules not saved correctly #1035

tyrann0us opened this issue Sep 24, 2019 · 2 comments · Fixed by #1036

Comments

@tyrann0us
Copy link

Bug Report

Expected Behavior

Exclude rules should be saved correctly, even if some of them do not contain IP addresses.

Actual Behavior

If there are multiple exclude rules and some of them have no IP address(es) set, settings are not saved correctly. The set IP addresses are then assigned to the wrong authors or roles, because they are displayed one after the other, ignoring whether an IP address was set in the current row at all.

Steps to Reproduce the Problem

  1. Create multiple exclude rules
  2. Set IP addresses only for some rules
  3. Save settings

Screenshots

Before save

screenshot-blog bernina local-2019 09 24-13-45-49

After save

screenshot-blog bernina local-2019 09 24-13-46-38

System Information

  • Stream plugin version: dev-fix/ip-address
  • WordPress version: 4.9.11
  • PHP version: 7.2.0
  • Browser: Google Chrome 77.0
  • Computer operating system: macOS Mojave
@kasparsd
Copy link
Contributor

Thanks for the reporting the issue @tyrann0us!

I could replicate the issue and it's probably caused by the way the form uses non-indexed input field names name[] which fails when some of them have an empty value.

@kasparsd
Copy link
Contributor

@tyrann0us Could you please test with the fix/1035-exclude-rules-table branch? You will probably need to run npm run build to re-build the minified JS files with the latest changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants