Hello,
Currently when you have a menu structure with parent and child items and a parent that is linked to a node that is unpublished, the entire parent and child tree disappears in the menu overview.
Now I understand that it would disappear in the actual website, on the front-end. But looking at the menu structure, it completely disappears as well - as if it is externally deleted. This caused quite some confusion for me earlier as I had build a structure and someone unpublished a primary item's node. When I published the node again, the structure happily appeared again.
I feel this is not a good way to deal with unpublished content. My proposal would be to add 'node unpublished' to a menu item that links to an unpublished node. Especially as an admin that has the rights to administer content. Anyway, by all means, I think it would be way better than just making it disappear. Removing from the menu structure = permanently removed in my eyes.
Thanks in advance!
Cheers,
Danny
Comment | File | Size | Author |
---|---|---|---|
#5 | drupal_core-vanishing_entries-887910-5.patch | 603 bytes | cupcakemuncher |
#3 | drupal core-vanishing entries-887910-3.patch | 603 bytes | cupcakemuncher |
Comments
Comment #1
Danny_Joris CreditAttribution: Danny_Joris commentedOn top of that: If you add a menu item to an unpublished node, it will just save, give no warning or error and the menu structure still looks the same. After the node would be published, all your attempts to add that menu item will be visible.
Comment #2
casey CreditAttribution: casey commentedComment #3
cupcakemuncher CreditAttribution: cupcakemuncher commentedHello!
Following patch should fix this issue.
I appologize in advance.
This patch is for Drupal 7.18.
I am aware of the backport policy but currently I do not have a running D8 instance to verify the patch.
Changes are made in menu.inc.
The function menu_tree_check_access() is called from within menu_overview_form() in the menu-module.
Which generates the form used to administer the menu.
It always queries the status of the linked content.
This shouldn't be done when administrating the menu.
Since the global $menu_admin is set but never evaluated, I assum it's purpose to mark the request as coming from an administrator of the menu.
The patch has menu_tree_check_access() query $menu_admin and depending on it's value queries the status of the linked content or not.
Thus allowing for display of an entry linking to unpublished content.
If unpublished content is displayed in the menu-administration-form it should be marked to distinguish it from published content.
Workaround here would be implement hook_form_FORM_ID_alter() and have it pass along an additional css-class.
Comment #5
cupcakemuncher CreditAttribution: cupcakemuncher commentedFilename without spaces, since uploaded patches seem to be uneditable.
Comment #6
cupcakemuncher CreditAttribution: cupcakemuncher commented#3: drupal core-vanishing entries-887910-3.patch queued for re-testing.
Comment #7
johnvMarked #1705788: can not see links to unpublished nodes in menu admin (even if i'm uid=1) as duplicated. It has a nice test-script, though: