rmhall
Forum Replies Created
-
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] sender ip in comments@koullis Happy to help. Looks like this helped get someone on it formally, and they have already made a very similar patch to the official repo for Jetpack plugin, and the pull request is one review away from being approved, so it should be in the next release. ?? Reference: https://github.com/Automattic/jetpack/pull/38352/commits
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] sender ip in commentsI worked up a custom plugin that dumps all the IP’s from Feedback Responses marked as SPAM into a separate file for reference on a cron schedule or on demand, for my own blocking/reporting purposes. I may publish it at some point, its very bare bones. I hated not seeing the IP in the Feedback Form Responses admin page without having to run my plugin to view/dump them. So I spent a few minutes and put together a quick one line patch to restore this functionality.
Reference the GitHub issue here: https://github.com/Automattic/jetpack/issues/29124
No time or inclination to submit a formal pull request or determine if it aligns with any WordPress coding standards (just quick and dirty to get going), but here it is for anyone who wants to quick copy and paste a single line of code to a single file to restore the missing IP display row – or use this as a reference point to investigate exactly where things are going wrong/broke and implement properly.
Edit this file:
/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-forms/src/contact-form/class-admin.php (Reference: https://raw.githubusercontent.com/Automattic/jetpack/trunk/projects/packages/forms/src/contact-form/class-admin.php )
Insert the following line of code at line 740:$content_fields["_feedback_ip"] = substr($chunks[0], strrpos($chunks[0], "IP:")+3);
Save the file and then view your Feedback Form Responses admin page and you will note that the missing “IP” row with IP address of the form submission is now visible again, just below the horizontal rule in the “Response Data” column, and directly before the “Source” row – like it used to be.
Basically it looks like the $content_fields array is not getting the _feeedback_ip set properly. Didn’t have time to go back and look at commit history to determine the cause/where it broke originally, and yes, its kludgy without error checking, but it works in a pinch, and might help someone to finish this off properly with a jumping off point. Will post a version of this on the GitHub issue as well in case that gets it addressed formally a little faster.