Drupal Answers Asked on October 26, 2021
When I’m exporting the custom content type definitions using the UI, many of the resulting YML files hold a uuid
and default_config_hash
, like:
uuid: b69d8e54-076c-4a15-a396-19f49369fa68
...
_core:
default_config_hash: 3aSvUp4PtrivflrkaLdNRL1USkZLsS7NdQroSiRX9mA
...
Now, when I’m using this as a basis for my custom module, is it recommended to remove those lines?
Yes, it is best practice to remove both.
Drupal Console provides these options:
drupal config:export:single
--name=config.settings.name
--remove-uuid
--remove-config-hash
Or export an entire set of YAML files of a content type directly to the modules install folder:
drupal config:export:content:type page
--module="demo"
--optional-config
--remove-uuid
--remove-config-hash
See https://drupalconsole.com/docs/en/commands/config-export-content-type
Answered by 4k4 on October 26, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP