Automattic / Automattic/jetpack
Restaurant Menu: Issues with section display when items are assigned to multiple sections
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Issue
This is a preexisting issue with the Restaurant Menu custom post type. Items can be included in various menu sections, however will only display in one section in the main Menu Items list. Dragging the items to different sections will remove all selected sections and only add the new section.
### How to replicate
To replicate the issue:
* Install a theme which includes support for the Restaurant Menu CPT such as Confit.
* Add several menu items - you can click on 'Add Many Items' from the Food Menus admin menu - `/wp-admin/edit.php?post_type=nova_menu_item&page=add_many_nova_items`
* Add a few menu sections via `/wp-admin/edit-tags.php?taxonomy=nova_menu&post_type=nova_menu_item`, including sub-sections
* Assign menu items to different sections, some to more than one (you can do this via 'Quick Edit' from the Menu Items page: `/wp-admin/edit.php?post_type=nova_menu_item`
* Notice menu items will only display under one section name.
* Move (by dragging) one of the menu items that is assigned to multiple sections. Save the new order.
* Notice that the only section listed for that item is the newly assigned section.
### Expected result
* Either selecting multiple menu sections for an item should not be allowed, or dragging the item should change the displayed menu section only and keep the other ones.
### Prevalence
This will be the case on any site (self-hosted, WoA, Simple), regardless of version.
Reported in internal testing: p8oabR-1Bq-p2#comment-8324
Contributor guide
Research direction
Start by reproducing the behavior from the Menu Items admin page at /wp-admin/edit.php?post_type=nova_menu_item, using the section and bulk-item setup described in the issue. Trace the relevant admin entry points for displaying and dragging menu items; done means items assigned to multiple sections display consistently and dragging does not unexpectedly discard their other assignments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- content
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100