stayallive / wp-sentry

A (unofficial) WordPress plugin reporting PHP and JavaScript errors to Sentry.
https://wordpress.org/plugins/wp-sentry-integration/
MIT License
300 stars 48 forks source link

Tracing ErrorException: action not defined when DOING_AJAX #195

Closed MathieuLamiot closed 1 month ago

MathieuLamiot commented 1 month ago

I am testing the new tracing feature (thanks a lot for implementing this! well done!) in v7.17.2.

I am getting an error from time to time when browsing my website:

ErrorException Warning: Undefined array key "action" 
in /wp-content/plugins/wp-sentry-integration/src/tracing/class-wp-sentry-php-tracing.php in WP_Sentry_Php_Tracing::handle_wp_loaded at line 239

Here is a Sentry report: https://mathieu-lamiot.sentry.io/share/issue/1fa964a601bc4c74817c1a05093ee956/

Let me know if I can share more information, or if you want me to try some code changes on my website to test a potential fix! I'd be happy to help.

stayallive commented 1 month ago

Good catch! You theme does some GET requests (instead of POST) to the admin-ajax.php script causing this issue. An oversight on my part 🙈

Fixed up in 8bde76b4a5b8d02282204ebac3d95df14080b696 and released as https://github.com/stayallive/wp-sentry/releases/tag/v7.17.3 😎

Thanks for reporting!

MathieuLamiot commented 1 month ago

I updated and I confirm it's not happening anymore. Well done and thanks a lot 🙏