Download & Extend

Wrong variable name in hook_menu_delete documentation

Project:Drupal core
Version:7.x-dev
Component:documentation
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:needs backport to D7, Novice

Issue Summary

In documentation for hook_menu_delete: http://api.drupal.org/api/drupal/modules!menu!menu.api.php/function/hook_menu_delete/7

there is a '$link' insted of '$menu'.

Comments

#1

Version:7.x-dev» 8.x-dev

Good catch!

While we're fixing this, first line should be changed from "Inform modules that..." to say "Respond to...".
http://drupal.org/node/1354#hooks

#2

Version:8.x-dev» 7.x-dev
Issue tags:-needs backport to D7

This got fixed for d8 in #1814916: Convert menus into entities

#3

Assigned to:Anonymous» cck

D7 patch for #1.

AttachmentSizeStatusTest resultOperations
menu-hook_delete_wrong_param-1875858-1.patch1.33 KBIdlePASSED: [[SimpleTest]]: [MySQL] 39,674 pass(es).View details

#4

Status:active» needs review

#5

Version:7.x-dev» 8.x-dev
Status:needs review» needs work

There is still a problem in D8 that needs to be addressed (which is addressed in this d7 patch, but we need to fix d8 before fixing d7): the first lines of all the hook docs in menu.api.php are incorrect. So can we get a patch for d8 that fixes them as in the existing d7 patch? Thanks!

Oh actually, the d7 patch says things like:

Respond to a custom menu was created.

That isn't very good English. How about "Respond to custom menu creation"? And similar for the other hooks.

#6

Issue tags:+needs backport to D7

oops,seems i missed #1..sorry for the noise.restoring tag as well

#7

Ok. I will follow up on this.

#8

Status:needs work» needs review

This D8 patch corrects the subject line.

AttachmentSizeStatusTest resultOperations
menu-hook_delete_wrong_param-1875858-6.patch1.07 KBIdlePASSED: [[SimpleTest]]: [MySQL] 50,878 pass(es).View details

#9

Status:needs review» needs work

Thanks! Please change "Responds" to "Respond" -- see
http://drupal.org/node/1354#hooks

#10

Status:needs work» needs review

Hi, the correction is included in this version.

AttachmentSizeStatusTest resultOperations
menu-hook_delete_wrong_param-1875858-9.patch1.07 KBIdlePASSED: [[SimpleTest]]: [MySQL] 50,910 pass(es).View details

#11

Assigned to:cck» jhodgdon
Status:needs review» reviewed & tested by the community

Looks good! I'll get this committed to 8.x shortly, and then we can return to the 7.x patch.

#12

Version:8.x-dev» 7.x-dev
Status:reviewed & tested by the community» needs work

Thanks again -- Committed the patch in #10 to Drupal 8.

Now we can return to the patch in #3 for Drupal 7, which needs the first lines of the hook documentation to look like the patch in #10.

#13

Status:needs work» needs review

How about this? See patch...

AttachmentSizeStatusTest resultOperations
menu-hook_delete_wrong_param-1875858-13.patch1.05 KBIdlePASSED: [[SimpleTest]]: [MySQL] 39,656 pass(es).View details

#14

Status:needs review» needs work

Hi, -13 patch needs another fix in hook_menu_delete. You can look at -1.patch. This @link parameter is fixed in D8. This is why it is not included in the D8 patch.

#15

Added that change. How about now?

AttachmentSizeStatusTest resultOperations
menu-hook_delete_wrong_param-1875858-15.patch1.32 KBIdlePASSED: [[SimpleTest]]: [MySQL] 39,762 pass(es).View details

#16

Status:needs work» needs review

#17

Status:needs review» reviewed & tested by the community

Looks good -- thanks! I'll get this committed shortly.

#18

Assigned to:jhodgdon» Anonymous
Status:reviewed & tested by the community» fixed

Thanks again -- this is committed to 7.x.

#19

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here