- ππΊHungary SunnyGambino Buj
Thanks for the documentation! It saved me hours! I would like to suggest to place it into a README.md file into the codebase!
- π©π°Denmark ressa Copenhagen
I was puzzled by all the steps in the README, and think it could be made clearer, by splitting it up into a normal configuration flow, and manual click to export/import like this :
Configuration
Select menu(s) to export under "Menu Export" (
admin/config/development/menu_export
).The menu(s) will now be included in the configuration flow, after running
drush config:export
in development, ready to be imported on the production site. For more about configuration, see https://www.drupal.org/docs/configuration-management/managing-your-sites... β .Manual export and import
- Visit "Export" tab (
admin/config/development/menu_export/export
) and press "Export" button - Copy exported configuration YAML to the target site.
- On the target site, visit the "Import" tab (
admin/config/development/menu_export/import
) to import menus
- Visit "Export" tab (
- π©π°Denmark ressa Copenhagen
I have tested, and the items are not imported during a regular config import, luckily there's work being done on Drush commands.
- πΊπΈUnited States jim_b
6. Copy this menu_export.export_data.yml file to the files/config_bunch_of_unique_characters_here/sync folder on your destination site.
7. Go to the destination site and run drush cim --partial or drush config:import --partial and confirm that you want to import this config.
8. Look at the command output to make sure it worked.
9. Go to /admin/structure/menu/ to find your imported menu there :-).Unfortunately in my testing, these steps are not entirely correct. I'm testing with Drupal v9.5.x.
There is an additional step required, see below:When I do a partial import with my "menu_export.export_data.yml" file, which lives in: 'config-menu-test/':
drush cim --partial --source=/config-menu-test -y
The import says it is successful:
[success] The configuration was imported successfully.
But after clearing the cache and viewing the menu as in Step #9, unfortunately the menu is still not updated.
The menu is only updated after going to:
'/admin/config/development/menu_export/import'
and clicking "Import Menu Links".Then viewing the menu (step #9) will show the updated menu.
There should be a step between #8 and #9:
Go to: '/admin/config/development/menu_export/import', click "Import Menu Links".Unfortunately this requirement to use the Admin GUI limits the usefulness of this module for automated deployments. I hoped just
drush cim partial import
would work by itself.