Problem/Motivation
If use the Drush command fim to try to import module that has no *.features.yml file, no configuration will be "updated", and you won't get any notification for that.
Steps to reproduce
- create new module with at least one config file in /config/install
- Do not add .features.yml
- try to import module with
drush fim <your_module> - Config will not be imported (nothing happens).
Expected: Features prints a message indicating that the module is not a feature module.
Proposed resolution
- Call
FeaturesManager::isFeatureModule(). - On FALSE, throw Exception and print message "[module name] is not a feature module."
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 3229045.png | 98.79 KB | hmendes |
Issue fork features-3229045
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
Comment #2
nedjoHi, I'm not totally clear on what the precise issue is. Could you please fill out "steps to reproduce"? Thanks!
Comment #3
holo96 commentedComment #4
holo96 commentedComment #5
nedjo@DavorHorvacki: Thanks, that makes it clear.
From the "steps to reproduce" it sounds like the issue is not to do with a defined bundle per se but that the module in question isn't a features module in the first place. I imagine a fix might include a call to
FeaturesManager::isFeatureModule(). The user message onFALSEmight be "[module name] is not a feature module." Updating the summary accordingly.Patch very welcome!
There might be a distinct issue, where a
*.features.ymlfile exists but no bundle is defined. If so, that would be a separate bug.Comment #6
holo96 commentedExactly, thanks
Comment #7
paulocsI'm working on it.
Comment #8
paulocsIsn't it already doing this verification?
I tried drush features-import test
I tried to run
drush features-import modal_pageand i got the error below:No such feature is available: modal_pageComment #9
holo96 commentedYes, but if you try with existing module that is not part of any features bundle (no module_name.features.yml) you won't have that error message, to be more precise, nothing will happen, neither config will be imported, neither you will get error message.
For example you can try any contrib modules: `drush features-import admin_toolbar`
Comment #11
paulocsComment #12
hmendes commentedHello,
Tested the MR from #10 and it worked for me. Changing this to RTBC.
Tested with Drupal 9.2.7 and Features 8.x-3.x-dev.