Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Before wp installation cmb2-user-select error #5

Open
sandrodz opened this issue Jun 20, 2017 · 5 comments
Open

Before wp installation cmb2-user-select error #5

sandrodz opened this issue Jun 20, 2017 · 5 comments

Comments

@sandrodz
Copy link

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

@tw2113
Copy link
Contributor

tw2113 commented Jun 20, 2017

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.

@sandrodz
Copy link
Author

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.

@sandrodz
Copy link
Author

screen shot 2017-06-20 at 10 30 53 am

@tw2113
Copy link
Contributor

tw2113 commented Jun 20, 2017

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.

@sandrodz
Copy link
Author

sandrodz commented May 4, 2018

In the new project, I cannot get it to work at all. Yes its being autoloaded before WordPress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants