- Issue created by @ressa
- 🇷🇴Romania bbu23
Hi ressa,
Thank you for reporting this issue.
Yes indeed, I am aware of this. Now, the thing is that we are deleting the whole structure before import. So, the Views would lose the parent upon import. I don't remember if Views are creating MenuLinkContent items or not, but even so, the parent will have a new ID & UUID and Views is not aware of that.
At the moment, I have no plans on managing that case, since the workaround exists and it is not a blocker. Indeed, it's much nicer to have it there, same situation with nodes and the their menu setting. Though this could be tied up with a potential change in the way we import/export menus, but that's a future plan that I have to think about.
I have a similar situation with Taxonomy Menu, but in this particular case I know for sure that the taxonomy menu items are not MenuLinkContent, and I have a separate drush command that fixes the parent.
I will come back to this in the future, but for now I'll leave it open.
- Merge request !6Issue #3405842: Emphasize that menu items should only be added via menus, not views → (Merged) created by ressa
- Status changed to Needs review
about 1 year ago 10:37am 11 December 2023 - 🇩🇰Denmark ressa Copenhagen
Thanks for a fast reply @bbu23, and for clarifying why this happens. Great that you are aware of this, and I agree that a workaround exists and works fine. A more elaborate solution could be made in the future.
Since adding menu items via Views is very common, I think we should document it right away in the README and on the project page, to save people from wasting time, failing on import, experimenting and debugging, and finally understanding why it happens.
Since there is now a proposed solution, the challenge of supporting View menu items can be handled in a follow up issue, whereas this issue is now actionable, and it is an annoying bug for the uninitiated, so changing status to Normal.
- 🇩🇰Denmark ressa Copenhagen
You're welcome, and feel free to review the MR here, when you have time.
- 🇷🇴Romania bbu23
Hi ressa, I quickly looked at the MR. I left 1 tiny comment, the rest should be fine. Thanks
- 🇷🇴Romania bbu23
And I'm not sure if we should link the related issue in the README or not (regarding Views). I'll leave that up to you. (close to line 31)
- 🇩🇰Denmark ressa Copenhagen
Thanks for the review, and your proposal to link to the Views support issue makes sense, so I added it. I also aligned the line length with the 80 char recommendation.
I noticed that you added issue number first in the MR title. If it's a good idea, should an issue be created in https://www.drupal.org/project/infrastructure/ → to add that in the template, if it's possible? Or will the move to Gitlab soon make it irrelevant to spend energy on?
- Status changed to Fixed
about 1 year ago 10:12pm 12 December 2023 - 🇷🇴Romania bbu23
Thank you, looks good to me, merged. I appreciate the 80 chars adjustments, I do prefer that for sure.
As for infra I've never used it. I think Gitlab integration with issues is great, so I wouldn't invest time in that.
Thanks! - 🇷🇴Romania bbu23
Here's an idea, ressa. I added a new documentation guide for this module, since you've been proposing multiple changes to the readme. I think it's time to have a guide as well. If you'd like to contribute or even maintain the documentation guide, let me know. I created this issue for planning: https://www.drupal.org/project/menu_migration/issues/3408322 🌱 In-depth Module Documentation Active
- 🇩🇰Denmark ressa Copenhagen
This is a great idea! Though I think if we just copied over the README, we would have to maintain it both places ... So maybe link to the README, and use the documentation pages for advanced topics, such as how to add features, and create custom solutions? Like for example Leaflet → . What do you think?
Automatically closed - issue fixed for 2 weeks with no activity.