{"action":"created","issue":{"url":"https://api.github.com/repos/GlotPress/GlotPress-WP/issues/578","repository_url":"https://api.github.com/repos/GlotPress/GlotPress-WP","labels_url":"https://api.github.com/repos/GlotPress/GlotPress-WP/issues/578/labels{/name}","comments_url":"https://api.github.com/repos/GlotPress/GlotPress-WP/issues/578/comments","events_url":"https://api.github.com/repos/GlotPress/GlotPress-WP/issues/578/events","html_url":"https://github.com/GlotPress/GlotPress-WP/issues/578","id":182321660,"number":578,"title":"WP CLI command doesn't seem to respect the correct database prefix","user":{"login":"uprise10","id":1333461,"avatar_url":"https://avatars.githubusercontent.com/u/1333461?v=3","gravatar_id":"","url":"https://api.github.com/users/uprise10","html_url":"https://github.com/uprise10","followers_url":"https://api.github.com/users/uprise10/followers","following_url":"https://api.github.com/users/uprise10/following{/other_user}","gists_url":"https://api.github.com/users/uprise10/gists{/gist_id}","starred_url":"https://api.github.com/users/uprise10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uprise10/subscriptions","organizations_url":"https://api.github.com/users/uprise10/orgs","repos_url":"https://api.github.com/users/uprise10/repos","events_url":"https://api.github.com/users/uprise10/events{/privacy}","received_events_url":"https://api.github.com/users/uprise10/received_events","type":"User","site_admin":false},"labels":[{"id":253431649,"url":"https://api.github.com/repos/GlotPress/GlotPress-WP/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-11T17:13:42Z","updated_at":"2016-12-28T21:30:30Z","closed_at":null,"body":"When using the \"import-originals\" command for WP-CLI for a specific site in a multisite setup, the queries that are used (for selecting the project for example) are just using the prefix of the main site (`wp_gp_projects`) instead of the prefix of the chosen site (`wp_26_gd_projects`).\n\nThis is the command that I'm using:\n`wp glotpress import-originals my-project current/app/www/content/themes/my-theme/languages/walraven.pot --url=my-website.domain.dev`\n\nWhere `my-website.domain.dev` has blog_id 26.\n\nThe error that is shown is:\n\n> WordPress database error Table 'uprisedev.wp_gp_projects' doesn't exist for query SELECT \\* FROM wp_gp_projects WHERE path = 'my-project' made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/php/wp-cli.php'), WP_CLI\\Runner->start, WP_CLI\\Runner->_run_command, WP_CLI\\Runner->run_command, WP_CLI\\Dispatcher\\Subcommand->invoke, call_user_func, WP_CLI\\Dispatcher\\CommandFactory::WP_CLI\\Dispatcher{closure}, call_user_func, GP_CLI_Import_Originals->__invoke, GP_Project->by_path, GP_Thing->one\n> Error: Project not found!\n\nAs you can see the table prefix is just `wp_` instead of `wp_26_`\n\nFYI: when enabling the glotpress plugin in the main site, the above command just works great.\n"},"comment":{"url":"https://api.github.com/repos/GlotPress/GlotPress-WP/issues/comments/269543901","html_url":"https://github.com/GlotPress/GlotPress-WP/issues/578#issuecomment-269543901","issue_url":"https://api.github.com/repos/GlotPress/GlotPress-WP/issues/578","id":269543901,"user":{"login":"KingYes","id":902548,"avatar_url":"https://avatars.githubusercontent.com/u/902548?v=3","gravatar_id":"","url":"https://api.github.com/users/KingYes","html_url":"https://github.com/KingYes","followers_url":"https://api.github.com/users/KingYes/followers","following_url":"https://api.github.com/users/KingYes/following{/other_user}","gists_url":"https://api.github.com/users/KingYes/gists{/gist_id}","starred_url":"https://api.github.com/users/KingYes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KingYes/subscriptions","organizations_url":"https://api.github.com/users/KingYes/orgs","repos_url":"https://api.github.com/users/KingYes/repos","events_url":"https://api.github.com/users/KingYes/events{/privacy}","received_events_url":"https://api.github.com/users/KingYes/received_events","type":"User","site_admin":false},"created_at":"2016-12-28T21:30:30Z","updated_at":"2016-12-28T21:30:30Z","body":"Nice, thanks! :)"}}
{"actor":{"display_login":"KingYes"}}