Importing menu and block fails and a warning is shown in the output.

Replicate from sample export

  1. Copy the attached pre exported file with has one menu item and one custom block to site's config_sync directory
  2. Import the menu and block with drush im --choice safe && drush ib --choice safe
  3. Failed import for menu and block

Replicate from scratch

  1. Create a menu and a custom block.
  2. Export them with drush em && drush eb && drush cex
  3. Spin up a new site
  4. Copy structure_sync.data.yml to the new site's config_sync directory.
  5. Import the menu and block with drush im --choice safe && drush ib --choice safe
  6. 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.

CommentFileSizeAuthor
#4 structure_sync.data_.yml844 bytestoamit

Comments

toamit created an issue. See original summary.

toamit’s picture

Issue summary: View changes
toamit’s picture

Issue summary: View changes
toamit’s picture

Issue summary: View changes
StatusFileSize
new844 bytes
toamit’s picture

Issue summary: View changes
pasperbla’s picture

After a Drupal update it gives me the same error, any solution? Thank you

louis-cuny’s picture

You should try to manually add a menu item & block and export them.
You probably will have a syntax difference