Function update_manager_access() in update.module refers to update_menu() which no longer exists.
Further, the description of this function describes it as an Access callback which was true when it was invoked from hook_menu() but has been replaced by src/Access/UpdateManagerAccessCheck.php. Though not used as an access callback anymore, it is invoked directly in many places as an access helper function.
Also, update_manager_access() clashes with hook_ENTITY_TYPE_access() and therefore should be renamed to _update_manager_access() and usages should be internalised to the update module.
Comments
Comment #2
jeremy commentedAttached patch removes reference to
update_menuand better describes function as an access helper.Comment #3
albertski commentedChange looks good and makes sense. Ran the patch without any issues.
Comment #5
mandar.harkare commentedAdding the same patch again.
Comment #6
albertski commentedRe-ran patch again. Still looks good!
Comment #7
alexpottCan we also rename this method to
_update_manager_access.update_manager_accessis in danger of clashing withhook_ENTITY_TYPE_accessif a module creates an entity type called manager. Also we should move some of the help text from system.module to the update module. system_help should only display the message when update module is not enabled. The update module should display the message when it is.Comment #8
alexpottAccess helper:can be removed too.Comment #9
jeremy commentedUpdated patch to address all feedback:
update_manager_accessto_update_manager_accessupdate_menu()system.moduletoupdate.moduleComment #10
albertski commentedRan the patch without any issues.
Manually reviewed patch and everything looks good.
I grepped "update_manager_access" just to make sure no other module calls it and it looks like the migrate_drupal module calls it. I think it should be updated there too.
Comment #11
jeremy commentedWhat you're seeing there is a Drupal 7 database dump -- it's not affected by this change.
Comment #12
albertski commentedAhh got it! Okay so this patch is good.
Comment #13
alexpottComment #14
alexpottComment #15
alexpottComment #16
webchickLooks good. There is one module I'm aware of that calls this method http://cgit.drupalcode.org/upgrade_status/tree/upgrade_status.module#n46, so wrote a brief change notice for it.
Committed and pushed to 8.0.x. Thanks!