In the UI from config_update_ui, you'll see new configuration that was added in a module and have the option to import it.

Via drush, running drush cfrm module NAME doesn't import new config, whereas my expectation is that command would set everything to match the config in the module, including importing new onfig

It appears the bug is in drush_config_update_ui_config_different_report() which only looks for differences, and not new config.

CommentFileSizeAuthor
#8 config_update_import_all.png46.84 KBbserem
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dsnopek created an issue. See original summary.

jhodgdon’s picture

I don't think this is a bug. The reports in the UI (and in Drush) are separated out into different sections.

There is config-added-report (cra), config-different-report (crd), config-inactive-report (cfi), and config-missing-report (cfm). They do not overlap, and that is by design. And similarly, there are non-overlapping commands to import/revert config: config-revert (cfr) for items that already exist, and config-import-missing (cfi) for missing items.

I guess there is not a config-import-all-missing or config-import-missing-multiple that would do all missing items from a module... we could convert this into a feature request and add that command, if that would be helpful? But I don't think it's a good idea, especially since the module has been out for quite a while now, to change the behavior of the revert command so that it also imports missing items.

Thoughts?

dsnopek’s picture

Title: Reverting module via drush doesn't import new configuration objects » Add way to import all new configuration objects via Drush
Category: Bug report » Feature request

I guess there is not a config-import-all-missing or config-import-missing-multiple that would do all missing items from a module... we could convert this into a feature request and add that command, if that would be helpful?

That makes sense! Re-titled and made into a Feature request.

It would also be nice to have a command that does both revert and import missing (which is what drush features-revert does) so I don't have to run two commands to be sure the module's config is in its install state.

nedjo’s picture

Because of complex dependency issues, so far we've intentionally steered clear of trying to handle sets of config items.

jhodgdon’s picture

Good idea to make a "restore and import multiple" command too. Maybe use the word "restore" or something like that in the command name, to make it distinct from both revert and import? I can't think right now what it should be called... config-restore-multiple?

Anyway, consider your feature(s) requested. The commands shouldn't be too hard to write...

jhodgdon’s picture

well, we do have the revert-multiple command already...

nedjo’s picture

which just shows I'm behind the times ;)

bserem’s picture

Title: Add way to import all new configuration objects via Drush » Add way to mass import all new configuration objects via Drush or UI
Issue summary: View changes
StatusFileSize
new46.84 KB

+1 for this, ideally it being able to solve import order dependencies.

At the moment it is possible to import all missing configuration from the command line with:
drush crm profile my_custom_profile | xargs -L1 drush cfi

I also believe that it would be handy to add a "Import all from Source" button/operation, so that we don't have to do dozens of clicks to import config changes. Something like this:
Import all new config button.

In the above picture I need to go through 4 operations, all of them requiring a verification and all of will not come back to the page with the operations. Thus importing becomes a rather nerve-breaking task :)

nevergone’s picture

@bserem
drush crm profile my_install_profile | sed 's/- //g' | xargs -L1 drush cfi

bserem’s picture

I'll check this!

jayhuskins made their first commit to this issue’s fork.