Hi,
As the public version throw fatal error on export (missing parameter) I've used the dev version.
But this time it's import that doesn't work.
First thing is the use of $key instead $menu_name to check existence of a menu :
if (!Menu::load($key)) {
$invalidMenus[] = $menu_name;
continue;
}
Second the module check existence of the combinaison of menu-name and menu-link-id.
$menuLinkEntity = \Drupal::entityQuery('menu_link_content')
->condition('menu_name', $menu_name)
->condition('id', $key)
->execute();
The good practice is to use the UUID instead.
Other point is to unset the menu ID to prevent duplicate PRIMARY KEY exception.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2925814-import-not-working.patch | 876 bytes | PtitKev |
Issue fork menu_export-2925814
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
PtitKev commentedHere is my participation. Work for me.
Does not have a multidimensional menu but since the parent ID is a UUID it should work.
Comment #3
joelpittetComment #4
joelpittetIt seems that the dev branch is behind the actual release tag for some reason. This patch doesn't apply against the latest code. Thanks for the proposed patch though, hopefully the maintainer can update the dev branch with the latest code.
Comment #5
sandeepguntaka commentedThanks, I ve missed updating the dev branch of the repo. I just did.
Thanks again for pointing that.
Comment #6
sandeepguntaka commentedComment #8
sitiveni commentedHi there,
I stumbled upon another "Duplicate entry" error:
Solution is to unset the
revision_idtoo: