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

Fatal error during plugin activation #164

Closed wpinfusion closed 1 year ago

wpinfusion commented 1 year ago

Hi,

I'm trying to use this plugin on WordPress 6.2.2 (Multisite). When I activate the plugin, it fails because there's a fatal error.

Warning: require_once(/wp-content/plugins/wp-sentry-master/vendor/autoload.php): Failed to open stream: No such file or directory in /wp-content/plugins/wp-sentry-master/wp-sentry.php on line 72

Fatal error: Uncaught Error: Failed opening required '/wp-content/plugins/wp-sentry-master/vendor/autoload.php' (include_path='.:/usr/share/php:/www/wp-content/pear') in /wp-content/plugins/wp-sentry-master/wp-sentry.php:72 Stack trace: #0 /wp-admin/includes/plugin.php(2314): include_once() #1 /wp-admin/plugins.php(192): plugin_sandbox_scrape('wp-sentry-maste...') #2 {main} thrown in /wp-con

The file in question doesn't exist in the directory. When I run composer install it's asking me for a token which I don't have. And on production I don't even have access to composer :(

Do you have any suggestions?

stayallive commented 1 year ago

Install the plugin from the WordPress plugin directory or download it from the GitHub release page. Downloading the repository will not work like you've seen and is also not advised since it might contain unstable and unreleased code.

wpinfusion commented 1 year ago

Thanks for the quick reply. I'll try your solution.

May I suggest revising your documentation to better instruct this for other users?

https://github.com/stayallive/wp-sentry#usage

Install this plugin by cloning or copying this repository to your wp-contents/plugins folder

stayallive commented 1 year ago

Yikes, you may absolutely suggest that. That is a relic from the past I forgot was even there. Sorry about that! I will make sure to update it 👍

wpinfusion commented 1 year ago

Yikes, you may absolutely suggest that. That is a relic from the past I forgot was even there. Sorry about that! I will make sure to update it +1

No problem! I didn't know you had this published in the WordPress repository either. I installed it from there, and it's working without issues. Thanks.

stayallive commented 1 year ago

Little update, I've updated the readme and it should now list the correct ways you can enable the plugin: https://github.com/stayallive/wp-sentry#usage. Thanks again for bringing this to my attention!