WordPress / better-code-editing

[✅ Merged into 4.9-alpha] Better Code Editing WordPress plugin
https://wordpress.org/plugins/better-code-editing/
37 stars 16 forks source link

Fatal error upon activation #73

Closed aaronjorbin closed 6 years ago

aaronjorbin commented 6 years ago

I cloned this into wp-content/plugins. When I activated the plugin, my site stopped working. Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/srv/www/wordpress-develop/public_html/src/wp-content/plugins/better-code-editing/wp-includes/js/codemirror): failed to open dir: No such file or directory in /srv/www/wordpress-develop/public_html/src/wp-content/plugins/better-code-editing/wp-includes/script-loader-addendum.php:197 Stack trace: #0 /srv/www/wordpress-develop/public_html/src/wp-content/plugins/better-code-editing/wp-includes/script-loader-addendum.php(197): RecursiveDirectoryIterator->__construct('/srv/www/wordpr...') #1 /srv/www/wordpress-develop/public_html/src/wp-content/plugins/better-code-editing/wp-includes/script-loader-addendum.php(127): _better_code_editing_report_asset_errors(Object(WP_Scripts)) #2 /srv/www/wordpress-develop/public_html/src/wp-includes/class-wp-hook.php(286): _better_code_editing_default_scripts(Object(WP_Scripts)) #3 /srv/www/wordpress-develop/public_html/src/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #4 /srv/www/ in /srv/www/wordpress-develop/public_html/src/wp-content/plugins/better-code-editing/wp-includes/script-loader-addendum.php on line 197

westonruter commented 6 years ago

@aaronjorbin please use a release build either on WordPress.org or among releases on GitHub: https://github.com/WordPress/better-code-editing/releases

To install the plugin from source, follow the instructions here: https://github.com/WordPress/better-code-editing/blob/master/contributing.md#getting-started

westonruter commented 6 years ago

That being said, the plugin could check if wp-includes/js/codemirror exists and if not, prompt the user to run npm install.