Open sandrodz opened 7 years ago
Any reason you're running it from mu-plugins
instead of activating like a more standard plugin? Sounds like this may be getting ran before the plugins API is loaded.
It still errors out in plugins dir.
Fatal error: Uncaught Error: Call to undefined function add_action() in /www/dev.litvurisacxobi.ge/public/plugins/cmb2-user-select/cmb2-user-select.php:106 Stack trace: #0 /www/dev.litvurisacxobi.ge/public/plugins/cmb2-user-select/cmb2-user-select.php(158): WDS_CMB2_User_Select_023->__construct() #1 /www/dev.litvurisacxobi.ge/vendor/composer/autoload_real.php(66): require('/www/dev.litvur...') #2 /www/dev.litvurisacxobi.ge/vendor/composer/autoload_real.php(56): composerRequire64abd30e7576348d5e296f9ce5f07616('90c7ecedda3d4ff...', '/www/dev.litvur...') #3 /www/dev.litvurisacxobi.ge/vendor/autoload.php(7): ComposerAutoloaderInit64abd30e7576348d5e296f9ce5f07616::getLoader() #4 /www/dev.litvurisacxobi.ge/public/wp-config.php(26): require('/www/dev.litvur...') #5 /www/dev.litvurisacxobi.ge/public/wordpress/wp-load.php(42): require_once('/www/dev.litvur...') #6 /www/dev.litvurisacxobi.ge/public/wordpress/wp-blog-header.php(13): require_once('/www/dev.litvur...') #7 /www/dev.litvurisacxobi.ge/public/index.php(37): require('/www/ in /www/dev.litvurisacxobi.ge/public/plugins/cmb2-user-select/cmb2-user-select.php on line 106
The only way to fix this, is to delete plugin, reload wp installation page. And than add plugin back, and it works :S super weird.
When downloading as a zip from GitHub here, and placing in either location, I was experiencing zero fatal errors.
I do see that you're installing it via Composer, so I'm wondering if perhaps the autoloading is contributing and managing to execute the file before the rest of WordPress is loaded.
In the new project, I cannot get it to work at all. Yes its being autoloaded before WordPress.
Fatal error: Uncaught Error: Call to undefined function add_action() in /www/dev.litvurisacxobi.ge/public/mu-plugins/cmb2-user-select/cmb2-user-select.php:106 Stack trace: #0 /www/dev.litvurisacxobi.ge/public/mu-plugins/cmb2-user-select/cmb2-user-select.php(158): WDS_CMB2_User_Select_023->__construct() #1 /www/dev.litvurisacxobi.ge/vendor/composer/autoload_real.php(66): require('/www/dev.litvur...') #2 /www/dev.litvurisacxobi.ge/vendor/composer/autoload_real.php(56): composerRequired8019e99ec0fd9f51454d9a247f6a507('90c7ecedda3d4ff...', '/www/dev.litvur...') #3 /www/dev.litvurisacxobi.ge/vendor/autoload.php(7): ComposerAutoloaderInitd8019e99ec0fd9f51454d9a247f6a507::getLoader() #4 /www/dev.litvurisacxobi.ge/public/wp-config.php(26): require('/www/dev.litvur...') #5 /www/dev.litvurisacxobi.ge/public/wordpress/wp-load.php(42): require_once('/www/dev.litvur...') #6 /www/dev.litvurisacxobi.ge/public/wordpress/wp-blog-header.php(13): require_once('/www/dev.litvur...') #7 /www/dev.litvurisacxobi.ge/public/index.php(37): require( in /www/dev.litvurisacxobi.ge/public/mu-plugins/cmb2-user-select/cmb2-user-select.php on line 106