{"action":"created","issue":{"url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/issues/1313","repository_url":"https://api.github.com/repos/hechoendrupal/DrupalConsole","labels_url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/issues/1313/labels{/name}","comments_url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/issues/1313/comments","events_url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/issues/1313/events","html_url":"https://github.com/hechoendrupal/DrupalConsole/issues/1313","id":118133474,"number":1313,"title":"[config:import:single] Config importers should use the config importer service","user":{"login":"Jaesin","id":159693,"avatar_url":"https://avatars.githubusercontent.com/u/159693?v=3","gravatar_id":"","url":"https://api.github.com/users/Jaesin","html_url":"https://github.com/Jaesin","followers_url":"https://api.github.com/users/Jaesin/followers","following_url":"https://api.github.com/users/Jaesin/following{/other_user}","gists_url":"https://api.github.com/users/Jaesin/gists{/gist_id}","starred_url":"https://api.github.com/users/Jaesin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jaesin/subscriptions","organizations_url":"https://api.github.com/users/Jaesin/orgs","repos_url":"https://api.github.com/users/Jaesin/repos","events_url":"https://api.github.com/users/Jaesin/events{/privacy}","received_events_url":"https://api.github.com/users/Jaesin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jmolivas","id":366275,"avatar_url":"https://avatars.githubusercontent.com/u/366275?v=3","gravatar_id":"","url":"https://api.github.com/users/jmolivas","html_url":"https://github.com/jmolivas","followers_url":"https://api.github.com/users/jmolivas/followers","following_url":"https://api.github.com/users/jmolivas/following{/other_user}","gists_url":"https://api.github.com/users/jmolivas/gists{/gist_id}","starred_url":"https://api.github.com/users/jmolivas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmolivas/subscriptions","organizations_url":"https://api.github.com/users/jmolivas/orgs","repos_url":"https://api.github.com/users/jmolivas/repos","events_url":"https://api.github.com/users/jmolivas/events{/privacy}","received_events_url":"https://api.github.com/users/jmolivas/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/milestones/2","html_url":"https://github.com/hechoendrupal/DrupalConsole/milestones/must-have","labels_url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/milestones/2/labels","id":1161186,"number":2,"title":"must-have","description":"sdsd","creator":{"login":"jmolivas","id":366275,"avatar_url":"https://avatars.githubusercontent.com/u/366275?v=3","gravatar_id":"","url":"https://api.github.com/users/jmolivas","html_url":"https://github.com/jmolivas","followers_url":"https://api.github.com/users/jmolivas/followers","following_url":"https://api.github.com/users/jmolivas/following{/other_user}","gists_url":"https://api.github.com/users/jmolivas/gists{/gist_id}","starred_url":"https://api.github.com/users/jmolivas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmolivas/subscriptions","organizations_url":"https://api.github.com/users/jmolivas/orgs","repos_url":"https://api.github.com/users/jmolivas/repos","events_url":"https://api.github.com/users/jmolivas/events{/privacy}","received_events_url":"https://api.github.com/users/jmolivas/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":33,"state":"open","created_at":"2015-06-12T00:29:42Z","updated_at":"2016-02-03T20:21:45Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-11-20T21:51:15Z","updated_at":"2016-02-18T15:36:42Z","closed_at":null,"body":"I notices when trying to import field storage and fields with the console `config:import:single` the DB tables don't get created. There must be some missing steps that aren't getting executed when config is imported so I started looking at the batch for importing config from the UI. \r\n\r\nRelevant code from the form based importer that uses the drupal batch API: \r\n\r\n```\r\n// \\Drupal\\config\\Form\\ConfigSingleImportForm::validateForm\r\n\r\n      $source_storage = new StorageReplaceDataWrapper($this->configStorage);\r\n      $source_storage->replaceData($config_name, $data);\r\n      $storage_comparer = new StorageComparer(\r\n        $source_storage,\r\n        $this->configStorage,\r\n        $this->configManager\r\n      );\r\n\r\n        $config_importer = new ConfigImporter(\r\n          $storage_comparer,\r\n          $this->eventDispatcher,\r\n          $this->configManager,\r\n          $this->lock,\r\n          $this->typedConfigManager,\r\n          $this->moduleHandler,\r\n          $this->moduleInstaller,\r\n          $this->themeHandler,\r\n          $this->getStringTranslation()\r\n        );\r\n// \\Drupal\\config\\Form\\ConfigSingleImportForm::submitForm\r\n $config_importer = $form_state->get('config_importer');\r\n $sync_steps = $config_importer->initialize();\r\n// Batch Stuff\r\n        foreach ($sync_steps as $sync_step) {\r\n          $batch['operations'][] = [[ConfigSync::class, 'processBatch'], [$config_importer, $sync_step]];\r\n        }\r\n// \\Drupal\\config\\Form\\ConfigSync::processBatch\r\n    $config_importer->doSyncStep($sync_step, $context);\r\n```\r\n\r\nRepro instructions. \r\n\r\n1. Create a new field on any type of entity.\r\n1. Export config.\r\n1. Import the field storage from the export: `cat sites/default/config/field.storage.node.field_foo.yml | console config:import:single field.storage.node.field_foo`\r\n1. Import the field definition from the export: `cat sites/default/config/field.field.node.page.field_foo.yml | console config:import:single field.field.node.page.field_foo`\r\n1. Try to add content and you will get an error because the field tables do not exist.\r\n"},"comment":{"url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/issues/comments/185779214","html_url":"https://github.com/hechoendrupal/DrupalConsole/issues/1313#issuecomment-185779214","issue_url":"https://api.github.com/repos/hechoendrupal/DrupalConsole/issues/1313","id":185779214,"user":{"login":"FatherShawn","id":414635,"avatar_url":"https://avatars.githubusercontent.com/u/414635?v=3","gravatar_id":"","url":"https://api.github.com/users/FatherShawn","html_url":"https://github.com/FatherShawn","followers_url":"https://api.github.com/users/FatherShawn/followers","following_url":"https://api.github.com/users/FatherShawn/following{/other_user}","gists_url":"https://api.github.com/users/FatherShawn/gists{/gist_id}","starred_url":"https://api.github.com/users/FatherShawn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FatherShawn/subscriptions","organizations_url":"https://api.github.com/users/FatherShawn/orgs","repos_url":"https://api.github.com/users/FatherShawn/repos","events_url":"https://api.github.com/users/FatherShawn/events{/privacy}","received_events_url":"https://api.github.com/users/FatherShawn/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T15:36:42Z","updated_at":"2016-02-18T15:36:42Z","body":"I just tried to use the config:import:single as follows:\r\n`drupal config:import:single views.settings <my file path>/docroot/core/modules/views/config/install/views.settings.yml` and the command just hung - never returned prompt nor seemed to execute."}}