It is useful to pass the menu link, as it existed before it was updated, to hook_menu_link_update() implementations, so you can find out what actually changed.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | add_prior_link_to_hook_menu_link_update-1087888-3.patch | 1.67 KB | pieterdc |
| #1 | hook_menu_link_update_v2.patch | 1.53 KB | marvil07 |
| hook_menu_link_update.patch | 1.37 KB | casey |
Issue fork drupal-1087888
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
marvil07 commentedI tried to find(
git grep -e '^function\ hook_.*_update(') another hook making an update which do the proposed, but it seem like no other one do it, so I it would be great if someone knows if that's something on purpose.Anyway I'm providing here a reroll for core directory change.
Comment #2
nitesh sethia commented#1 patch is working fine and has been rerolled.
Comment #3
pieterdcThat is useful, indeed.
I improved the documentation upon your patch and rerolled it against current 7.x
See attached file, add_prior_link_to_hook_menu_link_update-1087888-3.patch.
Comment #5
pieterdcThe previous patch failed because it's against 7.x while this issue is linked to 8.0.x-dev.
I didn't want to change that part of this issue, because, as far as I know, feature requests first go in dev of the upcoming major version before they get backported to the earlier major version.
But I did want to share my 7.x version of the patch.
Comment #8
nitesh sethia commentedComment #21
danielvezahook_menu_link_update has been replace in Drupal 8+ with hook_ENTITY_TYPE_update, where you should be able to access the prior link in $entity->original.
This never gained any traction as a D8+ issue and doesn't seem to be required for D8+ anymore, so I'm moving this to the D7 queue.
Comment #22
avpadernoComment #23
avpaderno