Pete Nelson
Forum Replies Created
-
Forum: Plugins
In reply to: [REST API Log] Are these logs truly accurate?It’s possible, but you would need to contact the author of that plugin to determine how often it is calling the REST API.
Forum: Plugins
In reply to: [REST API Log] Create log only on traffic from a certain IP?Not directly within the plugin, but you can write some custom code using the “wp-rest-api-log-can-log-route” filter to always return false, but have it return true for specific IP addresses.
For reference: https://github.com/petenelson/wp-rest-api-log/blob/develop/includes/class-wp-rest-api-log.php#L81
Forum: Plugins
In reply to: [REST API Log] Display – REST API Response: (403) ForbiddenThis has been reported before and is not related to the REST API Log plugin: https://www.ads-software.com/support/topic/display-rest-api-response-403-forbidden/#post-16368727
Forum: Plugins
In reply to: [REST API Toolbox] PHP Fatal error: Uncaught Error: Call to undefined methodI haven’t been able to replicate this locally either, both with WP 6.2.2 and WP 6.1.3 (based on your stack trace). Also on my live site, trying to access the users REST endpoint when it requires auth does not have any fatal errors, just the expected response. https://petenelson.io/wp-json/wp/v2/users
Forum: Plugins
In reply to: [REST API Toolbox] PHP Fatal error: Uncaught Error: Call to undefined methodThanks for the details, looking into this.
Forum: Plugins
In reply to: [REST API Log] Delete logsIf you have direct database access, these two SQL commands should bulk delete the database REST API log records. You may need to adjust the table names to match your installation.
delete from wp_postmeta where post_id in ( select ID from wp_posts where post_type = ‘wp-rest-api-log’ );
delete from wp_posts where post_type = ‘wp-rest-api-log’;Forum: Plugins
In reply to: [REST API Log] Display – REST API Response: (403) ForbiddenThe REST API Log plugin will log other statuses beyond the usual 200 code. How are you restricting access to /wp-json/ via IP addresses? If it’s done outside of WP (nginx config, .htaccess, firewall rule, etc), then the plugin code would not pick up those instances.
Forum: Plugins
In reply to: [REST API Toolbox] Error 500 if _embed=1 parameter is providedDo you have any additional steps on how to replicate this, or how you have the plugin configured? So far, I haven’t been able to replicate this with the current version of WordPress (6.0.2)
Forum: Plugins
In reply to: [REST API Toolbox] Conflict when running cli commandsI’ve pushed v1.4.3 to resolve this issue. It was checking for SSL when running any CLI commands, but checking for that during CLI wasn’t necessary.
Forum: Plugins
In reply to: [REST API Log] WooCommerce Legacy API supportThe plugin itself doesn’t log anything outside of the REST API calls. However, there are hooks that can be used to do custom logging if you need to implement that. Examples of logging API requests and responses for ElasticPress/ElasticSearch https://github.com/petenelson/wp-rest-api-log/blob/develop/includes/class-wp-rest-api-log-elasticpress.php#L119
Forum: Plugins
In reply to: [REST API Toolbox] plugin didnt updated last 4 yearYou can use this with the latest version of WordPress (currently 5.6). I use this on all of my own sites and they are on WP 5.6.
Forum: Plugins
In reply to: [REST API Log] WP CLI reports no entries to deleteCheck the settings in the plugin to see how many days back you are keeping entries for. If they entries are not older than this, it the purge command won’t find them by default. You can pass in the days back via the CLI if you want to clean them up without changing the setting.
Example for seven days:
wp rest-api-log purge 7
If that doesn’t work, this has the SQL command to delete them manually. https://www.ads-software.com/support/topic/this-will-bloat-your-sql-database/
- This reply was modified 4 years, 3 months ago by Pete Nelson.
Forum: Plugins
In reply to: [REST API Log] Logging custom URLYou’d have to write custom code to do that, but it is possible.
Use “WP_REST_API_Log_ElasticPress::log_query” and here is some example code: https://github.com/petenelson/wp-rest-api-log/blob/develop/includes/class-wp-rest-api-log-elasticpress.php#L45
Forum: Reviews
In reply to: [REST API Log] This plugin will break your websiteThe plugin has an admin notice cautioning use on a live site. https://github.com/petenelson/wp-rest-api-log#v167-march-31-2019
Forum: Plugins
In reply to: [REST API Log] JSON pretty viewIt should be doing that automatically, example from the plugin screenshots: https://ps.w.org/wp-rest-api-log/assets/screenshot-2.png?rev=1587840
Are there any Javascript errors when viewing an entry? We’re using https://highlightjs.org/ to pretty-print the JSON.