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

Unable to (re)create network alias via cli #1473

Closed
dustinrue opened this issue Aug 28, 2019 · 1 comment
Closed

Unable to (re)create network alias via cli #1473

dustinrue opened this issue Aug 28, 2019 · 1 comment
Labels

Comments

@dustinrue
Copy link
Contributor

dustinrue commented Aug 28, 2019

Describe the bug
Unable to recreate network alias. May also fail to create the alias at all, unable to test.

Steps to Reproduce

wp elasticpress recreate-network-alias
Recreating post network alias...
PHP Fatal error:  Uncaught Error: Call to undefined function get_sites() in /Users/dustin/Sites/index.test/wordpress/wp-content/plugins/elasticpress/includes/utils.php:186
Stack trace:
#0 /Users/dustin/Sites/index.test/wordpress/wp-content/plugins/elasticpress/includes/classes/Command.php(419): ElasticPress\Utils\get_sites()
#1 /Users/dustin/Sites/index.test/wordpress/wp-content/plugins/elasticpress/includes/classes/Command.php(401): ElasticPress\Command->create_network_alias_helper(Object(ElasticPress\Indexable\Post\Post))
#2 [internal function]: ElasticPress\Command->recreate_network_alias(Array, Array)
#3 phar:///usr/local/Cellar/wp-cli/2.2.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(98): call_user_func(Array, Array, Array)
#4 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
#5 phar:///usr/local/Cellar/wp-cli/2.2.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(451): call_user_func(Object(Closure), Array, Array)
#6 phar:///usr/local in /Users/dustin/Sites/index.test/wordpress/wp-content/plugins/elasticpress/includes/utils.php on line 186

Expected behavior
No error

Environment information

  • Plugins and version: 3.1.3

Additional context

@felipeelia
Copy link
Member

We've made a few changes in that part of the code in the last few months and it is fixed. Thanks, @dustinrue!

ps.: Probably it was already working some time ago but I've tested it with 3.5.5 and I can't reproduce it anymore.

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

No branches or pull requests

2 participants