-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
drush config-import --partial doesn't create field tables in DB #2069
Comments
drush just calls core API's. This should work and we have tests in core that it does. I've also imported fields like this. |
Any idea why it's not working in my case, then? I'm using the --source and --partial options. I'm very certain that it isn't working, I've tried the test a number of times. |
Can you try without --partial? That is, do a config-export, add/update the
new files, and config-import from there.
|
When I didn't use the partial option, the node__field and node__revision tables are created. It seems like it must only be the --partial option that this is happening for, then. |
Thanks for testing that. --partial uses a very low level API and apparently bypasses a lot of the config event system. We either need to put warnings on --partial, remove it, change it, or something else. I have long thought that--partial should
You can see us bypassing the API by comparing these: ping @jhedstrom since he added it in #1170. |
The thing is that config-import removing configs from active storage if they aren't included to importing one. |
With the 3 steps I posted above, --partial would never remove anything. |
Back in stone age... Before every deploy to prod, developer should grab all configs from there, resolve hundreds of conflicts, and deploy everything again... |
I dont understand that last comment. If we replace the current --partial with the steps above (which are the same steps we do for config-edit already), then we need to decide about backward compat. Its arguably a bug fix but some folks may be surprised by new validation failures, new database fields getting created, etc. |
Yeah, I understand. Those three steps are a good workaround for now. Thanks. |
It duplicates config-import --partial, and is buggy. A fix for --partial is coming in #2069
Fix #2069. config-import --partial works at too low a level.
Would be great if someone using --partial could confirm that this is fixed for them. I added a unit test which is passing so we should be good. |
It duplicates config-import --partial, and is buggy. A fix for --partial is coming in #2069
I've tested this and it's working to create the tables. But, there are a couple of import scenarios that worked before that don't work after the change:
|
Almoste same issue here: #2278 |
What version of Drush? We made a relevant fix in 8.1.0 |
Hi, I'm using 8.0.5 :( Here's the full details of
|
This is fixed in recent Drush releases. |
Hi, Here's my new drush details: |
I've dealt with this problem a lot (before it was fixed in the newer versions) and it seemed that if you import the config with the old version of drush, switching to the new version and importing the fields will still not create the tables. You should try importing them on a newly installed site, or from a backup of your site before you imported with the old drush. If you still need the current version of your site, try doing some config cleanup first. The new drush definitely works with this, as long as you don't have old config in the DB. |
It duplicates config-import --partial, and is buggy. A fix for --partial is coming in drush-ops#2069
Sorry if this isn't an issue, but it feels like one.
In D8, if using Drupal's config sync from the UI, new fields create their tables in the DB. If I do the following:
...the tables in the DB aren't created, but the config for this field exists in the DB. What's worse, if I also changed the config of a view to rely on the new field I made, the site will crash trying to load the field from the tables that don't exist.
I greatly appreciate things that automate what could be done in the UI. If drush cim is not made for this, is there a way to tell Drupal, "Hey, you know those fields in your config? I want those."
Tried with D8 8.0.5 and Drush 8.0.5. Thanks for reading.
The text was updated successfully, but these errors were encountered: