Closed (outdated)
Project:
EveryBlog
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Aug 2008 at 04:11 UTC
Updated:
25 Sep 2020 at 06:58 UTC
Jump to comment: Most recent
In Drupal 6, the right way to redefine a menu of another module is to implement hook_menu_alter().
Comments
Comment #1
ntroutman commentedWhat are you revering to? What menu irme am I overwriting incorrectly? More specific information would be helpful. Thanks for taking the time to post though.
Regards,
Ntroutman
Comment #2
avpadernoIn
everyblog.module, the functioneveryblog_menu()contains the following definition for a menu item:That menu item is already defined from
blog.module, thereforeeveryblog.modulemust implementhook_menu_alter()to alter such menu.I hope this helps to understand the issue I am talking of.
Regards,
Kiam
Comment #3
ntroutman commentedExcept that I'm not overwriting an existing menu since EveryBlog is incompatible with the core Blog module and expects it to me disabled. Without the core Blog module there is no menu item to overwrite. At least that is how I understand things to work. I'll look into more carefully later. Thanks for the post.
Regards,
NTroutman
Comment #4
avpadernoThat is not stated in the project page. I was thinking the module was just an extension for
blog.modulewhich then could co-exist with it.If the module requires the core module to be disabled, then it should check that at runtime, and report an error in such case (the checking can be done in the implementation of
hook_requirements()).Until
blog.modulehas not been disabled,everyblog.moduleis re-defining an already existing menu.Comment #5
ntroutman commentedThanks for the info. I didn't know about the hook_requirements. I'll make the change to the project page and add the needed code. Thanks again
Comment #6
avpadernoI usually put a link to the documentation page, but this time I forgot to do it.
As the documentation for the hook states, the checking can be done when the module is being installed, or when the module is being executed; in the first case, if the hook implementation returns an error code, the installation of the module gets stopped.
Comment #7
ntroutman commentedThanks for the link. I'm working on making the fix right now, beta2 should be out later today.
Regards,
NTroutman
Comment #8
avpadernoI am closing this issue, which is for a not supported Drupal version.