0

I am planning to use features to bundle some of my specific works. Example: I want to bundle article content types along with its views, fields and related other stuffs. Can I just use features to create new article module through features ui and use it? How would it behaves when there is already configuration related to article in my sync folder which contains entire site configuration? Does anyone has experience on working with both of them simultaneously?

Thanks,

CIsSharp

2
  • You're planning to create a multilingual site? Commented Feb 15, 2018 at 15:20
  • No. We have 5 devs working with different areas and there are lot of collisions while doing config sync and chance of overriding another's changes. So want to get rid of such issues.
    – cissharp
    Commented Feb 15, 2018 at 16:07

1 Answer 1

2

Can I just use features to create new article module through features ui and use it?

Except for some very trivial use cases: No. But Features still is a good starting point and a big time saver.

  • Don't expect Features to produce ready-to-use modules of complex Features. It is a great code/stub generator, but be prepared for finetuning both before in Features UI and afterwards on file level.
  • Plan your fields carefully: While single-use fields make it easier to create Feature modules, but reusing fields (or more exactly: reusing field storage) across different node types saved me a lot of work later in Views and themeing.
  • I always use "Mark all config as required" and "Allow conflicts", and afterwards move the generated config from config/install to config/optional. I guess this is not the standard Features workflow, but I do this for 2 reasons:
    • It prevents clashes between Features and existing core config/sync. If an optional config setting already exists, it will silently be ignored instead of stopping with errors.
    • I found it way easier to manage larger but meaningful modules with some duplicated config, than to split everything into super-small modules with a dependency nightmare.

I'm not quite certain if my experiences are useful to you though, because we are a small company with me being the sole developer. We are trying to reuse Features across different projects, not to avoid collisions on the same project.

2
  • Thanks @Hudri. Do you know any other alternatives (modules) rather than features to work with?
    – cissharp
    Commented Feb 20, 2018 at 13:15
  • Drupal Console for code generation, and the Configuration update manager to manually update some very specific settings of modules during development. Generally I'd advise to take a look at the "related" modules on the config_update project page.
    – Hudri
    Commented Feb 20, 2018 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.