Needs work
Project:
Drupal core
Version:
main
Component:
menu_ui.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Aug 2019 at 18:07 UTC
Updated:
12 Aug 2026 at 12:45 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #2
abhaysaraf commentedComment #3
hussainweb@abhaysaraf, can you please put a screenshot with the new checkbox? This also needs tests.
Comment #4
hussainwebComment #6
aleevasJust fixed a failed test from #2

Also attached a screenshot with this checkbox
Comment #7
hussainwebSomething I realised from the test-fail. Is the "Enabled" checkbox checked by default when the page loads? I think that would be a good idea.
This could be simplified to
$defaults['enabled'] ?? 1Comment #8
hussainwebOr even just
(bool) $defaults['enabled'].Comment #9
aleevashussainweb thanks for your advise. Your notice make sense.
Made changes in this patch
Comment #13
bohus ulrychHi, thank you for your work. It works like charm - tested previously with 9.0.x and now with 9.1.0
Btw: for D7 I used https://www.drupal.org/project/disable_node_menu_item, for D8 https://www.drupal.org/sandbox/pcranston/2920832. Now I'm happy with this simple, clean core patch.
Comment #14
abhijith s commentedApplied patch on 9.2.x and it works.The checkbox for showing menu items appears after this patch and it works well.Adding screenshots.
Before:

After:

Comment #15
chrissnyderI was having an issue with the patch in #9 when some of the content types did not show the menu on the node edit form. The attached patch corrects this.
Comment #17
richardgaunt commentedI've expanded on patch #15 default enable link to the node type form, so that this setting can be have defaults defined for each content type.
I should also note, the above patches were exactly the feature I was looking nice work.
Comment #18
manojithape commentedComment #19
manojithape commentedVerified and tested patch#17 on the drupal 9.3.x-dev version. Patch applied successfully But found one observation.
Testing Steps:
Expected Result:
Actual Results:
Observation:
By default status of the menu link displayed "disabled/unchecked" for all content types. It should Enable by default. Please refer attached screenshot (Bydefault Disabled_unchecked displayed.png ).
Comment #20
manojithape commentedComment #21
vikashsoni commentedpatch#17 working fine and applied cleanly for reference sharing screenshot ...
Thanks
Comment #22
ranjith_kumar_k_u commentedFixed CS error
Comment #24
richardgaunt commentedWhat has changed
1. Updated failing test for new menu_link options in node form.
2. Fixed issue found in: #19 - checkbox is now checked if no setting has been configured.
3. Updated JS to hide the menu link enabled, if no menus are selected
Comment #25
vsujeetkumar commentedFixed the custom command fail issues.
Comment #27
richardgaunt commentedWhat has changed
1. Added tests to check the content type configuration option.
2. Updated node form tests, to test the enable link functionality.
Comment #28
richardgaunt commentedFixed lint issue.
Comment #29
richardgaunt commentedComment #30
richardgaunt commentedComment #32
stefanos.petrakisPicking this up for review in a MR, commited the most important patches from the issue for easier tracking of history.
Switched to 9.4.x-dev (and updated code from #29 accordingly)
Keeping #29 visible (applies to 9.3); hiding all other patches and interdiffs.
Comment #34
stefanos.petrakisMy review on this FWIW, with the hope this moves on, it's a wonderful feature.
Comment #35
nsalves commentedPatch #29 was not applying in core 9.3.5 (some changes to the two js files it patches). Leaving the same patch updated for that version here in case anyone needs this.
Comment #36
micnap commentedThanks for the 9.3 patch @Nelson Alves. Applied and works well in 9.3.9.
Comment #37
sokru commentedThis is patch against 9.4.x. I rerolled the MR and made the suggested corrections. Only thing I couldn't figure out was the note about logical error on https://git.drupalcode.org/project/drupal/-/merge_requests/1443#note_57563.
I tested this on local, works fine and is useful feature.
Comment #38
ravi.shankar commentedFixed Drupal CS issue of patch #37.
Comment #39
sokru commentedIncluded patch should resolve "Custom commands failed".
Comment #40
sokru commentedMaybe now the CI bot is happy.
Comment #41
devashish jangid commentedVerified and tested patch #40.
Patch applied successfully and looks good for me.
Sharing screenshots for the reference.
Comment #42
akhildev.cs commentedHi,
Applied patch #40 is working fine.
Thank you for the patch.
Comment #43
kdborg@gmail.com commentedI'm using patch #35 with Drupal 9.3.9. I'm not seeing the "Enabled" option on the node edit form.
This patch works if I start a brand new website. If I use the one I'm testing on, there is no "Enabled" option.
Comment #44
andypostMerge request is outdated, patch missing upgrade path
Comment #45
richardgaunt commentedThe feature provides the ability to create node's with a menu link that is disabled. What upgrade path would we be providing?
Comment #46
kdborg@gmail.com commentedThe module "Menu Link" disables the Menu UI module from adding to the node edit page.
Comment #48
nikhil_110 commentedRerolled patch against 9.5.x
Comment #50
nikhil_110 commentedComment #51
prasanth_kp commentedApplied #48 patch on 10.1.x-dev and it works.
Comment #52
stefanos.petrakisTrying to update the PR, against 10.1.x and also including all the work that went into patch #40.
Regarding patch #48: Why is this patch missing so many of the changes from #40 if it is a reroll?
Gonna set this back to 'Needs work' till this gets clarified.
Comment #53
rkollerIn the process of writing up a separate issue about the manage form display page i've noticed the problem and inconsistency this issue is going to solve. thanks for working on that! but one detail aside the points mentioned in #52 the issue also needs an issue summary. at the moment there isn't any at all anymore.
Comment #54
sokru commentedI think re-roll at #48 was mistake, its missing tests etc, my suggestion is to ignore it for now.
Comment #56
manvinder12 commentedRe roll of #40 for Drupal 10.1.4
Comment #57
_utsavsharma commentedPatch for 11.x.
Comment #58
vsujeetkumar commentedFixed the failed test cases, Please have a look.
Comment #59
smustgrave commentedNew schema will require an upgrade path
Don't think all this is needed. Just using the config service should work. Unless there is testing of a new configuration option, which is missing.
Comment #60
programmerdiego commented@vsujeetkumar
@_utsavsharma
@manvinder12
vsujeetkumar
_utsavsharma
manvinder12
Your patch did not work for:
Drupal Version 10.1.5
MySQL Version 5.7.29
PHP 8.1.14
Comment #61
SakaSerbia commentedI use this module on D10: https://github.com/SakaSerbia/disable_node_menu_item
Comment #62
crutch commented@19, we should be able to set the default as disabled or enabled per content type
Comment #67
dieterholvoet commentedI created a new MR on 11.x and rebased the existing changes.
Comment #68
martinpe commentedAdapted the patch
3075230-58.patchfor Drupal 11.1.xComment #72
smustgrave commentedRebased this one but seems will still need upgrade path.
Comment #74
kthullThe latest patch from MR 11618 is needed for D11.4.x, but disabling the menu item in the node edit form no longer saves the unchecked value. So unchecking and saving keeps the menu item in the menu, and editing the node again shows the Enabled checkbox as checked. Worse: it prints the full menu for disabled menu items, and in our case we need the specific child-level menu on disabled menu items.
ETA: Did some further testing and the patch from #68 works as expected on D11.3.x but fails to install for D11.4.x so it looks like I'll be downgrading to D11.3.x until this is fixed.
Comment #75
smustgrave commentedProbably belongs to the menu_ui module