README.txt 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. Configuration Update Reports module
  2. -----------------------------------
  3. CONTENTS OF THIS README FILE
  4. - Introduction
  5. - Installation
  6. - Generating reports in the user interface
  7. - Generating reports using Drush commands
  8. - Important notes *** Be sure to read this section ***
  9. INTRODUCTION
  10. This module provides a report that allows you to see the differences between the
  11. default configuration items provided by the current versions of your installed
  12. modules, themes, and install profile, and the active configuration of your
  13. site. From this report, you can also import new configuration provided by
  14. updates, and revert your site configuration to the provided values.
  15. The main use case is: You update a module, and it has either changed default
  16. configuration that it provides, or added new default configuration items that
  17. you didn't get when you first installed the module. You want to be able to
  18. import the new items, view the differences between the active site configuration
  19. and the changed configuration, and possibly "revert" (or it may be an update) to
  20. the newly-provided default configuration.
  21. INSTALLATION
  22. Install the module in the normal way for Drupal modules. The only dependencies
  23. are the Configuration Manager module (Drupal core), and the Configuration Update
  24. Base module (part of this same project download).
  25. GENERATING REPORTS IN THE USER INTERFACE
  26. You can generate configuration reports at Administration >> Configuration >>
  27. Development >> Configuration management >> Update report (path:
  28. admin/config/development/configuration/report ).
  29. You can generate a report for a particular type of configuration object, such as
  30. Actions, Tours, Views, etc. Or, you can generate a report for an installed
  31. module, theme, or install profile. Finally, you can generate a report that
  32. contains all configuration in one report.
  33. The report has three sections, depending on what type you choose:
  34. 1. Missing configuration items: Configuration items that are provided as
  35. defaults by your currently-installed modules, themes, and install profile
  36. that are missing from your active site configuration.
  37. Any items listed here can be imported into your site.
  38. 2. Added configuration items: Configuration items that you added to the site
  39. (not provided by a currently-installed module, theme, or install
  40. profile). This section is only shown when you are running the report based on
  41. a configuration type.
  42. Items listed here can be exported, which is useful for developers or if you
  43. want to keep your site configuration in a version control system.
  44. 3. Changed configuration items: Configuration items that are in your active site
  45. configuration that differ from the same item currently being provided by an
  46. installed module, theme, or install profile.
  47. You can export these items, see the differences between what is on your site
  48. and what the module/theme/profile is currently providing, or "revert" to the
  49. version currently being provided by the module/theme/profile in its default
  50. configuration.
  51. Note that the differences may be a bit hard to read, but hopefully they'll
  52. give you the general idea of what has changed.
  53. GENERATING REPORTS USING DRUSH COMMANDS
  54. The reports detailed in the previous section can also be generated, in pieces,
  55. using Drush commands (https://drupal.org/project/drush):
  56. drush config-list-types (clt)
  57. Lists all the config types on your system. Reports can be run for
  58. 'system.simple' (simple configuration), and 'system.all' (all types), in
  59. addition to the types listed by this command.
  60. drush config-added-report (cra)
  61. drush config-missing-report (crm)
  62. drush config-different-report (crd)
  63. Run config reports (see below).
  64. drush config-diff (cfd)
  65. Show config differences for one item between active and imported (see below).
  66. The report commands run reports that tell what config has been added, is
  67. missing, or is different between your active site configuration and the imported
  68. default configuration from config/install directories of your installed profile,
  69. modules, and themes.
  70. For each report except "added", the first argument is one of:
  71. - type: Runs the report for a configuration type; use drush config-list-types to
  72. list them.
  73. - module: Runs the report for an installed module.
  74. - theme: Runs the report for an installed theme.
  75. - profile: Runs the report for the install profile.
  76. The second argument for reports is the machine name of the configuration type,
  77. module, theme, or install profile you want to run the report for. For the
  78. "added" report, this is the only argument, as the added report is always by
  79. configuration type.
  80. These are the same as the reports you get in the UI, which is described above;
  81. the only difference is that in Drush the report is separated into pieces.
  82. Once you have found a configuration item with differences, you can view the
  83. differences using the config-diff command. This is a normalized/formatted diff
  84. like in the UI of this module, so see above for details.
  85. Drush examples:
  86. drush clt
  87. drush crm module node
  88. drush cra block
  89. drush crd theme bartik
  90. drush crd type system.all
  91. drush crd type system.simple
  92. drush crd profile standard
  93. drush cfd block.block.bartik_search
  94. Once you have figured out which configuration items are added, missing, or
  95. different, you can:
  96. - Export them - see drush config-export.
  97. - Import missing configuration or revert to provided default values. To do this:
  98. (1) Locate the configuration file in the install profile, module, or theme
  99. config/install directory.
  100. (2) Copy this file to your configuration staging directory.
  101. (3) Run drush config-import. You might want to use the --preview option to see
  102. what differences you are about to import, before running the import, or
  103. use the drush config-diff command to look at individual differences.
  104. IMPORTANT NOTES
  105. Here are some notes about how this module functions:
  106. * This module is always looking at the base configuration items, without
  107. overrides (from settings.php, for example) or translations.
  108. * It is possible for an install profile on a site to provide configuration that
  109. overrides configuration from a module or theme. The install profile version
  110. always takes precedence. As an example, consider the case where module Foo
  111. provides a configuration item called foo.settings, and install profile Bar
  112. overrides this with its own file. Any reports that include foo.settings will
  113. be based on the differences between your site's active configuration and the
  114. version in the install profile. This is not usually a problem, but it can be
  115. confusing if you're looking at the Foo module report. The foo.settings item
  116. will be present, but the differences reported will be between the install
  117. profile's version and your site's active configuration, not the differences
  118. between the Foo module version and your site's active configuration.