Test coverage comment
I did look at test coverage, but I'm not a testing expert! Best guess: WorkbenchMenuAccessNodeFormTest could be improved with more/different checks related to the menu_parent field. (Vague enough?? π)
Problem/Motivation
As a user in a workbench access "section," if the content in the menu in my section is unpublished, I can't select a "parent link" that's for an unpublished page (in the node editing form and when editing the menu link in the Drupal menu admin UI).
FWIW #1: I can edit all of those unpublished pages, and I can see all the menu links via Drupal menu admin UI -- and drag menu items under menu links that are for unpublished pages. I just can't select a "parent link" that's for an unpublished page.
FWIW #2: I don't know if this is actually a workbench_menu_access issue, or a Drupal core issue! (...or a view_unpublished module issue, I suppose?)
Steps to reproduce
- Set up workbench access and workbench menu access, and a user in a section, and a menu configured with a WBA section.
- Make sure the user role has menu admin permissions, and access to unpublished content (I used view_unpublished module for this last part -- might not be necessary, but mentioning in case it matters).
- Create an unpublished node, and add a menu link for that node, in the associated section menu.
- Create another node, and add a menu link -- check the "parent link" drop-down, you'll see the menu link you created in the previous step is not available to select as a parent link.
- Publish this second node, with a menu link.
- Go to the menu admin UI (i.e.
/admin/structure/menu/manage/my-section-menu
).
- Edit the menu link for the published node -- check the "parent link" drop-down, you'll see the menu link for the unpublished node isn't available to select as a parent link.
- Go back to the editing screen for the menu overall, with the drag-and-drop interface.
- Note that you can see both menu links, and you can drag either under the other (i.e. effectively, you can set a parent link that's for an unpublished node, using the drag-and-drop interface).
P.S. Optionally, place the menu as a block -- if you're logged in as a user with access to the unpublished content, you'll see the entire menu in full, not just published links.
Proposed resolution
Make it so you can select parent links that are for unpublished nodes.
Remaining tasks
User interface changes
API changes
Data model changes