buddypress / wp-cli-buddypress

WP-CLI Community Package of BuddyPress commands
GNU General Public License v3.0
47 stars 19 forks source link

Class not found while generating users #71

Closed Octopixell closed 5 years ago

Octopixell commented 6 years ago

Hi All,

I'm not sure if this is the right place to report this issue. If not, my humble apologies πŸ˜… I'd happily repost it elsewhere πŸ˜ƒ

When running the command wp bp member generate --count=1 I receive the following error with stacktrace:

$ wp bp member generate --count=1
PHP Fatal error:  Uncaught Error: Class 'Buddypress\CLI\Command\User_Command' not found in /srv/users/serverpilot/apps/bptester/public/wp-content/plugins/buddypress/cli/components/member.php:34
Stack trace:
#0 [internal function]: Buddypress\CLI\Command\Member->generate(Array, Array)
#1 phar:///opt/sp/bin/wp-cli.phar/php/WP_CLI/Dispatcher/CommandFactory.php(89): call_user_func(Array, Array, Array)
#2 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
#3 phar:///opt/sp/bin/wp-cli.phar/php/WP_CLI/Dispatcher/Subcommand.php(425): call_user_func(Object(Closure), Array, Array)
#4 phar:///opt/sp/bin/wp-cli.phar/php/WP_CLI/Runner.php(353): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)
#5 phar:///opt/sp/bin/wp-cli.phar/php/WP_CLI/Runner.php(376): WP_CLI\Runner->run_command(Array, Array)
#6 phar:///opt/sp/bin/wp-cli.phar/php/WP_CLI/Runner.php(1102): WP_CLI\Runner->_run_command_and_exit()
#7 phar:///opt/sp/bin/wp-cli.phar/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runn in /srv/users/serverpilot/apps/bptester/public/wp-content/plugins/buddypress/cli/components/member.php on line 34
Fatal error: Uncaught Error: Class 'Buddypress\CLI\Command\User_Command' not found in /srv/users/serverpilot/apps/bptester/public/wp-content/plugins/buddypress/cli/components/member.php:34
Stack trace:
#0 [internal function]: Buddypress\CLI\Command\Member->generate(Array, Array)
#1 phar:///opt/sp/bin/wp-cli.phar/php/WP_CLI/Dispatcher/CommandFactory.php(89): call_user_func(Array, Array, Array)
#2 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
#3 phar:///opt/sp/bin/wp-cli.phar/php/WP_CLI/Dispatcher/Subcommand.php(425): call_user_func(Object(Closure), Array, Array)
#4 phar:///opt/sp/bin/wp-cli.phar/php/WP_CLI/Runner.php(353): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)
#5 phar:///opt/sp/bin/wp-cli.phar/php/WP_CLI/Runner.php(376): WP_CLI\Runner->run_command(Array, Array)
#6 phar:///opt/sp/bin/wp-cli.phar/php/WP_CLI/Runner.php(1102): WP_CLI\Runner->_run_command_and_exit()
#7 phar:///opt/sp/bin/wp-cli.phar/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runn in /srv/users/serverpilot/apps/bptester/public/wp-content/plugins/buddypress/cli/components/member.php on line 34

Other commands like wp bp group generate --count=1 seem to be working just fine.

The stacktrace from above is from a server installed with Serverpilot. But the same error occurs in a server installed with Local by Flywheel.

Any ideas how to fix this? I'm kinda lost here. Thanks!

renatonascalves commented 6 years ago

I'll put a patch together later tonight! @Octopixell Thanks for reporting this. :)

Octopixell commented 6 years ago

You're a gentleman and a scholar! Thanks for the quick reply πŸ˜‰ happy I found the right repo πŸ˜›

Octopixell commented 6 years ago

Are there any updates on this @renatonascalves? Thanks for taking a look πŸ‘

renatonascalves commented 5 years ago

@Octopixell not yet! I will take a look at it very soon!

renatonascalves commented 5 years ago

@Octopixell This was fixed thanks to @dcavins :)