- 🇳🇱Netherlands Lendude Amsterdam
This came up as a bug smash triage target.
Rerolled.
Fixed the if/else to actually do what it is supposed to do, if the trimmed version of the provided title is empty -> set the title to the node title, in previous versions the trim did nothing.
We don't need to do the actual trimming since that is already handled by_menu_ui_node_save
, so we only need to trim to check we actually end up with a valid title in_menu_ui_node_save
. - 🇮🇳India nayana_mvr
Verified the patch #44 and tested it on Drupal version 9.5.x. The patch works fine and I have added the before and after screen recordings for reference.
Steps followed:-- Create any basic page.
- Click on Menu setting and check on Provide a menu link.
- Remove the menu title generated automatically based on node title.
- Save the node.
- Check Main navigation menu.
After applying the patch, a menu link corresponding to the new node is autogenerated in the main navigation menu based on the node title even though the menu link title field was empty while creating the node.
- Status changed to RTBC
over 2 years ago 7:58pm 9 February 2023 - 🇺🇸United States smustgrave
Confirmed the issue on D10.1 by manually deleting the title field for the menu link.
Applied the patch and did the same steps and the menu link was created. The last submitted patch, 44: 1763002-44.patch, failed testing. View results →
- Status changed to Fixed
over 2 years ago 9:32am 16 February 2023 - 🇬🇧United Kingdom catch
Option #2 seems good. Double checked the test coverage to make sure we actually have test coverage for removing a link, and that's fine.
I doubt there are lots of people using the bug to remove menu links as opposed to unchecking the checkbox, but going to just commit this to 10.1.x in case.
Committed 586900e and pushed to 10.1.x. Thanks!
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
over 1 year ago 8:59am 12 October 2023 - 🇩🇪Germany stefan.korn Jossgrund
This has been a bug so long, it has gotten a feature ... ;-)
In a project we rely on the old behaviour to realize a special workflow regarding creation of menu links while node editing. Now with the new behavior we have a bc break going from D9 to D10. Yes, I know this can happen going from D9 to D10.
I am also wondering if there might not be people that just clear the title to remove a menu link and then wonder why they get the menu link back even with different text if they changed the menu title before. And additionaly if you for example edit nodes from the content overview you will not get directed to the node view and might even not realize that this has happened.
I am not clearly seeing the bug in the old behavior and it was there for a long time ... But surely I have been 10 years to late for lamenting on this, but I really thought this behavior was intended the way it was.
- 🇩🇪Germany stefan.korn Jossgrund
I mean this is not straight forward:
You have save a menu link with different title than the node title.
You come back later and remove the menu title and save the node.
You still have the menu link, but now with the node title again.