Importing menu and block fails and a warning is shown in the output.
Replicate from sample export
- Copy the attached pre exported file with has one menu item and one custom block to site's config_sync directory
- Import the menu and block with drush im --choice safe && drush ib --choice safe
- Failed import for menu and block
Replicate from scratch
- Create a menu and a custom block.
- Export them with drush em && drush eb && drush cex
- Spin up a new site
- Copy structure_sync.data.yml to the new site's config_sync directory.
- Import the menu and block with drush im --choice safe && drush ib --choice safe
- Failed import for menu and block, see output log noted below.
Output log
drush im --choice safe
Importing blocks...
Using "Safe" import style
[notice] Custom blocks import started
[notice] Using "safe" style for custom blocks import
[warning] Invalid argument supplied for foreach() BlocksController.php:358
[notice] Flushing all caches
[notice] Successfully flushed caches
[notice] Successfully imported custom blocks
drush ib --choice safe
Importing menu links...
Using "Safe" import style
[notice] Menu links import started
[notice] Using "safe" style for menu links import
[warning] Invalid argument supplied for foreach() MenuLinksController.php:382
[notice] Flushing all caches
[notice] Successfully flushed caches
[notice] Successfully imported menu links
PS: Thanks for sharing and maintaining this very useful module.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | structure_sync.data_.yml | 844 bytes | toamit |
Comments
Comment #2
toamit commentedComment #3
toamit commentedComment #4
toamit commentedComment #5
toamit commentedComment #6
pasperbla commentedAfter a Drupal update it gives me the same error, any solution? Thank you
Comment #7
louis-cuny commentedYou should try to manually add a menu item & block and export them.
You probably will have a syntax difference