As per the title, this module currently makes a mess of menus with nested items.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | old.png | 440.28 KB | kenny83 |
| #9 | new.png | 439.08 KB | kenny83 |
| #5 | After.png | 421.53 KB | brooke_heaton |
| #5 | Before.png | 435.46 KB | brooke_heaton |
As per the title, this module currently makes a mess of menus with nested items.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | old.png | 440.28 KB | kenny83 |
| #9 | new.png | 439.08 KB | kenny83 |
| #5 | After.png | 421.53 KB | brooke_heaton |
| #5 | Before.png | 435.46 KB | brooke_heaton |
Comments
Comment #2
sandeepguntaka commentedWhen i tried i didn't face any such one. Could you post a screenshot which would be very helpful. I know it is too late to ask but if any chance please do.
Comment #3
dddbbb commentedSorry, way too late. No longer using the module.
Comment #4
brooke_heaton commentedThis is true. Menus with a structured hierarchy two or three levels deep will be exported/imported completely scrambled. Use with caution!
Comment #5
brooke_heaton commentedBefore


After
Comment #6
ivnishI try today export-import menu with 3-level deep. No problem.
Comment #7
komlenic commentedI can confirm that exporting a 2-level menu and importing results in a completely jumbled menu.
Comment #8
ivnishComment #9
kenny83 commentedI know this issue is nearly 2 years old now, but I am still facing it on a Drupal 8 site with version 8.x-1.2 of the module. This is incredibly frustrating as I can't find any other modules that get so close to importing a complex menu structure correctly.
To make the matter even worse, I have stepped through the import form's
submitForm()function with XDebug and everything seems to be working properly. I have also investigated the created/edited rows of themenu_link_contentandmenu_link_content_datatables, which also seem to be as they should be! Looking at the corresponding rows in my old and new DBs, theweightandparentvalues are exactly the same!So what else could be causing the weird behaviour demonstrated in the attached screenshots?
Comment #10
ivnish@all I use https://drupal.org/project/default_content + https://drupal.org/project/default_content_deploy to deploy menu items from dev to prod. Try it too.
Comment #11
kenny83 commentedThanks @ivnish for the suggestion, but I ended up solving the problem with this module by editing the
submitForm()function of/src/Form/MenuImportForm.phplike so:The problem was that there is a
menu_treetable in the Drupal DB that was not being correctly updated by the previous code. The rows that are automatically generated in this table by the firstforeachloop do not always contain the correct values for theparent,depthorpXcolumns. My fix is not the prettiest, but it seems to do the job nicely.Hopefully this helps some other poor shlub who may struggle with this in the future! ;-)
Comment #12
ressaI just tried Menu migration (Import & Export) and the menu hierarchy is preserved.