View Issue Details

IDProjectCategoryView StatusLast Update
0032889mantisbtplug-inspublic2023-10-14 12:28
Reportergthomas Assigned Todregad  
Status closedResolutionfixed 
Product Version2.25.7 
Target Version2.25.8Fixed in Version2.25.8 
Summary0032889: EVENT_MENU_DOCS is never triggered

The documentation says that EVENT_MENU_DOCS is for adding extra links to the "Docs" menu, but it is nowhere triggered.

Steps To Reproduce

It seems that the print_menu call in print_doc_menu function at core/html_api.php is missing a third, event name ('EVENT_MENU_DOCS') argument.

With it, my plugin works.

Additional Information
diff --git a/core/html_api.php b/core/html_api.php
index ec75ae9d6..609d70609 100644
--- a/core/html_api.php
+++ b/core/html_api.php
@@ -908,7 +908,7 @@ function print_doc_menu( $p_page = '' ) {

-       print_menu( $t_pages, $p_page );
+       print_menu( $t_pages, $p_page, 'EVENT_MENU_DOCS' );

TagsNo tags attached.




2023-08-29 08:27

developer   ~0068041

Thanks for the report and patch.

I searched the Git history, and it looks like EVENT_MENU_DOCS was never actually implemented since being defined back in 2007 (MantisBT master dc8bec38)

Anyway the proposed fix is correct so I'll commit the change. Since you seem to be using Git, maybe next time you can send us a PR instead of copy/pasting a diff here.

Please note that the Projects Documentation feature is deprecated and may be removed in a future version of MantisBT.

Related Changesets

MantisBT: master-2.25 15b6ddb8

2023-08-29 08:29


Details Diff
Trigger EVENT_MENU_DOCS in print_doc_menu()

The Event was never actually implemented since being defined back in
2007 (see dc8bec3839bd1b98be9094120bec9710ada1075b)

Fixes 0032889
Affected Issues
mod - core/html_api.php Diff File